Is this a Serial Signal - Page 1
Forum section: electronics / beginners

author: JeepGuy
author_rank: Newbie
timestamp: January 31, 2022, 06:56:02 pm
content: I bought my first oscilloscope and am working on my first project with it. I am trying to decode a signal being sent from a Steering Wheel Control Interface to a car stereo. My goal is to get a PIC or Arduino to be able to generate the signal. Looking at YouTube tutorials I was hoping to see a nice serial logic waveform, instead I am seeing the below. I tried decoding in the scope LINBUS, Canbus and Serial but it doesn't seem to like the waveform. Any ideas would help.

author: ataradov
author_rank: Super Contributor
timestamp: January 31, 2022, 07:14:18 pm
content: How and what exactly are you probing?

author: JeepGuy
author_rank: Newbie
timestamp: January 31, 2022, 07:22:47 pm
content: I have a PAC SWI-RC-1:https://www.crutchfield.ca/p_541SWICP2/PAC-SWI-CP2-Steering-Wheel-Control-Adapter.htmlIt is a little device that detects a button press on a steering wheel based on resistor value (eg. volume up) and then transmits the volume up signal to a car stereo through a 3.5mm jack. It is that signal that I am trying to capture and recreate. I have tried probing at the end of the 3.5mm jack and also probing directly from the PCB where the jack connects - with the same result.I am able to reliably trigger the "volume up" signal as needed so am sure i am not detecting just random noise.I haven't been able to find any details about the protocol or signal - so not sure if it is IR, Canbus, etc.

author: Manul
author_rank: Super Contributor
timestamp: January 31, 2022, 09:30:22 pm
content: Is it not supposed to set different resistances depending on the command? I would try to use a high value pullup resistor and see is it so. It looks like either open drain serial signal or in fact different resistors switched, which again requires some current injection to actually see.

author: eugene
author_rank: Frequent Contributor
timestamp: January 31, 2022, 10:49:43 pm
content: 1. This stuff is pretty much all CAN bus these days, so I would start by assuming that its CAN and go from there. Do a web search for automotive CAN bus for more info.2. You need to properly ground your scope probe to get a clear signal. I'm talking about the little wire with an alligator clip hanging from the probe. Clip it to the chassis of the head unit or some other ground. Then turn the vertical sensitivity down to something like 1V or 2V per division so that you can see the entire 5Vpp signal. 100mV/div is too much gain.

author: JeepGuy
author_rank: Newbie
timestamp: January 31, 2022, 11:22:17 pm
content: Thanks for the advice. I added a pull up resistor and now have something that I think i can decode.

author: Manul
author_rank: Super Contributor
timestamp: January 31, 2022, 11:50:55 pm
content: So it is indeed serial data. Good. Easy to work with. There was also some standard where different resistances are switched. Can't remember where I saw it, but it was something similar to your device. Anyway, good luck.

author: macboy
author_rank: Super Contributor
timestamp: February 01, 2022, 12:49:08 pm
content: Based on the long pulse at the beginning plus the series of only two lengths of pulses, I would suggest it might be an IR protocol. Note that when you research IR protocols, many will assume that idle is high which is the opposite of what you have, so you might need to think about the logic levels in reverse. If it helps you could invert the signal on the scope.If you only need to recreate some commands without the need to decode incoming commands, then you only need to generate that same pulse train regardless of what the protocol is. That might be simpler than trying to reverse engineer it.

author: MarginallyStable
author_rank: Regular Contributor
timestamp: February 02, 2022, 05:18:39 pm
content: Does look similar to NEC IR. I am working with something similar. After the real long frame sync pulse. The serial stream is encoded in the high pulse times. (small pulse = 0, long pulse = 1). In my application there is also a frame sync at the end of the serial stream.

author: JeepGuy
author_rank: Newbie
timestamp: February 03, 2022, 04:44:27 am
content: I was able to decode the preamble as a 9ms low followed by 4.5 ms high. Then you are exactly right, 560us pulse is a 0 and 560*3us pulse is a one. Based on that I was able to get the binary string for each command, program it into the pic and successfully play them back. The next part of my project is find a way to reduce the noise in my ADC coming from steering wheel button presses. I'm thinking i need to debounce the buttons in software.

author: MarginallyStable
author_rank: Regular Contributor
timestamp: February 04, 2022, 01:08:28 am
content: Yes, yours looks to be nec ir exactly:https://techdocs.altium.com/display/FPGA/NEC+Infrared+Transmission+Protocol

author: JeepGuy
author_rank: Newbie
timestamp: February 04, 2022, 05:39:55 pm
content: Nice! Indeed it is! Thanks for sharing that.