Unknown serial protocol - for Cummins Onan (17.5kVA) generator : display interface. Circuit diagram shows interface lines as "RS485 Serial " .. no other details provided.
Googling extensively yields minimal helpful info. Using a RS485 to USB PC interface - but to date unsuccessful in decoding anything meaningful. (Have tried puTTY, Modbus scan and various other serial protocol PC based programs to decode.) Using a DSO I can capture waveform, sample below, from a repettive data stream.
Measured "pulse" is ~104uS - so for certain its 9600 baud. However I'm unable to determine start/stop/parity details? Does anyone recognize this? Maybe modbus?
Any assistance on identifying the start/stop/parity or other characteristics that can narrow my search.
-
\$\begingroup\$ some bar codes have a similar profile \$\endgroup\$jsotola– jsotola2025年08月12日 05:16:17 +00:00Commented Aug 12 at 5:16
-
\$\begingroup\$ stop bit count makes no difference for the receiver. \$\endgroup\$Jasen Слава Україні– Jasen Слава Україні2025年08月12日 06:15:31 +00:00Commented Aug 12 at 6:15
-
\$\begingroup\$ If you know it's 104us bit length then set the scope to 100us/square so that manual decoding is possible. WTH is "H=500uS" supposed to mean? Why is there an AC symbol in the top left corner, do you use AC trig or something? Trig on DC falling edge. If you have a somewhat modern scope it probably got a UART decoding feature even. \$\endgroup\$Lundin– Lundin2025年08月12日 07:27:55 +00:00Commented Aug 12 at 7:27
-
\$\begingroup\$ @JasenСлаваУкраїні It depends on the receiver. If you know the receiver only checks for first stop bit like most then it doesn't matter. Some receivers may verify and enforce both stop bits. In this case it's up to the USB chipset and it's unknown. \$\endgroup\$Justme– Justme2025年08月13日 05:11:32 +00:00Commented Aug 13 at 5:11
-
\$\begingroup\$ what I mean is iy you set it to 1 you will still get good date even if the sender is using more than 1 \$\endgroup\$Jasen Слава Україні– Jasen Слава Україні2025年08月14日 00:08:51 +00:00Commented Aug 14 at 0:08
2 Answers 2
There seems to be mostly single high bits spaced out evenly so I'd safely guess the stop bit setting is 1 and it isn't 2.
Start bits must be 1 or then you can't receive it with most UARTs and you can't receive it with your PC. You have to assume that's the case and that the bitstream is coming from an UART to begin with. So far it looks like UART, with bit rate matching a common UART rate.
The amount of data bits betwen start and stop could be determined from photo but you also will get framing errors if it's wrong so try a setting that results into no errors. You need a program to show these errors, not to hide them.
If there is e.g. 8 bits then there might be no parity and all 8 bits are data, but if the data does not make sense then there might be 7 bits of data and parity.
If there are 9 bits per frame then likely there is 8 data bits and parity.
The protocol is likely binary so it might be useless to look at it in Putty or other text terminals. Use a program which allows hex or binary view, if you can't find one then try making one, in languages that support serial ports it might be 10 to 20 lines of code.
After you have the binary/hex data you can compare if it matches Modbus format or not, like does the CRC at the end match with header and payload.
If the data on PC does not match data on scope and there are errors constantly, the RS-485 wires may need swapping. Also a good reminder is that RS-485 is not a two wire interface, it's a three wire interface that requires two data wires and a common ground reference between devices, and omitting ground reference may also make the PC RS-485 interface not see the data on bus correctly.
-
\$\begingroup\$ many thanks for your response, this is v helpful and gives me a direction & confidence to keep trying . Yes, i have connected GND wire from generator interface to the USB RS485 interface, With DSO i can confirm correct polarity consistent with generator cct diagram, but had already also tested with reversing the A/B inputs on USB interface (just in case its mislabelled) .. more to come , thanks for the assistance thus far \$\endgroup\$gregy– gregy2025年08月13日 04:53:12 +00:00Commented Aug 13 at 4:53
have you tried this with a desktop PC or with a laptop - the mains earth on a PC and any earthing on the equipment may be causing common mode voltage problems so that the common mode voltages are out of range - try getting an isolated RS485 interface, or try the interface in a laptop and expect binary data. Its probably RS485 modbus encoding.
-
\$\begingroup\$ The data looks fine. There is ground wired between computer RS-485 interface and the device which provides common mode reference. Only cheap garbage sold on online e-commerce sites have a ground screw terminal that is left unconnected so these are impossible to get working without going through extra hoops. \$\endgroup\$Justme– Justme2025年08月13日 16:31:13 +00:00Commented Aug 13 at 16:31
-
\$\begingroup\$ yes, im using a laptop (on battery) & hence its isolated, however I have connected the GND to the USB RS485 interface. Likewise the DSO Im using is handheld battery powered, and hence its isolated, but using its gnd probe connected to GND to capture above single ended pics. (have also used DSO with its GND connected to RS485- , just to check that correct differential operation is occuring ... with ~ 7Vpp observed:) the data waveforms look clean and as would be expected, also the "garbage data" displayed using eg puTTY ... is quite obviously very repetitive ... \$\endgroup\$gregy– gregy2025年08月13日 22:38:42 +00:00Commented Aug 13 at 22:38
-
\$\begingroup\$ So i do believe that the USB device is getting valid data ... just that I have no idea what its encoding is! ... many thanks for the ongoing encouragement and suggestions \$\endgroup\$gregy– gregy2025年08月13日 22:39:26 +00:00Commented Aug 13 at 22:39