pymate
pymate copied to clipboard
Is wiring using a USB to RS232 cable doable?
Hi,
I'm slowly doing research into your project to figure out if it'd be worth it for me to get the extra data that'd be possible if I wasn't going through the RS232 DB9 port on the Mate2.
Two years ago when I was creating a cable for another charge controller (Renogy Rover), I used a simple USB to RS232 to DB9 cable then used the pins on that DB9 cable to connect to the charge controllers Rx, Tx, and GND. I was wondering if I'd be able to do the same thing here, the idea being that I wouldn't connect to my PIs GPIO at all.
Can what I just described above be done, or is there more conversion that needs to takes place? From what I could tell I just needed to communicate with outback devices using RS232. As long as my RS232 serial adapter supports -24V and 24V, I should be able to use it, correct?
It might work, but you'll need to invert the data since RS232 treats -V as a logic '1'
Take a look at this reverse-engineered schematic of the MATE:

I think there's enough protection circuitry there that it wouldn't be harmful - anything below 0V should be clamped by D10/D13, and then anything higher than 50% of VBat will be treated as a logic '1'.
However be very careful of ground loops / isolation! The GND in that schematic has a direct path to the battery, so if your PC is connected to some kind of mains circuit that could cause surges. Best to have an opto-isolator in the path. (The MATE has internal opto-isolators which is why it's RS232 port is safe)
Just a weird observation here, but I trust pin 7 of the LM393 (RX data) isn't shorted to ground, as shown from pin 8, 13 and 14 on the IC 74HC257D Mux...otherwise nothing will ever be passed on from pin 9 and 12 because the input will always be 0.
On Thu, Jul 8, 2021 at 2:35 AM Jared Sanson @.***> wrote:
It might work, but you'll need to invert the data since RS232 treats -V as a logic '1'
Take a look at this reverse-engineered schematic of the MATE: [image: image] https://user-images.githubusercontent.com/584458/124899043-d6679a80-e033-11eb-8f12-31aa538d35e3.png
I think there's enough protection circuitry there that it wouldn't be harmful - anything below 0V should be clamped by D10/D13, and then anything higher than 50% of VBat will be treated as a logic '1'.
However be very careful of ground loops / isolation! The GND in that schematic has a direct path to the battery, so if your PC is connected to some kind of mains circuit that could cause surges. Best to have an opto-isolator in the path. (The MATE has internal opto-isolators which is why it's RS232 port is safe)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jorticus/pymate/issues/26#issuecomment-876289452, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL2U6JKUHMHH3RP6YRINV3TWVWOLANCNFSM477Y73HQ .
Yeah that's definitely an error in my transcribing process - it wouldn't make sense for pin 13/14 to be connected to GND. It's more likely that 4B is connected to GND, and 4A is connected to the LM393 😊