Off-grid Solar / Battery monitoring and control freeware

Paul J

New Member
Joined
Jul 24, 2021
Messages
2
Fantastic project you all have going on here.

I see a few people having problems with USB-RS232 adaptors and RS232 connections in general. I think the problem some of you may be running into is the different electrical standards for RS232. The original RS232 (lets call it full voltage RS232), which is what I see on my Renogy Wanderer 30A Li operates at around +12v and -12v. Whereas some devices operate their RS232 interfaces at what’s called TTL, and is usually 0v and +5v or occasionally 0v and +3.3v. A Raspberry Pi and also Arduino boards all operate their RS232 ports at TTL.

This has a couple of implications, first and foremost, if you plug a full voltage RS232 device into a TTL Rs232 device you won’t just have comms problems but you may destroy the TTL RS232 device!.

So its best to always know what sort of RS232 port the device you want to connect to is, before you connect anything to it. Then if you are sure both devices are the same then proceed, else get a suitable level shifter/interface in the middle. If you are using a USB-RS232 adaptor, make sure you know if it drives the RS232 at full voltage or TTL.

Hopefully that helps someone sometime.

Again, love the work going on here, thanks very much,
Paul
 

nmcleese

New Member
Joined
Aug 18, 2021
Messages
1
Fantastic project you all have going on here.

I see a few people having problems with USB-RS232 adaptors and RS232 connections in general. I think the problem some of you may be running into is the different electrical standards for RS232. The original RS232 (lets call it full voltage RS232), which is what I see on my Renogy Wanderer 30A Li operates at around +12v and -12v. Whereas some devices operate their RS232 interfaces at what’s called TTL, and is usually 0v and +5v or occasionally 0v and +3.3v. A Raspberry Pi and also Arduino boards all operate their RS232 ports at TTL.

This has a couple of implications, first and foremost, if you plug a full voltage RS232 device into a TTL Rs232 device you won’t just have comms problems but you may destroy the TTL RS232 device!.

So its best to always know what sort of RS232 port the device you want to connect to is, before you connect anything to it. Then if you are sure both devices are the same then proceed, else get a suitable level shifter/interface in the middle. If you are using a USB-RS232 adaptor, make sure you know if it drives the RS232 at full voltage or TTL.

Hopefully that helps someone sometime.

Again, love the work going on here, thanks very much,
Paul
I just received my Renogy Adventurer 30A and it appears to operate on 12V similar to the Wanderer 30A mentioned here. I am measuring 10V from the RS232 port. I understand I will need to use some sort of level shifter. Are there any suggestions for what to use to shift the voltage down from the 10V down to the TTL voltage? I'm browsing amazon for options, I do not have any experience using "level shifters."

I am excited to get started on this project! I am hoping to be able to follow the cheatsheet provided by @BarkingSpider! to get this up in running! I am planning to use a small setup to collect data in preparation for designing a larger whole home solar setup.

Thanks for all the work that's been put into this project so far!!
Nate
 

Paul J

New Member
Joined
Jul 24, 2021
Messages
2
Hi @nmcleese, I should clarify my comments.

If you want to connect a full voltage RS232 device (which is what you have) to a Raspberry Pi via USB which is what it looks like most people are doing here, you don’t need a level shifter. You need a USB to RS232 adaptor, and that adaptor needs to handle full voltage RS232. The problem is a lot of the adaptors don’t always specify clearly if they support full voltage RS232 or just support TTL RS232.

I think if you look further back in this thread there was some discussion about which adaptors people had found success with.

The level shifter solution only applies when interfacing 3.3vTTL RS232 to 5vTTL RS232. In that instance you would use something like this one from Adafruit https://www.adafruit.com/product/1875
 

Symbioquine

Solar Enthusiast
Joined
Jul 6, 2021
Messages
95
there was some discussion about which adaptors people had found success with

Personally, I like these ones: https://www.amazon.com/dp/B00LZV1G6K/ They're about $2 each, work out of the box with most Linux/rPi distros, and are configurable to either 3V or 5V;

1629377418151.png
The main downside is that they don't have RTS/CTS or DSR/DTR pins so if you're going to RS485, make sure you get an adapter for that which has automatic flow control e.g. https://www.amazon.com/dp/B082Y19KV9/
 

BarkingSpider

Carbon Lifeform
Joined
Apr 14, 2020
Messages
373
Location
Silicon Valley, CA
I just received my Renogy Adventurer 30A and it appears to operate on 12V similar to the Wanderer 30A mentioned here. I am measuring 10V from the RS232 port. I understand I will need to use some sort of level shifter. Are there any suggestions for what to use to shift the voltage down from the 10V down to the TTL voltage? I'm browsing amazon for options, I do not have any experience using "level shifters."

