non-picaxe related: opto-isolated serial interface cable

Mad Professor

Senior Member
Good day all.

I hope you don't mind me posting a non-picaxe related question.

I am trying to design and build a serial interface cable to connect my PC or laptop to a control board.

The control board in question has 6pins on the serial connection.
Pin1 - (RxD Positive).
Pin2 - (RxD Negative).
Pin3 - (TxD Positive).
Pin4 - (TxD Negative).
Pin5 - (Ground).
Pin6 - (+12 Output).

Looking at the control board Pins1&2 are connected to a CNY17-3 Optocoupler via a 100R resistor.
Using my scope, when the control board is 1st powered on Pins3&4 have a 0-12volt pulsed signal output, for about 10sec.

I also scoped the voltage range of the com-port on my pc, and it swings from -12 to +12volts.

I have not worked with serial hardware much.

Can anyone here please advice how I should go about designing and making this opto-isolated serial interface cable?

Thanks for your time.

Best Regards.
 
Last edited:

hippy

Ex-Staff (retired)
Sounds like an RS485-style line driver for TX and an opto for RX may do the job but the first thing to do IMO would be to completely reverse engineer the circuit so you know what it is and can get a clearer understanding of how it probably works.

Information about what the control board is may get you more specific help.
 

inglewoodpete

Senior Member
Good day all.

I hope you don't mind me posting a non-picaxe related question.

I am trying to design and build a serial interface cable to connect my PC or laptop to a control board.

The control board in question has 6pins on the serial connection.
Pin1 - (RxD Positive).
Pin2 - (RxD Negative).
Pin3 - (TxD Positive).
Pin4 - (TxD Negative).
Pin5 - (Ground).
Pin6 - (+12 Output).

Looking at the control board Pins1&2 are connected to a CNY17-3 Optocoupler via a 100R resistor.
Using my scope, when the control board is 1st powered on Pins3&4 have a 0-12volt pulsed signal output, for about 10sec.

I also scoped the voltage range of the com-port on my pc, and it swings from -12 to +12volts.
I presume you mean the pin6 is a 12v input.

Is the voltage you are applying to the opto turning the opto on or off in the serial idle condition? Ie, Connected to the PC, with no data flowing, is there a voltage (Eg 10v) across the 100ohm resistor? If so, the output should show close to 0v.

Unplug the serial line from the PC and check the output. It should be close to 12v. The optoisolator inverts the data.
 

Mad Professor

Senior Member
inglewoodpete: Pin6 is a +12volt output.

You can use a programming console or use a serial cable and pc software to update settings in the control board, and pins 5&6 feed power to the cable or programming console.

I don't have a programming console or the serial lead, but I do have the programming software.

But you can only buy the serial cable with the software, or buy a programming console, both are in the £280 range.

And that is why I would like to make a new serial interface cable.

And knowing my luck, once I have made a new cable, I will fall over the old one.
 

Mad Professor

Senior Member
I am trying to follow the traces on the control board, but this board has more then two layers so not finding it easy.

Connection Pin 1 > 100R > CNY17-3 (Pin1).
Connection Pin 2 > CNY17-3 (Pin2).
Connection Pin 3 > 470R > 12volt.
Connection Pin 4 > 100R > TD62083AP (Pin11).
 
Last edited:

Buzby

Senior Member
This looks like some form of current loop interface. What is the control board ?. Please post a picture or a part number.
 

hippy

Ex-Staff (retired)
I am trying to follow the traces on the control board, but this board has more then two layers so not finding it easy.
The way I usually do it is draw a large diagram of the likely involved IC's and other components, mark what the pin functions are, then use a continuity meter to see what connects to what. You''ll get a paper drawn rats nest and the pin naming will help to give an idea of where things are likely to go.

I agree with Buzby; looks like a standard opto / current loop interface. Should be quite easy to create a to-PC interface.
 

womai

Senior Member
One of the DPScope users has built an opto-isolated USB-to-serial interface that may work for your purposes without any changes. That may be even better than RS-232 on the PC side - many newer PCs don't have serial ports anymore. In addition he also put in a switching regulator to produce stead 5V supply no matter what the USB voltage is - this part is of course optional for you but could come handy.

You can get description, circuit diagram, parts list and a few pictures here:

http://dpscope.freeforums.org/isolating-the-dpscope-from-the-pc-t25.html

Wolfgang
 

Mad Professor

Senior Member
womai: Thanks for that link, that looks very good.

But the software for talking to the control board is locked to using only COM1/COM2, So unless that unit can be forced to use COM1 or COM2, I don't know how well it will work.

Lucky for me, both my PC and Laptop have real Com ports.

I really what to try and make this interface cable as simple as possible.
 

womai

Senior Member
Well, you can always omit the USB-to-serial converter board that the original project has, and instead use a standard MAX-232. That will already make it about as simple as can be.
 

hippy

Ex-Staff (retired)
Are we talking something along the lines like this?
Yes, but double-check the RIN/ROUT and TIN/TOUT for which are 0V/5V and which are +/-12V.

You may also be able to get away without a MAX232, use transistors instead, and may even be able to reverse the opto-LED's to invert polarity depending on the controller board circuit.

You might be able to just use RTS from the PC for power supply.
 

Mad Professor

Senior Member
I have just built the above on my breadboard and I can now talk to the controller board.

Thanks for eveyones input on this.

If someone have a look over all the values I have used.
I have not put a value in yet for R6, but I tested with a 10K and it works.
I would just like all the values to be optimized.

Thanks again.
 
Top