Single-wire serial comms circuit

Status
Not open for further replies.

muhoo

Newbie level 1
Joined
Oct 14, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
I'm trying to interface to a MorningStar SunSaver MPPT solar controller. It has a single-wire half-duplex serial interface, using the MODBUS higher-layer protocols, but the physical layer is not RS485, it's just a one-wire serial, 9600/N/8/2. I have MODBUS software, and the specs for the coils and registers, and even some source code someone has created to interface to this particular device, compiled, run, and tested as well as I can without a physical interface to the unit. I've studied up on and understand the tricky timing issues with MODBUS and serial UART transmission buffers, but there is no RS485 bus to drive in this case, so I've factored that out. I can simply listen to my own transmission using my own UART, and I'll know from that when I'm done sending and when the unit is responding.

I want to interface with this using a standard serial port or microcontroller UART. Morningstar wants to sell me a $100 box to interface to the PC. I don't have $100 for this kind of thing. It seems crazy expensive for something so simple. In fact it costs more than the unit I'm trying to talk to cost to buy new!

I was thinking of just getting two optoisolators, and hooking them up, one with the LED facing the unit's single-wire line and the transistor facing the PC's RxD, the other with the transistor driving the single-wire line and LED facing the PC's TxD. The unit already gives 12VDc for powering one of the optoisolators, and I can power the other one off of RTS/DTR.

Then again, this seems too simple. What am I missing? Impedance/pullup issue? Do I need some kind of transistor on the that single wire?
 

Try to use a TTL open collector driver ..
Something like 7406 or even a single transistor (BJT or MOSFET) and maybe a pullup resistor ..
Then all device or'd outputs can coexist on one wire without damaging each other ..

IanP
:wink:
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…