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

<p>thanks for a well detailed tutorial. Am trying the same setup and when ever i run the query_demo.py i get this error.</p><p>Traceback (most recent call last):</p><p> File &quot;query_demoMOD.py&quot;, line 43, in &lt;module&gt;</p><p> result = t_ser.receive_result()</p><p> File &quot;/home/pi/tracer/python/tracer/__init__.py&quot;, line 128, in receive_result</p><p> if read_idx &lt; len(self.sync_header) and b[0] != self.sync_header[read_idx]:</p><p>IndexError: bytearray index out of range</p><p>How do i resolve this issue please.</p>
<p>getting the same thing on mine</p>
<p>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</p>
<p>I'm curious what are people using this for, are you able to get it into something such as domoticz or pvoutput?</p>
<p>I just released a new library for Arduino which supports both querying as well as controlling the Tracer MPPT, available here: <a href="https://github.com/compugician/arduino-tracermppt" rel="nofollow"> https://github.com/compugician/arduino-tracermppt</a><br></p>
<p>Hey, any chance of modifying the xively output for PVOutput.org? They just want CSV seperated data fields. </p>
<p>Hey, any chance of modifying the xively output for PVOutput.org? They just want CSV seperated data fields. </p>
<p>Thanks for sharing this, works very well! (30A MPPT controller, Raspberry Pi B+)</p>
<p>Great that it works for you. </p>
<p>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&amp;t=54098</p>
<p>This is very helpful. Thank you for sharing! I hope we see more from you in the future.</p>

About This Instructable




More by jensah:Raspberry pi Tracer interface 
Add instructable to: