Electronic – Two devices on Y 9pin Serial cable to 25pin printer input – Data Corruption

db9serial

I have't been able to find a solution, and was hoping for some clarity. I have 2 machines (one is a bill counter, one is a coin sorter) that both support printing over DB9 serial connection, and one printer that has a 25 pin input.

The goal is to have the single printer handle printing for both units through a y-split. On the bill counter in this setup, I am able to print from the bill counter with minor data corruption (a few odd characters interspersed), but am unable to print anything from the coin sorter. Either singulated unit plugged into the Y cable works independently with the other unit not plugged in, the cable integrity and pinouts seems fine. For both units, in theory, they should only be communicating with the printer when a manual print request is initiated, but I do not have access to either protocol manual, or port testing equipment, just a standard DMM.

Do I need to filter each comm line with diodes?
Any insight as to why the other unit wouldn't print when both devices are attached?

Please let me know your thoughts or what additional information I may provide to help drive finding a solution.

Thank you!

Best Answer

Any insight as to why the other unit wouldn't print when both devices are attached?

Yes. An idle device will try to drive the Tx line to some negative voltage (anywhere from -3V to -15V), while the active device either tries to drive it to some possibly different negative voltage or, tries to drive it to some positive voltage.

Sounds like the line driver for the bill counter's RS-232 port has a lower output impedance than the line driver for the coin sorter, so the bill counter "wins" (sort of) when the two drivers want to force the line to opposite polarities.

Hopefully, the outputs of both devices are protected against wiring mistakes (short circuits, etc.) and you won't have smoked any transistors.

Do I need to filter each comm line with diodes?

You could use diodes to ensure that the two drivers are only capable of driving the line high, but then you'll need a resistor connected to a negative supply voltage, to pull the Tx line low when neither device is talking. The pull down resistor value must be low enough to pull the signal down quickly so that the printer sees the correct value for the next data bit, but the value also must high enough that either device can overpower it.

The range of resistor values that will work will be narrower at higher baud rates, and it may be closed (no value will work) at the baud rate you need.


A better approach would be to build an active circuit with two separate RS-232 receivers, an OR gate, and one RS-232 transmitter.

Another approach would be to use some kind of microprocessor...