(#36) Solar Charge Controller Update
It's Dead, Dammit!
Sometime around the middle of 2019, I noticed that my EPSolar Landstar 1024B controller had stopped working. I'm not sure why but it was an inexpensive proof-of-concept that showed I could command the controller and get the data out of it I wanted.That controller, the LS1024B was also a PWM based model and only 10A. A great baby step but not a long term solution. So, after some thought I decided to buy another EPSolar product. [ And an extended warranty. ]
August 6th 2019, I bought the EPEver Triron 3210N Controller. This is an MPPT 30A controller and should support my projected needs for the RV.
Most of the code written for the LS1024B worked on the 3210N. EPEver/EPSolar technical support sent me a new document that outlined the new protocol. There were a few changes, a handful of deletions and two handfuls of additions. But it didn't take long to have the code working again.
New - A EPSolar Library
I took the time to move the base code into a library (shared and static). That seemed like a useful step.I'm content with the library design but already see a few things I'd do differently. The 'pound-defines' (#define) are a first attempt to abstract out the dependency on knowing Modbus.
Yes, you'd always need to link with the libmodus library, but at least you wouldn't have to know anything about the modbus context object.
Client Applications
With the library done, the next application to recreate was the application that polls the Solar Charge Controller (SCC) for status and publishes MQTT messages to the broker.This application can also receive MQTT based commands and change parameters in the controller.
This application is written in C and runs on a Raspberry Pi Model B+ connected by a EPEver Branded RS485/USB cable to the controller.
Status messages are published to the broker every minute.
Curses! Foiled Again
The second application was cobbled together quickly and provides a simplistic, curses-based UI for displaying SCC values and changing parameters.Home
Here's the startup, Home Screen with the essential data displayed:
At a glance are data from the Solar Panel (PV), the House Battery and any load that is connected to the MPPT Controller.
The controller has a connection for an external temperature sensor. And the controller keeps tally of the stats around generated and consumed power.
One thing I noticed after short usage was that the internal clock in the controller drifts quickly. If this was an AC based appliance, I'd suspect a 50/60Hz issue. But it's not and I'm not sure why the controller time falls behind so quickly.
Battery
Pressing 'B' brings you to the Battery Screen:Battery parameters are modified here. These are the values fo my 100AH Group 27 Sealed Lead Acid battery.
Load
Press 'L' for the Load Screen:The controller has a four useful modes for turning the connected load on and off. There's full manual mode. Then there's sunrise and sunset, timers and a combination thereoff.
The last one is hard to put into words. The manual has a pretty good picture of how it works.
Note that Dawn/Sunrise is not defined by a time but instead by a minimum threshold voltage from the solar panel. In this case, when the panel is putting out 5.0V (or better) the controller calls that "Dawn".
And the same for Dusk/Sunset. When the panel voltage output is 6.0V or less, then that means it's dusk.
[ Yes - these are the default values which makes you wonder what happens when the panel voltage is 5.5V! ]
Finally, note that if you chose to use the 'Dusk Plus Timer' mode you need to set the "Time of Night" parameters that will define Dawn.
Device / Controller
Press 'D' to see Device (the MPPT Controller) settings:The controller can turn itself off if it gets too hot, can stop charging if the battery gets too hot, can stop draining if the battery is too cold.
You can see that the two clocks have drifted off by over an hour after about 10 days.
In a future post we'll discuss the RS485/USB adapter in more detail and the steps I took to rebuild the driver as a kernel module.
No comments :
Post a Comment