EPever/EPsolar Controllers & Blynk

“doodar” basically means: I’ve no idea what it is or does so more research is needed … :sweat_smile:

But thank you very much for the extra doodar. Once again, very much appreciated … :+1:

1 Like

I’m trying to figure out what the MAX485(doodar) does and why.

My understanding so far is:
Tracer/Xtra controllers communicate over serial(TX/RX), basically 2 wires and ground. The pic below shows the rear of the RS485 socket of an EPever 20A Tracer 2206AN

My D1 Mini Pro isn’t able to communicate directly over serial so an interface of some sort is needed. Say hello to the MAX485(doodar).

As far as I can tell, the controllers I have are “half duplexed”. Meaning data can either be sent or received, not both at the same time. The RS485 ports of my 3 controllers were linked in parallel and connected directly to my laptop via EPever’s USB to RS485 cable. I was able to give each controller its own device ID and acquire data from them via the PC software individually or all 3 using the “Global Monitoring” option.

So my next question is:
Does each controller require its own “doodar” or is there a way to use just 1 by setting device ID’s like the original software?

They actually communicate over ModBus protocol, which is RS485.
Serial ports communicate using TTL and the “doodar” converts RS485 to TTL so that it can communicate with the serial port(s) on a Wemos or similar.

I think that’s correct, but I haven’t studied the ModBus protocol. The serial port of a Wemos can also only handle either Tx or Rx at any one time, so the sketch and/or ModBus library has to manage this.

The Modbus library that I use allows you to specify which device ID you want to use to send-=out a data request then listen for the result. In the sketch that I PM’d you I speculated about how the code might be enhanced to read multiple device IDs. As I don’t have multiple devices to test it on I can’t prove if this approach will work, but I don’t see why one controller can’t interrogate multiple ID’s on the same bus (although this would need to be a sequential thing - query device 1, then device 2, then device 3).

As your devices all charge the same batteries, then you’d only need to query battery stats with one device. The other devices would presumably just be queried for solar panel output and maybe internal temperature readings.

Pete.

1 Like

So, I close then? :sweat_smile:
OK so I understand that now, thanks.

That’s the answer I was looking for. Now I know in which direction I’m heading. :+1:

I do, be happy to test for you once everything is reinstalled.

Ah… The 2 small controllers(centre and right) are 24v and fed power to a 24v lithium battery bank in the metal cabinet. Any surplus power is dumped into 48v lead acid batteries via a large 1500w buck booster. The large controller on the left is 60A 48v that feeds the large bank of lead acid batteries. All 3 controllers and the wind turbine share a common ground. And I suspect all 3 RS485 sockets use the same voltage. I wasn’t expecting this to be a problem as the PC software handled it OK. Is it a problem?

I don’t think so.
If it’s possible to interrogate each controller in turn then you can decide what data you want from each one.
The process of requesting and getting the data from the various registers (memory locations) within each controller can be a bit slow, so it’s best to only ask for what you need, rather than requesting every available parameter.
It also gives a lot of data to upload to Blynk, and making sense of that data in a useable format in the app can also be a bit tricky, so probably best to think about your key metrics that will come from each controller and how you’ll utilise that data in the app.

Pete.

1 Like

I’ll be wanting it all, everything each controller has to offer.

I’ll be making my own Blynk server again, and like the original PC software I want to pull everything when accessing a single controller, but only specific data when accessing all controllers(globally).
I know this isn’t going to be easy but I’m up for the challenge.

I don’t think there’s such a thing as retrieving global data, it’s all specific to an individual controller.

If you have two controllers connected to one bank of batteries then they will (should) return the same data about battery voltage, state of charge, temperature etc., so extracting this twice may be a waste of effort.
Also, the controllers give data on the load voltage and current, but only of this is drawn via the load terminals of the controller. With your setup I don’t think yore doing this, so that data will be zero for each controller, so not worth extracting.

Pete.

1 Like

The original EPever software has a “global” option, see the pic above and the one below. It accesses each controller 1 at a time and displays just a few specific bits of data, battery status, load status, device name, ID etc.

Yes 2 controllers but supplying power from very different sources so very different data returned.
The smallest controller on the far right has 300w on solar panels. The centre controller has a used oil burning single cylinder diesel engine connected to it via a motor/generator.

The load outputs of the 2 smaller controllers are connected to the 1500w buck booster. Yes there are losses incurred in the booster but it does give me accurate data of what’s being pulled out of the lithium battery bank. I hope to add the values of both outputs in Blynk to give me the total of both.

So, as you said, that’s controller specific data, displayed as a ‘global’ summary.
This is why I was saying that you’d need to give some thought to how you display the data in a meaningful way in Blynk.

But I was referring to the shared battery bank that they supply. The inputs stats will be different, but the battery specific data should be identical - so no need to gather it twice.

Okay, I hadn’t realised that from your diagram. In that case the load data from these two controllers will be useful.

Pete.

1 Like

“Meaningful” to me means everything a specific controller has to offer. :grin:
I explain why below.

