Ideas for stm32 to pc comms via radio

Post here first, or if you can't find a relevant section!
Post Reply
georgesshed
Posts: 6
Joined: Mon May 18, 2020 5:17 pm

Ideas for stm32 to pc comms via radio

Post by georgesshed »

Hi all!

Im working on a project where I am building a flight control system for a model aircraft using the stm 32.

The system is compromised of 2 parts, the flight controller (and sensors fitted to the aircraft) and a windows application (.net/c#). Part of the goal is to have a fast telemetry link between the 2 so you can see what the aircraft is doing in real time.

The telemetry link consists of simple 3DR radios that connects to the stm32 via serial and to a pc over usb connection.

My question is has anyone had any experiance with telemetry protocols over these sorts of radios? i have a large number of variables that need to be transmitted back and forth. So far ive user a system where a certain character is used to identify each variable such as P090 for a pitch of 090. The problem is that this seems to be unreliable. Anyone have any advice?

Thanks, George
Attachments
Ground station software.
Ground station software.
image.JPG (51.18 KiB) Viewed 2676 times
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: Ideas for stm32 to pc comms via radio

Post by mrburnette »

georgesshed wrote: Mon May 18, 2020 5:46 pm ...
So far ive user a system where a certain character is used to identify each variable such as P090 for a pitch of 090. The problem is that this seems to be unreliable. Anyone have any advice?
...
Parsing is fine for IoT with JSON, or even SDF with GPS. But, parsing is a P.I.T.A. for realtime systems. I would suggest exploring binary file transfer of all variables using a structure. Here is an example/discussion of how it may be done in the Arduino world:
see Felix's reply #2
https://lowpowerlab.com/forum/moteino/d ... -(solved)/

(There are many gems on Felix's lowpowerlab site ... great rainy day reading)

Good luck,

Ray

Just as a side, if you do need to move from the Arduino to a PC for presentation, I have used JSON serial formatted (I call this faux-JSON) to USB to the PC using NodeRED. Works great,
https://www.hackster.io/rayburne/arduin ... asy-28882d

NodeRED runs fantastic on a RaspberryPi3B or 4x. Inexpensive and professional capabilities.
ag123
Posts: 1668
Joined: Thu Dec 19, 2019 5:30 am
Answers: 25

Re: Ideas for stm32 to pc comms via radio

Post by ag123 »

i think the 'simplier' ones use ppm for the control signals, i'm not familiar with them though
https://www.dronetrest.com/t/rc-radio-c ... -dsm2/1357
there are some pretty impressive open source stm32 based drones
https://github.com/betaflight/betaflight
the boards are readily available on the likes of ebay, amazon, aliexpress etc
i think even the complete drones are available
https://www.aliexpress.com/wholesale?ca ... betaflight
Post Reply

Return to “General discussion”