Determine BAUD rate? - Page 1
Forum section: electronics / projects

author: Snake____1
author_rank: Contributor
timestamp: November 04, 2020, 08:53:00 pm
content: Hello,I am trying to read out a serial data line from a crane weight scale. The output BAUD rate puzzles me, as I cannot get any useful data. Can anybody help with this?I measured the shortest pulse to 3.958uS, an online table suggests 250000 as the BAUD rate. I tried this without luck, but I doubt it is this fast...

author: ataradov
author_rank: Super Contributor
timestamp: November 04, 2020, 09:21:17 pm
content: Baudrate of what? This is just some square waves. There is no UART data here.It is some other protocol. Possibly number of edge transition matters or something like this.It looks like may be that fast stuff at the beginning tells the length of the digit separator, since you see a pulse of about the same width included in the following data.You need to capture multiple transactions and make a note of what value was captured. Then it would be very easy to figure out the protocol.

author: CaptDon
author_rank: Super Contributor
timestamp: November 04, 2020, 09:38:17 pm
content: 250K sounds like slow CANBUS?? Never saw ARCNET go that slow, but maybe?Never saw RS232 level data go that fast either. Could be proprietary?

author: CaptDon
author_rank: Super Contributor
timestamp: November 04, 2020, 09:40:16 pm
content: Were you on only the CLK clock and not the data line.Some protocols have a seperate CLK TX/RX.

author: ataradov
author_rank: Super Contributor
timestamp: November 04, 2020, 09:41:03 pm
content: There is no real protocol there, look at the logic capture.It is some primitive protocol based on the intervals between pulses or something like this.

author: m k
author_rank: Super Contributor
timestamp: November 05, 2020, 10:07:00 am
content: Weight to frequency?

author: ataradov
author_rank: Super Contributor
timestamp: November 05, 2020, 06:21:48 pm
content: No, it is clearly a digital protocol.Since most people don't want to open the capture file, here is how it looks. It goes on for a bit after that and then ends.I assume the data is encoded in the long intervals between short pulses. Or may be in the edge transitions between the short pulses.The only way to know is to have a capture and a corresponding value.

author: BrianHG
author_rank: Super Contributor
timestamp: November 05, 2020, 07:06:56 pm
content: Without the carrier, that looks like a demodulated TV IR-remote-control FSK/PSK encoded serial stream from an old Sony/Sanyo VCR remote.Every clock period cycle, if the cycle remains the same, the data bit =0, if it inverts, IE 2 adjacent highs or 2 adjacent lows, the data bit = 1. That small glitch in the middle is just a software CPU encoding glitch, or it is done on purpose to see where the clock cycle should have flipped if the data would have been a 0.

author: m k
author_rank: Super Contributor
timestamp: November 06, 2020, 09:57:41 am
content: Quote from: ataradov on November 05, 2020, 06:21:48 pmI checked that csv but missed those lonely ones.It can still be as simple as weight to pulse width but from RS/EIA-stuff it is quite far.Some models have internal balance connection.Is this from the right pin for sure?

author: Ian.M
author_rank: Super Contributor
timestamp: November 06, 2020, 01:52:09 pm
content: Quote from: ataradov on November 05, 2020, 06:21:48 pmEveryone who doesn't own a genuine Salae logic analyser can't easily open their proprietary .logicdata files. Yes, we *COULD* install the Salae software but many of us *WON'T*, simply because we use Salae hardware clones with Sigrok and the fx2lafw FOSS firmware, because we respect Salae's software I.P.Its unfortunate that your PNG was truncated.Quote from: ataradov on November 05, 2020, 06:21:48 pmUnfortunately, the CSV file isn't in a Sigrok compatible format, so its a PITA to work with with FOSS tools. However, by editing it into a LTspice compatible PWL file, I was able to investigate further. It appears to encode '1' as a short low pulse and '0' as a long one (or visa-versa). Assuming the initial 36 bit burst of '1' bits is a preable, I created a data to SPI converter in LTspice and exporting it from LTspice as a 8 bit 1MHz sample rate WAV file to get something Sigrok can decode.It looks like a 36 bit data packet. Sigrok's SPI protocol decoder can handle it with a 4 bit word size (nibbles).Hint: To get Sigrok to accept a WAV file from LTspice as digital data you need to set a 0.9V threshold for each channel. Unfortunately this isn't preserved by the saved session or session setup file as of PulseView v0.42, so you need to re-apply them manually and reselect the SPI decoder channels each time you open the session.I agree there isn't enough data in the CSV file to decode the data packet contents, or even its endianness. If the preamble ever changes from all '1' it could even be another 36 bit data packet! We'd need lots of captures with known weights get anywhere with that.

author: m k
author_rank: Super Contributor
timestamp: November 06, 2020, 08:48:22 pm
content: Much clearer now.It seems that those fast drops are not hickups.