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

About: Based in the UK. Primarily work in IT and enjoy all things electronic.

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