I am excited to get started on this project! I am hoping to be able to follow the cheatsheet provided by @BarkingSpider! to get this up in running! I am planning to use a small setup to collect data in preparation for designing a larger whole home solar setup.

Thanks for all the work that's been put into this project so far!!
Nate
You
I just received my Renogy Adventurer 30A and it appears to operate on 12V similar to the Wanderer 30A mentioned here. I am measuring 10V from the RS232 port. I understand I will need to use some sort of level shifter. Are there any suggestions for what to use to shift the voltage down from the 10V down to the TTL voltage? I'm browsing amazon for options, I do not have any experience using "level shifters."

I am excited to get started on this project! I am hoping to be able to follow the cheatsheet provided by @BarkingSpider! to get this up in running! I am planning to use a small setup to collect data in preparation for designing a larger whole home solar setup.

Thanks for all the work that's been put into this project so far!!
Nate
You don't need to change the voltages, just use a true rs232 cable as i used. Do not use TTL cables. It works flawlessly.
 

koobs

Solar Enthusiast
Joined
Nov 19, 2020
Messages
64
Ah I'm excited to try build my monitoring fruit too. Just ordered all the parts. Programming it will be an interesting adventure... Started watching some videos on learning python. Doesn't seem too complicated so far.
 

DIYSteve

New Member
Joined
May 14, 2021
Messages
20
I don't have much Raspberry Pi programming experience but I have just got a Pi 3b and a Pi 4.
I have a EPEVER Tracer 4015BN and a Tracer 3015BN running two solar arrays, (both have a eLog01 which allows a MT50 and a RS485 to USB cable to be connected simultaneously, added benefit of the eLog01 is that it stores a few months of data in CSV format).
If you want I would love to be a beta tester for you.
 

corporate.joe

Solar Addict
Joined
Jan 25, 2021
Messages
157
Just discovered this project. Pretty interesting setup. Assembled and flashed product available for order or DIY with the provided code.



Found when browsing some YouTube channels I frequent. Good timing.


I'd guess it will probably work, but it seems overpriced. Why not just use the onboard serial pins and a cheap RS485 adapter?
Very good point. My remaining concern is how the RS458 connection with the PI, Growatt All-In-One, and Epever controller will play together on the same bus.
 

elvis_asaftei

Solar Enthusiast
Joined
Jul 5, 2021
Messages
229
You

You don't need to change the voltages, just use a true rs232 cable as i used. Do not use TTL cables. It works flawlessly.

can we use the software with a laptop and install anything on a laptop using ubuntu and using bluetooth connection to connect and get realtime data from multiple JK bms ?

Anyone tried this if we have just a spare latop ?

thanks
 

MrContigo

New Member
Joined
Oct 5, 2021
Messages
4
I've muddled my way through the cheat sheet instructions and believe I have an almost fully functioning system. Grafana displays my local pi details shown, but does not show any of my CC / Battery information. I'm using a Prolific USB-RS232 interface as recommended and can see that my pi is communicating - see the 'diagnostics' image. I also have the ramdisk configured and mounted, so at this point, I'm unsure of what to diagnose and how. Any ideas anyone?
 

Attachments

  • Diagnostics.JPG
    Diagnostics.JPG
    158.1 KB · Views: 16
  • Main.JPG
    Main.JPG
    97.7 KB · Views: 16
  • RamDisk.JPG
    RamDisk.JPG
    27.9 KB · Views: 16

BarkingSpider

Carbon Lifeform
Joined
Apr 14, 2020
Messages
373
Location
Silicon Valley, CA
Hi, looks like your 90% of the way there, the trouble is that Grafana is looking in the wrong place for the data.

Confirm that the Prometheus database is working and contains the data you are creating.

Cat the data file in /ramdisk and see how the data structure is named, this is the data Grafana should be reading. It needs the exact same syntax.

Read up online how the Grafana/Prometheus system works, that will aid you immensely.

Post your results here....
 

MrContigo

New Member
Joined
Oct 5, 2021
Messages
4
I'm here to share my success with my solar Garden Pi setup:)

Setup:
2 x 100W Newpowa Polycrystalline Panels
Renogy Wanderer 30A
Optima BlueTop AGM Battery
Raspberry Pi 3B+ running:
- BarkingSpider's SolarShed scripts (connected by RS232 to Wanderer)
- Motioneye camera streaming (connected to Day/Night Pi Camera module)
- OpenSprinkler irrigation controller (using the OpenSprinkler Pi board extension)
- node exporter is shipping to both a on board Prometheus db and a central one on my network
- Since it is also powered by solar and on the edge of wifi, I need to be able to see when it goes down and try to figure out why, so having both records makes it handy


wired the pi to Wanderer like:
RJ12 running through CAT-6 to: Sysly DB9 RS232 Serial to Terminal
then: USB to RS232 Adapter with PL2303 Chipset into the USB port of Pi

I am setting up a garden a bit away from my main house, and I didn't want to run electric out there to power a irrigation system. So I started down this path with a couple of panels, a Wanderer (cause they are cheap), and a battery. The idea is the solar setup would power: a Pi for irrigation timer, a garden webcam to monitor for critters/document the garden, the irrigation solenoids to open up, and a 12V on demand water pump that will turn on only when the sprinkler valves are open. I started getting things together and experimenting, but got frustrated with trying to diagnose everything blind. Then I came across this repo and man, I'm in data heaven 😇.

Thanks so much for putting this out there for all !! I only had to modify the dashboard for my preferences, but I'm extremely happy with this high tech, but reasonably priced set up. I still have to finish the rest of the setup and I will be reporting back on my progress. The camera is sitting inside the box with the battery and Wanderer, right now, but eventually I'll get it pointing out on the garden for a much better view.

Thanks again!!

View attachment 43541
Hi Mike - I have the same equipment. I almost have everything running, but could use some working scripts/config files to look at for reference. Any chance you could post yours for review so that we can customize?
 

MrContigo

New Member
Joined
Oct 5, 2021
Messages
4
Hi, looks like your 90% of the way there, the trouble is that Grafana is looking in the wrong place for the data.

Confirm that the Prometheus database is working and contains the data you are creating.

Cat the data file in /ramdisk and see how the data structure is named, this is the data Grafana should be reading. It needs the exact same syntax.

Read up online how the Grafana/Prometheus system works, that will aid you immensely.

Post your results here....
Thanks, I will look at those! :)

If I can make one suggestion for your cheat sheets.... I think it would be really helpful if you could use "--Start Script" and "--End Script" / "--Start CLI" and "--End CLI" comments to help those of use who are not really experienced with Linux stuff and make it a bit easier to follow.
 

shadowsteve

Solar Enthusiast
Joined
Feb 11, 2021
Messages
191
My setup is Rover 40A & 2x JBD 4s 150a BMS's. I used to have AGM's and monitored it all with a combination of a Pi2 and ESP8266.

I looked at this project at one point. Then the other one that uses ESP-01's for the comm's to the BMS but I didn't have any and the only quick place to get them and the programmer was a bit expensive (Canada). I initially tried the BT adapters but was getting a lot of data dropouts and I already had other nodes generating data (via UDP) on the RV network. I do have some Wemos D1 R1 but after the issues with SoftwareSerial & Wifi clashing I switched the ESP32's which I already had a few of (and work out cheaper if I'm not in a rush to buy them).

So now I'm where I have ESP32's reading from the BMS's and generating MQTT packets that feed through Telegraf to Influx and end up on Grafana dashboards.

I'm now looking for the best way to read from the Rover and generate MQTT packets that I can consume the same way. I have the RJ-USB cable that I used before on the Pi (it ran a variation of EPSolarServer). Is there a recommendation for that part or does an element of this project handle a Rover?

Also, what are people doing for viewing dashboards on mobile? A specific one laid out for the phone?

This is my current dashboard (BTW, the posts that have inserted dashboard images are hard to read on a hi res monitor with small text settings)
 

Attachments

  • Screenshot 2021-10-15 100955.png
    Screenshot 2021-10-15 100955.png
    402.2 KB · Views: 10

BarkingSpider

Carbon Lifeform
Joined
Apr 14, 2020
Messages
373
Location
Silicon Valley, CA
There is python code on my GitHub site (read this thread) to read from the Renogy via a PI.

It's so easy to make a new Grafana dashboard, just make your own to view on a phone with browser
 

MrContigo

New Member
Joined
Oct 5, 2021
Messages
4
Thanks, I will look at those! :)

If I can make one suggestion for your cheat sheets.... I think it would be really helpful if you could use "--Start Script" and "--End Script" / "--Start CLI" and "--End CLI" comments to help those of use who are not really experienced with Linux stuff and make it a bit easier to follow.

Finally got everything working - turns out the node_exporter was not installed properly. I did re-do everything 3 times, and tested each step.
I also used this as an aid as well which really helped make sense of things:


I'm working on documenting my steps as an addition to your cheat sheet so that I remember what I needed to do in the future. I also have Grafana and Prometheus running as a process using systemctl and run the node_exporter using rc.local. Very nice system indeed - thank you for this!!!
 
Top