Finding UART to USB to Capture 0-12V Digital Signal at 100 bits/sec

Thread Starter

TigerEngr1

Joined May 23, 2022
4
I'm trying to find a common UART to USB device for running on a Windows machine to capture a digital signal that is 0-12V running pretty slow at only 100 bits per second. The communications protocol uses standard 8 bits with 1 start, 1 stop and no parity. I've used a simple voltage divider network to drop the signal to 0.9-3.2V. The lowest baud rate I can choose for the devices I've been trying to use is 110. My pulse width is 10ms. I'm using Putty as my terminal emulator and all I am getting is garbage characters. I've tried a CP2102 and a CH340 with no luck. Any ideas on how to make this work? I'd like to stay away from bit banging with something like an Arduino to keep the solution as simple as possible if this is doable. Any ideas would be greatly appreciated.
 

Attachments

MrSalts

Joined Apr 2, 2020
1,762
I'm trying to find a common UART to USB device for running on a Windows machine to capture a digital signal that is 0-12V running pretty slow at only 100 bits per second. The communications protocol uses standard 8 bits with 1 start, 1 stop and no parity. I've used a simple voltage divider network to drop the signal to 0.9-3.2V. The lowest baud rate I can choose for the devices I've been trying to use is 110. My pulse width is 10ms. I'm using Putty as my terminal emulator and all I am getting is garbage characters. I've tried a CP2102 and a CH340 with no luck. Any ideas on how to make this work? I'd like to stay away from bit banging with something like an Arduino to keep the solution as simple as possible if this is doable. Any ideas would be greatly appreciated.
I'd do raspberry pi to gather data and then wifi / http to the windows machine.
You didn't have luck with the CP2102 or CH340 but it would be way easier if you'd get one already mounted to an Arduino (even though your said you didn't want Arduino). Just download the Arduino IDE and run with it. Super easy. Bit banging may be the way to go for a quick loop because some protocols have trouble with such slow comms - the library or the hardware comm may not be set up for such slow toggles.
 

dendad

Joined Feb 20, 2016
4,135
Why do you need 100 bits per second serial?
A bit more explanation may help.
If you only need to sample at a low rate, you can still transmit the serial at higher rate.
 

Ian0

Joined Aug 7, 2020
5,147
Is the polarity of the signal correct? Don’t forget that standard RS232 is inverted.
A LINbus transceiver might be useful in turning a 0-12V data stream into something a microprocessor might like.
 

sagor

Joined Mar 10, 2019
695
Your data on the scope is confusing, not UART type of data. You have periods of time when pulses are above the baseline, and times when pulses are below the baseline. Then, there are times when there are no pulses above or below.
RS-232 (or TTL/UART levels) have an "idle" state and a data/transition state. Nothing in between. That is, serial UART data is either in a "mark" or "space" state, it cannot be anywhere in between.
Thus, the serial data, if to be fed to a UART, would be either always high (or low depending if inverted or not) and stay there until there is data and then it changes the signal to the opposite state to indicate "bits" of data. Your scope pattern does neither, the data is steady around the 3.2V mark, there is no real transition.
You have to verify the actual states of the signal at the 12V level. If there is only small transitions, you may have to build some circuit to detect changes, not levels. Start with the original signal, figure out what the real data pattern is first and don't assume it is serial/UART type of data.
 

WesHowe

Joined May 10, 2022
2
The standard Arduino Uart only has a 12-bit register. With a 16-MHz clock that means (about) 244 baud is as slow as it goes. The Software Serial library also has issues at those rates.
For anyone wondering what would use such low rates, Radioteletype is still used, and typical rates are 45.45, 50 and 75 baud (5N1).
 

Thread Starter

TigerEngr1

Joined May 23, 2022
4
Why do you need 100 bits per second serial?
A bit more explanation may help.
If you only need to sample at a low rate, you can still transmit the serial at higher rate.
I'm trying to capture the communications protocol off of a piece of HVAC equipment where the protocol speed is fixed by design. I don't need to transmit data via TX, just log data off of the RX line.
 

WesHowe

Joined May 10, 2022
2
At the moment, I have nothing to test low data rates with to ensure it works, but CoolTerm (also free, and works nicely here) can be set to low data rates. In the options panel there is a drop down for speed that has the usual options, but at the bottom is one named "custom" that then enables an input window where you can put 100, or whatever.
Good luck.
 

Thread Starter

TigerEngr1

Joined May 23, 2022
4
Your data on the scope is confusing, not UART type of data. You have periods of time when pulses are above the baseline, and times when pulses are below the baseline. Then, there are times when there are no pulses above or below.
RS-232 (or TTL/UART levels) have an "idle" state and a data/transition state. Nothing in between. That is, serial UART data is either in a "mark" or "space" state, it cannot be anywhere in between.
Thus, the serial data, if to be fed to a UART, would be either always high (or low depending if inverted or not) and stay there until there is data and then it changes the signal to the opposite state to indicate "bits" of data. Your scope pattern does neither, the data is steady around the 3.2V mark, there is no real transition.
You have to verify the actual states of the signal at the 12V level. If there is only small transitions, you may have to build some circuit to detect changes, not levels. Start with the original signal, figure out what the real data pattern is first and don't assume it is serial/UART type of data.
The scope trace in the background of the original post wasn't showing actual trace data. Here is what I am actually receiving from the communications bus.
 

Attachments

Thread Starter

TigerEngr1

Joined May 23, 2022
4
At the moment, I have nothing to test low data rates with to ensure it works, but CoolTerm (also free, and works nicely here) can be set to low data rates. In the options panel there is a drop down for speed that has the usual options, but at the bottom is one named "custom" that then enables an input window where you can put 100, or whatever.
Good luck.
Thanks @WesHowe. I will give CoolTerm a shot and let you know if it works.
 

Ian0

Joined Aug 7, 2020
5,147
Might there be another signal, that looks like the one shown, but inverted? If so, you are dealing with RS485
 

dendad

Joined Feb 20, 2016
4,135
Have you tried inverting the data as @Ian0 suggested?
The data may not be ASCII so a serial terminal will just show junk.
You need to find what the actual packet format is.
Do you have any info on the device that is generation the data?
What is generating the data?
 
Top