corbinbs / solarshed

A Python library to help monitor solar charge controllers typically used in off the grid applications.
MIT License
85 stars 24 forks source link

RJ12 to USB cable in the part list? #16

Open cyrils opened 2 years ago

cyrils commented 2 years ago

Hello, this sounds like a great little project for monitoring Renogy performance. However I was wondering what did you use for connecting RJ12 to USB port of pi? I searched online but did not find any standard rs232 cable built for this purpose. It would be great if you can add the cable used to the part list.

pedrosk commented 2 years ago

+1 please give more detail how you connected Pi to the the controller.

Appreciate

sashkab commented 2 years ago

Based on this post on diysolarforum.com, following PINs are used:

I did not use USB, but instead used Pi's GPIO with max3232 RS232 to TTL converter.

Oh, and I connected to Renogy Wanderer.

cyrils commented 2 years ago

Thanks, I made a DIY cable, but lately I found this https://www.amazon.com/dp/B07JGRJR4V and I tested it and found working with Renogy Wanderer. Just that I had to use device id as 255, ie:

RenogyRover('/dev/tty.usbserial-D309XXXX', 255)
jova1971 commented 2 years ago

just a clarification for anyone else following along, there are a few Renogy Rj12 TO DB9 connection images out there that are wrong. as you look at the RJ12 Plug and see the gold pins the numbering starts from left to right 1 - 6, pin 1 is the Renogy's TX pin, pin2 Is the Renogy's RX pin, pin 3 is ground. you should get about 5.6 V when you test TX and GND Renogy TX 1 ==> DB9 Pin 2 RX Renogy RX 2 ==> DB9 Pin3 TX Renogy GND 3 ==> DB9 Pin 5 GND

KenwoodFox commented 2 years ago

Thanks for all the pinouts and information, those chips look great! If anybody needs a schematic rep i think i've compiled @jova1971 and @sashkab 's input, ill report back when i get the prototype and confirm :) image

truncj commented 2 years ago

Just wanted to share a working pre-made cable you can buy on Amazon.. tested it out and worked great!

jim0020 commented 8 months ago

Just a reminder, as this cost me some time to figure out, you may need to find the correct modbus slave address to get this to work.

RenogyRover('/dev/ttyUSB0', 1)

For me, I had to change the 1 above to a 16.