Raspberry Pi Tracer Interface




Everything started with the fact that the MT-5 display wasn't what I really needed. I was in the need of checking the charging from the device using the battery: my trusty Raspberry pi (1 B at the time). I managed to stumble over this instructable (https://www.instructables.com/id/Use-Arduino-to-Com... and git project (https://github.com/xxv/tracer/). So the code and research isn't mine.

But this was made for the arduino, (why use a USB and arduino when you have the capability on the raspberry pi?)

So i bought the EP solar MPPT solar controller from eBay + MT-5 display. That got me thinking that it should be possible to collect and store the data for later use. Said and done I started to search after the protocol specs and found what I needed here [Protocol] and as a nice bonus there where some code for arduino and python.

So with this information and code this was quite a easy task.

The result

Step 1: (Optional) Try on a Arduino.

You might consider this step to make sure you have hooked up everything the right way. Since the arduino is a little bit more forgivning then the raspberry pi (only 3.3v and will die if you hook it up wrong).

On my RJ45 cable it was:

arduino pin 10 to Full blue

arduino pin 11 to green/white

Arduino pin GND to orange

Double and triple check this before you hook it up, there are some 12v pins!

Arduino code: Arduino code

Does it work?

Great! Go on to the next step.

Else check your connections

Step 2: Step 1: the Hardware

You will need:

1. raspberry pi with appropriate cables and case.

1,5 A SD card 8 gb microSD for the newer ones

2. A RJ45 cable that you don't like (but is working)

3. Connectors to hook the 2 together. I lab with ( http://www.ebay.com/itm/40PCS-Dupont-wire-jumper-c... )

4. A Tracer MPPT controller (or equiv.)

5. 12 v battery

6. Solar panels

Step 3: Making the Cable

Follow the pictures.


Black= GND

Step 4: Step 2: the OS

Step 5: Step 3: the Software

When first booting Expand filesystem

if you allready have a active Raspberry Pi

start "sudo raspi-config"

Choose 8

Then A8

And No ("Nej" is no in swedish)


Do a

git clone https://github.com/xxv/tracer.git

cd tracer/python/

python query_demo.py

Step 6: Step 4: Troubleshooting

Nothing happens

Most common reasons are:

switched TX/RX check connections.

to be continued (please use comments)

Step 7: Modifications

I made a small testscript that you can put in the chrontab

2 People Made This Project!


  • Tape Contest

    Tape Contest
  • Arduino Contest 2019

    Arduino Contest 2019
  • Trash to Treasure

    Trash to Treasure

16 Discussions


4 months ago

Can the output from the tracer be easily split so that I can still use the MT50 as well as the data being sent to the Raspberry Pi, or is this going to be very complicated for a complete beginner to achieve?


7 months ago

It looks like EPEVER changed the pinouts of the RJ45 plug, I just receive it and by the instruction they look like this :

The RJ45 interface pin define is shown below:

1 Power supply output +5V

2 Power supply output +5V

3 RS-485-B

4 RS-485-B

5 RS-485-A

6 RS-485-A

7 Ground

8 Ground


1 year ago

Does someone know how I can let the Raspberry PI execute this command at a certain time interval and save the data on an SD-Card?


2 years ago

thanks for a well detailed tutorial. Am trying the same setup and when ever i run the query_demo.py i get this error.

Traceback (most recent call last):

File "query_demoMOD.py", line 43, in <module>

result = t_ser.receive_result()

File "/home/pi/tracer/python/tracer/__init__.py", line 128, in receive_result

if read_idx < len(self.sync_header) and b[0] != self.sync_header[read_idx]:

IndexError: bytearray index out of range

How do i resolve this issue please.

4 replies

Reply 1 year ago

Hey Dok, did you get this working ? I'm getting :

File "/home/pi/tracer/python//tracer/__init__.py", line 128, in receive_result

raise IOError("Error receiving result: invalid sync header")

IOError: Error receiving result: invalid sync header


Reply 1 year ago

I'm sad to say I corrected this issue by changing my Tx and Rx wires, which I had backwards. Good luck!


Reply 2 years ago

Hi, I am trying to connect directly to Raspberry Pi using USB Serial converter. I am getting the same error as the person above. I am assuming it is a ttyUSB setup issue. Does anybody know how to solve? Thanks


2 years ago

Sorry jensah I didn't see your link to the protocol page which goes into great detail the wiring diagram. I do beleive I have the correct wiring and setup on the hardware side. After research I think there has been updates to the rasberry OS and disabling of serial ports so I will try to fix this first. As of now I'm just trying to see any transmittion bytes from the tracer to the raspberry. Currently I can't see any logs of such entry, therefore the script does not do anything which is to be expected :)


2 years ago

I'm curious what are people using this for, are you able to get it into something such as domoticz or pvoutput?


2 years ago

Hey, any chance of modifying the xively output for PVOutput.org? They just want CSV seperated data fields.


2 years ago

Hey, any chance of modifying the xively output for PVOutput.org? They just want CSV seperated data fields.


3 years ago

Did you have any issues with ttl to GPIO (+3.3v) voltage difference? There care differing reports on the voltage from TX to ground (5v vs 3.3v). There are reports of people blowing up their Pis - for example https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=54098


3 years ago on Introduction

This is very helpful. Thank you for sharing! I hope we see more from you in the future.