Using an RJ11 cable to connect to a Raspberry Pi 2 GPIO Jul 18, 2019 21:02:17 GMT
Post by retrodaredevil on Jul 18, 2019 21:02:17 GMT
Yesterday I received a Renogy Rover PG 40A charge controller and I was given the task of collecting data from it using a Raspberry Pi.
I was pretty angry, but not discouraged, to find that it didn't come with the RS232 to USB cable that was promised. So, I found an RJ11 cable with the 4 center wires/pins and soldered some connectors to it. The connections I made were solid and I tested they worked. I then tried to follow www.rototron.info/raspberry-pi-solar-serial-rest-api-tutorial/ that tutorial. Even though it was an RJ45 cable, I just ignored the first two and last two pins and treated it like a RJ11 cable since it was just 3 pins in the middle that were being used.
Once I did that it was too late. I measured the voltage on what I had actually connected and I realized I had sent 15V through the pi's GPIO. That part was pretty much my fault. I should have looked for a more up to date guide on how to connect it to a raspberry pi.
Does anyone have a wiring diagram that I can use to wire this to my pi. This: renogy-store.boards.net/thread/561/rs232-port mentions that it's TX/RX/GND/GND/+/+.
Is that correct? Can someone tell me the pins from left to right if I were looking at the controller mounted on a wall? Am I able to use an RJ11 (4 pins) instead of an RJ12 (6 pins) to get data, or do I need the two extra pins on the end?
Also, if there's a cable on amazon that someone has tested and uses that acts just like the cable that was SUPPOSED to come with the charge controller, I'd really appreciate a link.
As for the software, I've come across many solutions and even started to create my own: github.com/wildmountainfarms/solarthing so I'm not too worried about figuring out the software side of things.