2
\$\begingroup\$

I'm trying to read the signal between my quadcopter's camera board that is controlled by an android app, and the rotor control board in the drone.

There are two boards in the drone: the camera board, and the motor control board.

Only one wire carries that digital signal (shown below) and encodes soft-stick positions (sent by the android app via 802.11) from the camera board to the motor control board. I know this is the right signal because the 1's and 0's flip clearly in the scope if I move the control stick in the android app. The motor control board then (presumably) feeds its PID controller with these inputs to move the drone.

I would like to read the signal with an MCU so I can use the android app to control other things (like the rotor for our antenna).

When I plug it into the RX of a TTL-to-Serial board (or my Bus Pirate) I just get noise. Or at least, it looks like noise---maybe its binary data, but I've not been able to determine a framing interval and I would expect the data to repeat in the same width each send cycle.

Right now I'm just trying to read the data bytes cleanly:

  • Is this a UART signal?
  • If so, how can I calculate the baud rate? I've tried the normal rates from 115200 to 9600bps without success.

Pictures

Here are some scope pics with measurements on an old scope. The data chunks are sent about 25x per second. This first picture zooms into a single data chunk coming down the wire:

Picture 1: Full range of the

Cursors are at the far left and right of the display showing 1.18ms from blip-to-blip:

Full digital signal width

Picture 2

This one zooms into the wider blips near the middle of each section. They measure ~86us apart, you can see the vertical cursors on the left of the image:

Zoomed into digital signal

Picture 3

If you look at Picture 1 on the far left it looks like fuzz, but if you zoom in there are some very crisp edges measuring about 35us falling-edge-to-falling-edge. Are these start?

Zoomed into start bits?

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Does it look like SBUS servo protocol as many cameras support it? 100 kbps bit rate with 8E2 framing? \$\endgroup\$
    – Justme
    Jun 10, 2022 at 7:49
  • 1
    \$\begingroup\$ on picture three, squinting a bit, I'd say your falling edge-falling edge duration fits four symbol instants. If that's the case you get 4 times the baudrate as what you see as \$1/\Delta t$ on your display, and 28.41 kHz · 4 is very close to 115.2 kbd, namely, closely enough for that to be internal-oscillator frequency accuracy of a microcontroller. 115.2 kbd would be a very common UART rate, indeed. Framing might be done on other lines on the same connector, maybe? \$\endgroup\$ Jun 10, 2022 at 10:49
  • \$\begingroup\$ @MarcusMüller, I think its neat you were able to pin the baudrate just from the scope trace! A brief writeup about how you would estimate baud rate based on a scope trace would make a great answer (in the generic case, not just with respect to my graphs) if you're up for it. \$\endgroup\$
    – KJ7LNW
    Jun 11, 2022 at 20:45
  • \$\begingroup\$ but that writeup would literally just be the comment I posted above, and sadly not be an answer to your question \$\endgroup\$ Jun 11, 2022 at 21:26

1 Answer 1

0
\$\begingroup\$

From @MarcusMüller above:

on picture three, squinting a bit, I'd say your falling edge-falling edge duration fits four symbol instants. If that's the case you get 4 times the baudrate as what you see as $1/\Delta t$ on your display, and 28.41 kHz · 4 is very close to 115.2 kbd, namely, closely enough for that to be internal-oscillator frequency accuracy of a microcontroller. 115.2 kbd would be a very common UART rate, indeed. Framing might be done on other lines on the same connector, maybe?

It turns out he was right, it was 115200 8N1. The signal was all binary and looked like noise without an obvious repeating pattern, so I thought the port settings were wrong.

Anyway, big thanks to @MarcusMüller for confirming the bitrate to narrow down the search space!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.