Giter Site home page Giter Site logo

jorgendk / epsolar_tracer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexnathanson/epsolar_tracer

0.0 0.0 0.0 4.65 MB

Various implementation for communicating with an EP Solar Tracer charge controller

Home Page: http://www.solarpowerforartists.com

Makefile 0.92% C 6.43% Python 7.88% C++ 62.74% Ruby 11.63% Processing 10.41%

epsolar_tracer's Introduction

EPSolar_Tracer

This repo has a few different implementations and tools for communicating with EP Solar Tracer charge controllers. This has been tested with Tracer model 3210A, but should work with any EP Solar Tracer model that uses Modbus RS485 and MT50 displays.

There are 2 different Modbus libraries for Python that work well, pymodbus and minimalmodbus. Pymodbus is better to use because it has more options. libmodbus is a library for C that others have used with Raspberry Pis.

Because the rs485 converter to USB port implementation for the Raspberry Pi relies on version specific drivers, the Arduino implementation might be more future proof.

Raspberry Pi Mobel 3 B+

Via USB port

This works with a USB to RS485 converter (ch340T chip model).

I was not able to get this to work with the manufacturer's recommended cable (Model: CC-USB-RS485-150U) because the EXAR USB drivers would not work with this version of the Raspberry Pi. A number of other people have successfullly used that cable and EXAR drivers with earlier Raspberry Pi models. (EXAR drivers: https://www.exar.com/design-tools/software-drivers)

wiring

RJ45 blue => b
RJ45 green => a

ch340T specs

install steps

Misc. Linux port identification commands

  • Lsusb
  • dmesg
  • ls /dev/* | grep XRUSB
  • python -m serial.tools.list_ports
  • dmesg /dev/ | grep tty
  • sudo cat /proc/tty/driver/serial

Troubleshooting

If you're trying to use the EXAR driver set the port to the right permissions.

  • sudo chmod 777 /dev/ttyXRUSB0

Starting the data logger on boot

This lists a few simple solutions and some trouble shooting steps:

The issue I ran in to was that the modules my program needed to import were tied to the 'pi' user. To get around this I had to change the user in the rc.local file before running the script. (This solution came from https://raspberrypi.stackexchange.com/questions/78141/python-script-fails-with-importerror-when-run-from-rc-local) You might also need to mess with the file permissions to make the script executable and if you're piping your output to another file you may need to make that file writable.

  • sudo -H -u pi python [my script]

Via GPIO

This method uses a Max485 and a 5v to 3.3v level shifter. I have not realized this version, but it should be doable if you need to free up USB ports for whatever reason.

Some GPIO resources

Arduino Uno & Max485

This works well. It's a pretty easy implementation. I'm using software serial to free up the USB port for serial communication with a computer or whatever you want. In the future I may build it out as a library.

arduino max485

You can monitor the serial port from the Arduino IDE or serialTest.py (serialTest.py is a simple alternative if you can't get the Tracer to communicate directly with the Raspberry Pi)

This uses the Modbus Master library. https://github.com/4-20ma/ModbusMaster

Win 10 PC

This is the simplest implementation. It uses the manufacturer recommended RS485 to USB cable (Model: CC-USB-RS485-150U). This also worked with ch340T model.

In device manager right-click on the port and select properties. In the port settings tab make sure RS-485 is checked and the BPS is set to 115200. The other settings I used were databits = 8, parity= None, stopbits = 1

Both minimalmodbus and pymodbus libraries work well with my PC.

Addition Resources & Prior Work

https://github.com/kasbert/epsolar-tracer
http://www.solarpoweredhome.co.uk/
https://medium.com/@jcrbcn/installing-the-exar-usb-driver-on-the-raspberrypi-for-teknic-sc-hub-39de533f0502

Links

Tracer charge controller https://www.epsolarpv.com/product/3.html

Tracer Modbus Protocol http://www.solar-elektro.cz/data/dokumenty/1733_modbus_protocol.pdf

Data Logging

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.