Author Topic: Difficulty interpreting a single wire serial signal  (Read 863 times)

0 Members and 1 Guest are viewing this topic.

Offline SynViksTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Difficulty interpreting a single wire serial signal
« on: April 12, 2023, 01:17:58 am »
I have a project in the works that involves using an arduino to control a turbo-charger actuator. The actuator has following pinout:

12v power
Ground
12v PWM
5V UART

The duty cycle of a 12v 128hz PWM signal controls the position of the actuator. I *think* the UART signal relays position sensor information from the actuator to the ECU it was designed to talk to, so that the ECU can compare commanded position with actual position. Would be useful if my arduino could know if commanded equaled actual, so that if there was a malfunction, it could report it.

The actuator PCB uses this processor: https://www.alldatasheet.com/view.jsp?Searchword=72F321J9TC&sField=3

I got a logic analyzer hooked up to the UART cable and captured a signal but I cannot seem to find a setting combination that decodes the signal without frame errors. The data sheet above gives information about the configuration of the serial communication, again, can't find a baud rate, bit size, parity combination that yields no errors.

Attached is the capture from Pulseview. Worth noting that I'm powering this thing with a 12v switching powersupply while on the bench... no idea if the noise is introducing errors in to the UART signal.

This is my first real electronics project (aside from putting together computers), so any pointers would be greatly appreciated!
 

Online Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1519
  • Country: ca
Re: Difficulty interpreting a single wire serial signal
« Reply #1 on: April 12, 2023, 03:59:45 am »
Can't see your "capture"... Have no idea how to view a .SR file. Maybe post it as a PNG or JPG image file?

Is the "UART" signal TTL level or is it RS232 level? Because TTL is inverted from RS232.
 

Offline pqass

  • Frequent Contributor
  • **
  • Posts: 842
  • Country: ca
Re: Difficulty interpreting a single wire serial signal
« Reply #2 on: April 12, 2023, 05:52:38 am »
See attached stacked snapshot of what I see in my Pulseview (v 0.3.0).  It doesn't look like PWM or UART.

slice #1: repeating (60Hz) bursts. There are 41 of these in your capture.
slice #2-#5: zoomed-in first 4 bursts in slice #1.
slice #6: further zoomed-in slice showing 26.7kHz pulses with occasional narrower pulse in between (always at the 23us mark after the 26.7kHz pulse).

The only information content I see (in slices #2-#5) are the in-between pulses (or lack of).  This is very reminiscent of IR protocols but one that the bit width doesn't change. It doesn't appear to be the usual [protocol] suspects: https://www.vishay.com/docs/80071/dataform.pdf

If you can decode the ones with the in-between pulse and say, call those 1s and those without in-between pulse call those 0s (or vice versa) you may find the information you're looking for.
 
The following users thanked this post: Kim Christensen, SynViks

Offline SynViksTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Difficulty interpreting a single wire serial signal
« Reply #3 on: April 13, 2023, 03:17:03 am »
Thank you very much for your read on this.

The reason I was assuming UART was because that's what the wire was labeled in the diagram. Very weird that it would use something like this instead of simple asynch serial or CAN.

I transcribed it to binary and got very long numbers when run through a decimal or hex decoder. There seems to be a lot more information coming out of that line than I thought. I'll have to do some comparison between different actuator position to see if I can single out out the position data.
 

Offline pqass

  • Frequent Contributor
  • **
  • Posts: 842
  • Country: ca
Re: Difficulty interpreting a single wire serial signal
« Reply #4 on: April 13, 2023, 01:01:48 pm »
Pulseview has a Export As CSV or 0/1 that you can then use command-line utilities to interpret/extract the info.  ie. Identifying/splitting the 60Hz bursts into separate messages, then with each message, identifying the in-between pulses from the 27khz periodic pulses. 

If you know Python, you can write a custom protocol decoder for Pulseview.

EDIT:
So, in Pulseview (selecting only D0), I exported to a comma-separated-values file (deere.csv) and ran the following:
Code: [Select]
./deere.sh <deere.csv >deere.txt
See attached bash+awk script (deere.sh) that produce the deere.txt file.  Good luck understanding the output.
« Last Edit: April 13, 2023, 03:27:36 pm by pqass »
 
The following users thanked this post: SynViks

Offline SynViksTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Difficulty interpreting a single wire serial signal
« Reply #5 on: April 14, 2023, 01:04:26 am »
Apologies to those who helped but I think the weird results I was seeing were due to improper grounding. I wasn't seeing a signal with the analyzer while grounding via the ground pin on the actuator, so I grounded to earth which produced the results seen here.

I never really considered that the "UART" wire on the actuator was just reading 5V high the whole time and not saying anything, which seems to be the case as the only thing I see on that wire looks like noise from the PWM signal (apologies for the distorted scope screen):




When grounded properly, only activity on the UART wire is when powering up the actuator and nothing after that, even when the actuator is commanded to change positions:



Leads me to think the "UART" wire might just be for programming the actuator, or maybe it only sends data when instructed.

Again, appreciate the help and apologies that it was a dead end.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf