I have attached below what I wish to do.
Which Raspberry model would be most appropriate?
Do I need additional hardware between my PC and the Raspberry?
What software would I need on the PC to communicate/program the Raspberry?
Will this configuration allow me to access the Charge controller indirectly?
Is there a preference for TTL shields?
Any and all suggestions would be appreciated.
Thanks Barry
You have an Arduino on your picture - is that where you are thinking of putting a raspberry pi? You might be better off using an ESP32 to communicate rs485 to your controllers ? That has built in wifi.
You could have the ESP32 send out the data it gets as mqtt . Then you could use a raspberry pi to collect that mqtt and do whatever.
You can get a raspberry pi zero 2 W for $15 and see if it does what you want it to do. You set it up to work headless meaning that you would get into it via ssh from a terminal on your windows computer if that is what you use. Or if you want to get into it via full web interface you would set it up for VNC Viewer from your windows computer . So you don't need any screen or keyboard on your raspberry pi - just have to set it initially to connect to your router. The Pi Imager will let you set it up with your wifi before you even boot it - that is a nice feature that saves steps on how you used to have to do it .
Look on Adafruit for the Pi Zero 2 W. Of course you will also need an SD card and nice to have a case that will heat sink it. You can get a heatsink case on aliexpress for $3 . Or look on Amazon for on Vilros or Canakit I think they sell starter kits.
I want to clarify that if you look at these don't confuse the older pi zero w with the newer and better pi zero 2 w .
Larry
You have an Arduino on your picture - is that where you are thinking of putting a raspberry pi? YES
You might be better off using an ESP32 to communicate rs485 to your controllers ? That has built in wifi. I would prefer not to use wifi for that connection. For hardwire, are the two boards shown appropriate? I am not sure which is more appropriate.
You could have the ESP32 send out the data it gets as mqtt . Then you could use a raspberry pi to collect that mqtt and do whatever. The data reads and writes to/from the Charge controller would be in the order of once a second or two for a few bytes of data/commands.
You can get a raspberry pi zero 2 W for $15 and see if it does what you want it to do. Looks good.
You set it up to work headless meaning that you would get into it via ssh from a terminal on your windows computer if that is what you use. I intend to connect the Raspberry to my PC via an open port on my router. Does that mean SSH?
Or if you want to get into it via full web interface you would set it up for VNC Viewer from your windows computer . Only need local access.
So you don't need any screen or keyboard on your raspberry pi - just have to set it initially to connect to your router. I think by pre-programming an SDcard?
The Pi Imager will let you set it up with your wifi before you even boot it - that is a nice feature that saves steps on how you used to have to do it . Is Pi Imager the only software necessary to both start and program the Pi Zero 2 W ?
Look on Adafruit for the Pi Zero 2 W. Of course you will also need an SD card and nice to have a case that will heat sink it. You can get a heatsink case on aliexpress for $3 .Or look on Amazon for on Vilros or Canakit I think they sell starter kits.I want to clarify that if you look at these don't confuse the older pi zero w with the newer and better pi zero 2 w . Understood.
Just found out that my nephew is donating a raspberry pi 3. I will investigate specific model when it arrives.
Thanks again for your comments. very helpful.
get the pi imager from pi website.
The pi imager will download the right pi os for your pi .
Yes it will all work on your local network . You just go to the ip assigned to it by your router.
ssh is a secure command line that you use a terminal program to get into .
VNC gets you into the full web screen of the pi .
Look on adafruit - they have good tutorials . Or Explaining Computers on youtube - he makes very good beginners videos with all the steps you need to know.
larry
There are different ways to get Classic data in a micro computer. The easiest for me is the Raspberry Pi with Ethernet link to the solar charge controllers and the use of Python. You can easily get data from the controller to the computer with pymodbus directly or use simplified modules catered for the Classics. Take a look at what I published yesterday on GitHub: https://github.com/qcda1/MidniteClassic
If you want MQTT interface, this will do: https://github.com/ClassicDIY/ClassicMQTT
Now for writing to the registers, I'm thinking of adding this to my module. You can still use pymodbus to write to the Classic's registers. :)
To display data to users, I believe a web interface is the most versatile for the complexity. Any browser will be able to view data and pretty much from any device. It allows to use a headless installation making more resources available for my programs vs an OS GUI. Use of VPN such as ZeroTier simply allow to view data from outside your home network.
Here's a sample of how I use my collected data:
I feel pretty confident in saying that I can run Modbus for 15ft on 4wire (use 4 of 6) RJ12 untwisted flat telephone cable. I seem to remember running 56k over phone lines. 56k is about 8000baud and MidNite does 9600 baud.
Am I right that it should not be an issue for 15ft?
Quote from: Barry Fields on January 27, 2025, 10:35:42 PMI feel pretty confident in saying that I can run Modbus for 15ft on 4wire (use 4 of 6) RJ12 untwisted flat telephone cable. I seem to remember running 56k over phone lines. 56k is about 8000baud and MidNite does 9600 baud.
Am I right that it should not be an issue for 15ft?
I have run modbus on rs485 that far for a meter. Although I used a piece of cat 5 cable if that makes any difference .
larry
Quote from: Barry Fields on January 27, 2025, 10:35:42 PMI feel pretty confident in saying that I can run Modbus for 15ft on 4wire (use 4 of 6) RJ12 untwisted flat telephone cable. I seem to remember running 56k over phone lines. 56k is about 8000baud and MidNite does 9600 baud.
Am I right that it should not be an issue for 15ft?
Do you mean running Ethernet over flat phone wire?
Quote from: qcda1 on January 29, 2025, 10:20:34 AMQuote from: Barry Fields on January 27, 2025, 10:35:42 PMI feel pretty confident in saying that I can run Modbus for 15ft on 4wire (use 4 of 6) RJ12 untwisted flat telephone cable. I seem to remember running 56k over phone lines. 56k is about 8000baud and MidNite does 9600 baud.
Am I right that it should not be an issue for 15ft?
Do you mean running Ethernet over flat phone wire?
I think he is talking about running RS485 modbus communications.
Larry
I messaged Raspberry pi with this question:
I wish to use my Win10 64bit desktop to do all programing to download to my raspberry PI3 via my router (hard wire not wifi). I am unsure exactly which Raspberry PI Imager I should download.
They replied:
We are unable to offer individual support. Instead, posting to our discussion forum is the recommended option; many of the engineers who work at Raspberry Pi are very active in answering questions there, and there are thousands of Raspberry Pi experts who are waiting there to help beginners and advanced users alike.
It appears you guys are more helpful.
Barry ,
what kind of programming are you talking about ?
A Raspberry Pi is just a linux computer.
You can get into it's desktop either by plugging it into a monitor . Or you can use your windows computer to get into the pi either by ssh via a terminal program, or to the pi's desktop via VNC which has to be set up on both the Windows computer and on the Raspberry Pi.
It isn't too complicated and there are plenty of youtube videos showing how to do that.
The Raspberry Pi imager is a Windows program used to flash the Raspberry Pi OS to an SD card which you then put in the Pi to make it work. The imager tool will ask which Raspberry Pi board you have and select the right OS image for it and then flash it to the SD card.
Once you get on the Raspberry Pi , I am not sure what kind of programming you are wanting to do ? I am a bit of novice but you can write python code and run them. You can also use node red which may be a bit easier and more intuitive for what you want to do. Of course you can also run Node Red on your windows computer.
All this stuff of course has a learning curve if you never used it before.
The other options are to use an Arduino to control your stuff. The Arduino might be easier to start with since it has lots of in out pins of analog, digital , pwm , rx tx etc. The raspberry pi is more limited on those things . The other option is to use an Esp32 .
For both the Arduino and Esp32 you can use the Arduino IDE program which you can write the code and debug it a bit , and then download to the Arduino . it is easy to modify your code , and to get and install libraries for different things.
I am no expert on any of those things, but know how to get around and have dabbled. I also spent and still do spend lots of time trying to figure out errors . Some of them can be a rabbit hole of time spent finding a solution by reading documents, watching youtube videos , etc. The good part of Arduino is that there is a lot of support for it, and the libraries have example code to run which you can then copy and paste to use in your project, or find someone else's project and copy the parts you need.
I think from the sounds of what you want to do you might be better off starting out with Arduino.
The Arduino IDE also works with Esp32 boards which can also do a lot of things.
Larry
Barry ,
Take a look at this video and it will give you an idea of arduino coding , but more importantly how you can use AI tools to help you with the code.
https://youtu.be/Va2XHyBQLoM?si=sO-Ig8-HsKgg5T8r
Larry
You may also want to look through this topic of a project where an Arduino was used to write values to a Classic via modbus to pwm some of the power. I may have described it wrong . It had something to do with charging a battery on a car but the discussion of the Arduino code should be of help to you .
https://midniteftp.com/forum/index.php?topic=2511.0
Larry
Thank you Larry,
Right now I am in ABSORB mode. A lot to process.When I go to float I will make some sort of comment. :)
I am considering changing to Arduino.
I am looking at the following items:
https://www.amazon.com/Arduino-A000066-ARDUINO-UNO-R3/dp/B008GRTSV6/ref=sr_1_1?crid=1TCRRRSX7A2HS&dib=eyJ2IjoiMSJ9.MazmhFfn-DF8W5oyX_S-tNl6onbpYQvEhqFzrIDbT0b1DLx4YepwiC0DGd58SxJla76HnS0MBDNdP7NxVF_tVUyJBEECT2ClD8bL6y3c3GhqGFem-ovl6rCk3GgeE8GMOfL5MHy4CJ0x4j2Burah5ozbTWPKGBqXyljE8SbTdhdjnCNNZidf_okVrAUbtPkwxOQkSkHYIx2sSvjl_6lM0z__Jj6O73Re7gIP01E78WY.ghzdBSjtv1HEqlhQnTA1b4P0ZAXVGcWO-plXq9wYwrM&dib_tag=se&keywords=Arduino%2Br3&qid=1738284327&sprefix=arduino%2Br3%2Caps%2C108&sr=8-1&th=1
https://www.amazon.com/Ethernet-Development-ARDUINO-ETHERNET-SHIELD/dp/B011PCMMM0/ref=sr_1_4?crid=3KU4BUMB6KAHL&dib=eyJ2IjoiMSJ9.FE0RX3IqxUp7XOXeiZg4aLUXHzWH6jrOh2jd0I2fCU3lBNTrr3QmCRWwDoBFaAnSuzbE3x6KFc0jtI627vt5R5czL7OgkanZjhUVRn7mLxx47wajJaZtec3oxpYCPcrUdgrwFW0-GmymCI5vL0tTmDP0FErEksMV2I4Mmw6ePg_e8VosG6GRwZr-Hpib6GadB3RfMYf7EolfeUJZuNlb4G8W-MrLr7IWGUu5c0KYHvUiFTzFmHxSLGq5EYk102H-nOmN28jBAtp2MdDavlldJcY5LI8atr31D1YEPv4T478DtcPZ2WBNR0dYq6lVpJKXDgJ2HNBbZIJew5uLqL0ZpE1Z-Bxas90UOsy4CAwY16s.-LJFM2O6IB-iabEDw8U5WQBwXD0WpCz1bZRL2W2UrDw&dib_tag=se&keywords=arduino+uno+r3+ethernet+shield+sd&qid=1738284440&s=electronics&sprefix=arduino+uno+r3+ethernet+shield+sd%2Celectronics%2C80&sr=1-4
This should satisfy the following needs:
SD storage
router connection
SPI port
MODBUS port (via e3232module +5v from Arduino)
Hope I have this partially correct.
Thanks for your help
Barry
You may want to hold off on that Arduino R3 since they just recently came out with the Arduino R4 and one model has wifi so that would get rid of the need for your ethernet board I think
https://news.sparkfun.com/7335
Larry
Thanks Larry but I would rather not use wifi.
Do ya think what I have posted will do what I want?
Thanks
barry
I have no idea if what you want to do would work or not with the arduino.
I guess you will just have to start experimenting and find out .
I don't want to confuse your efforts here, but if you never used Arduino , the place I would start is to just get a cheap Arduino R3 clone and play around with it a bit via the Arduino IDE using beginners example code projects that are built into the Arduino IDE. Then move on to the bigger and better things after you know how to load , run, and debug code using the Arduino IDE. You can get the Arduino R3 clone boards for about 8 bucks and there are lots of various prototype shields, sensor kits, lcd display boards, etc that don't cost too much either. It is all fun.
example here is R3 board with proto board, sensors, etc for $37
https://www.amazon.com/ELEGOO-Project-Tutorial-Controller-Projects/dp/B01D8KOZF4?ref_=automaticdeals_bs_dp
Larry
This is what I have in mind.
Any comments or suggestions would be appreciated.
Thanks Barry
Hello! Any progress in the Absorb phase? The drawing looks ok. Still, it is not obvious to make a comment without knowing what the goal or objective is. Personally, if it was for something single task and stand alone with an SD card for data acquisition, the Arduino would be on the top of the list. But if there is remote programming and telecommunication interfacing to multiple devices with some monitoring, I would go with a Raspberry Pi.
On the wiring diagram, You use a TTL to RS485 interface to talk Modbus to the Solar Charge Controller. Not sure I saw the type of SCC you have. If it is a Classic, where is the RS485 interface port on the SCC? The only Modbus interface I can see is the MNGP interface that is RS232 and not RS485. The only communication link I can see is the Ethernet link for Modbus communications.
thanks for your input.
My Charge controller is a Renogy rover 60A. (equivalent to MNMPPT60DIY)
The Modbus connection is RJ45 on the controller.
Contact with Renogy engineering has verified connect-ability and commands required to both monitor charge parameters and force absorb/float conditions.
Goal is to place controller absorb/float mode under Arduino 2560 control based on SOC determined by stabilized float current (stabilized float current = 100% SOC).
SD storage of historical endamps, float currents and individual bank peak discharge currents. Remote hardware will derive most data and send to Arduino via I2C on Arduino request. Fastest sample time = 30seconds.
Quote from: Barry Fields on March 26, 2025, 01:06:50 PMthanks for your input.
My Charge controller is a Renogy rover 60A. (equivalent to MNMPPT60DIY)
The Modbus connection is RJ45 on the controller.
Contact with Renogy engineering has verified connect-ability and commands required to both monitor charge parameters and force absorb/float conditions.
Goal is to place controller absorb/float mode under Arduino 2560 control based on SOC determined by stabilized float current (stabilized float current = 100% SOC).
SD storage of historical endamps, float currents and individual bank peak discharge currents. Remote hardware will derive most data and send to Arduino via I2C on Arduino request. Fastest sample time = 30seconds.
Wizbandit,
Sorry for they delayed response. Is the MNCOMBOX a real thing? I thought it was canceled.
I have been in communication with Renogy discussing a force float/force absorb method. I have attached excerpts from that communication.
If the COMBOX is real, could it include this flexibility.
If the COMBOX is not real, I am hoping you might be of assistance once I get to the point of actually programming an ARDUINO to perform all that functionality.
I have been busy designing the remote hardware to generate bank discharge and charge currents. So far so good.
Again, I do appreciate you.
The MNCOMBOX was cancelled do to lack of resources to commit to a fully finished product. I still fiddle with optimizing the code and slowly porting it from an Orange Pi to a Raspberry Pi, in my spare time which has become less frequent. The Raspberry Pi running Linux and using Python IMHO is easier than ARDUINO but that's just my opinion. I bought an ARDUINO experimenters kit full of dodads and sensors but never found the time nor ambition to set it up and learn it.