Wireless Solar Charge Controller Monitor ( RS485 to WiFi Using ESP 8266)

22K3312

Intro: Wireless Solar Charge Controller Monitor ( RS485 to WiFi Using ESP 8266)

I've two solar charge controllers from EPsolar or EPever as they are sometimes known. They are great and have a COM port for monitoring the performance of the panels and state of the battery etc but it's a pain to drag the laptop out and hook things up just to check the status. The COM port is a RJ45 port which uses the RS485 standard so i investigated commercial offerings but they were extremely expensive and as this was just to make things convenient for a personal home product i didn't fancy paying £50 out for the privilege.

I began to investigate doing this myself and using some off the shelf components and custom firmware from the guys at esp-link i was able to come up with the design you can see in the picture.

STEP 1: Flashing the ESP-8266


For the ESP-8266 i used a custom firmware

This puts the ESP-8266 into a transparent bridge mode so anything which is pushed to the RX or TX pins can be transmitted across WiFi. This allows connectivity so long as your in WiFi range. As your drawing power from the COM port it's feasible you could use a longer length of network cable to get it into a location for better WiFi reception if required. Flashing requires using the nodemcu software and flashing three seperate files onto the ESP-8266 at different offsets as per below

boot_v1.5.bin to 0x00000

blank.bin to 0x3FE000

user1.bin to 0x01000

I've attached a video showing the flashing process on windows with nodemcu and a Serial to USB adaptor based on the CH340 chipset. This also gives a short overview of what i'm trying to achieve and the process.

Links

NodeMCU

ESP-Link Firmware

STEP 2: The Build


The components i used were

USB to RS485 http://www.ebay.co.uk/itm/322068807457

UART to RS485 http://www.ebay.co.uk/itm/322068807457

3.3v step down http://www.ebay.co.uk/itm/172228682281

Epever Tracer3210A http://www.ebay.co.uk/itm/172228682281
EPEver Landstar 10A http://www.ebay.co.uk/itm/282130150252

I'll attach a fritzing diagram soon but all connections were explained pretty well in the first build i think. I've attached a video of me soldering the project together which I've sped up as it ended up quite long in the end. If anyone is interested in the video at normal speed please leave a comment and if there is enough interested i'll upload it to youtube.

STEP 3: Com Port Redirector and Testing.



This is the complete project and the final software component configuration of the virtual serial port adapter.

I've now put up a new youtube video showing a different application called HW Virtual Serial Port which is must easier to setup and more reliable.

https://www.youtube.com/edit?video_id=dKZ35Enao4M

Below are the commands used for the redirector as shown in the video. It's feasible that this adaptor could also be used for other RS485 products if the pinout is the same on the RJ45 connector. Overall i'm really happy with this and i can fire the software up at any time to check the status of the panels and battery. Next will be to get my raspberry pi server to poll this info so it's constantly being logged.

Manual and software download http://www.epsolarpv.com/en/index.php/Technical/d...

ESP-Link downloads https://github.com/jeelabs/esp-link/releases

NodeMCU firmware https://github.com/nodemcu/nodemcu-firmware

Freeware Comport to TCP redirector

https://sourceforge.net/projects/com0com/files/?s... https://sourceforge.net/projects/com0com/files/co...

Commercial com port to TCP redirector http://astrogeeks.com/AstroGeeks/COM2TCP/download...

Commands to use in com0com pcsetup install PortName=COM12 PortName=CNCB0 update

Com2tcp command line com2tcp.exe --baud 115200 --ignore-dsr \\.\CNCB0 192.168.0.116 23

8 Comments

Yes, a video in normal speed is better to understand
Gday I have a solar controller that I just want to have a look at whats coming out of it . Ive got heaps of arduinos and Max485 Rs-485 Module Ttl To Rs-485 Modules but want to run a twisted pair through wall and plug into USB on desktop . Can I do that? have you got time to guide me a bit?

Hi Colin,

Are you using plain vanilla ESP Link, or some variant of it?

From what I understand you wouldn't need to adapt it, or..?

Hi I'm using straight ESP link,i have seen mention of RS485 support on the ESP link but that was after i made the instructable/wifi adaptor. Also i've not looked over the documentation but not sure how it can support it natively without an RS485 to serial adaptor in place.

hi mate any chance of a copy of the build in normal speed i think my wiring is wrong it hard to see so would like to here your comments.

im new to this both solar and electronics etc

thanks Lee

cockney1776@gmail.com

Just an update guys i found a simpler way for the software side https://www.youtube.com/watch?v=dKZ35Enao4M

Great hack!. I dit it too, It took me a while to figure out the ground problem too. It would be great for other users to put it the description too or adding the diagram. It works really well. Now I want to use one of the python epsolar libs to try to get data and push it to my emoncs web, under my centos linux home server.

did you get this to work? I wan to do the same to push this to a web server?