When I access a specific controller ID I want to see every bit of data it has to offer, even if its connected to the same lithium battery bank as another controller. Only the voltage of that battery bank will be the same(hopefully). I understand for most people what your saying is correct. But for my specific application, temperature will be specific to where the individual controller temperature probes are positioned. Giving me a better view of the overall battery temperature as its almost 2 feet wide, has hundreds of individual lithium cells in columns.

For me personally, all the data will be relevant. But I do understand, for most, it would be silly to access the same data twice. Perhaps I should have been more descriptive in my solar setups and what I personally want to achieve… :+1:

On the plus side, considering I’m 54 and virtually blind(exaggeration). I did a pretty good job soldering the pins to that D1 Mini Pro… :stuck_out_tongue_winking_eye:

Specsavers is always a good option!
Personally, I wear varifocals but still struggle to see enough detail for soldering, especially when it comes to SMD components. My illuminated magnifier (courtesy of Maplins closing-down sale a few years ago) is a lifesaver for me.
Here’s a comparison of a D1Mini under the magnifier compared to one that’s not…

Looks good!

Do you get a decent WiFi signal in the place where you have your controllers, or are you planning on using an external antenna on the D1 Mini Pro?

If you are then you need to turn the zero ohm resistor that’s between the antenna connector and the ceramic antenna through 90° (anti-clockwise), which should be fun!

Pete.

1 Like

I’ve not needed glasses before, things on site tend to be large and 30 ton+ so you can feel them coming long before you see them… :sweat_smile:
The site drawings are digital these days so just pinch to zoom.
But these little microprocessors are something else. Time to get another illuminated magnifier I think, what a huge difference they make.

I have BT Complete WiFi at home, they gave me a couple of these things.


So I get a strong signal all over my property, even in the shed where the controllers are.

How much of a difference does the external antenna make, distance wise?

A lot depends on the quality of the antenna that you fit. Many of the cheap Chinese ‘rubber duck’ ones that you see on eBay aren’t really that great, but may give 3db increase in signal strength, which is effectively double, so worth doing if the RSSI is marginal.
I use one in my shed in Spain, and it helps quite a bit. I also have a Wemos in a metal box that’s part of my door entry system, and I need one on that otherwise the Wemos is completely shielded.

The BT mesh system looks quite good, apart from the fact that it’s BT, so you should be fine sticking with the onboard ceramic antenna.

Pete.

1 Like

I’ve been with BT about 8 years, never had an issue with them. Tried Virgin briefly, never again…
That said, BT’s telephone exchange is less than half a mile away and their new fibre box is at the end of my drive. So I’ve always had a good connection and reasonable speeds, even though it’s an FTTC connection. I plan to upgrade to FTTP when its available the end of this year. This is about average for me…


Why do you not like them, bad experience?

I was with BT for years and always figured that they’d provide the best service,. even if they werent the cheapest.
After a few issues with internet speeds being worse then usual I had some very frustrating conversations with support people who were clearly in Asian call centres and didn’t speak very good English, didn’t know their arse from their elbow, and didn’t care a toss about resolving my issues.
At that point I swapped to Sky and haven’t had any issues since, and their support is great.

We have fibre to the box down the street and copper from there into the house and I’m getting this sort of speed, which is fine for me…

image

When I worked in IT we were always having battles with BT/Openreach and they never kept to their promises of installation dates and never paid the compensation that should have been due for their failures. One of my friends was a marketing director for Openreach and even she thinks that they’re rubbish!

Pete.

1 Like

As you can see, things are heading in the right direction.
Massive thank you to @PeteKnight for sending me this custom PCB, makes things so much easier and neater.

It’s sat on top of four 18650 cells supplying it with power, so at the moment it’s portable. At the moment its connected to my smallest controller, a 10A Xtra.

As you can see in the screen shot, the load button doesn’t work. Load is off and I’m still receiving data. I can turn it on and off on the controller but not via Blynk. Its not essential for me to be able to turn it on and off, but it would be nice to have the ability, hope I can figure it out.

From memory, I think that the controller has to be in a certain configuration (manual load control I think) to allow the load to be turned on and off via a software command.
This is a snippet of code that I used to use to control the load via software…

  node1.writeSingleCoil(0x0001, 1);
  result = node1.writeSingleCoil(0x0002, state);  

  if (result == node1.ku8MBSuccess)
  {
    node1.getResponseBuffer(0x00);
    Serial1.println("Success.");
  }

The 'state` variable needs to be 1 for on and 0 for off.

Pete.

1 Like

Absolute genius, thank you. Its now working perfectly via the button in the Blynk app…

1 Like

Almost got this sorted, but need a way to change this using segmented switch?

// Modbus slave ID 1,2,3,4 etc
  node.begin(1, Serial);

:thinking:
148323302_339520697249975_1370137909176462672_n

Things are really starting to come together now. Check out this YouTube vid…


Huge thank you to Steve for his help, could not have got this far without him .