I am creating a drone for my university project. But I am confused about how to attach the flight controller to Arduino. I am using Micro F3 Evo for a brushed motor drone and Naze 32 for a brushless motor drone.
I saw videos on hoy to make Arduino nano based flight controller which operates the motors via PWM signals. That was easily understandable for me. But it didn't work, that's why I am planning to add a flight controllers and want to control it by DIY 2.4GHz receiver by NRF24L01 for now. And in the future want to add Raspberry Pi for object tracking with OpenCV.
But I can not find suitable information in this regard. There is UART connection port in every flight controller.
How can I control the flight controllers with Arduino?
do you require an Arduino? the Micro F3 Evo has an onboard STM32F303CCT6 microcontroller
maybe worth looking on Forums dedicated to drones and flight controllers?
Did you want your Arduino to emulate a radio receiver so it can provide control signals? Does your flight controller have one input per channel? if so, use the Servo library to provide signals for those inputs.
If your flight controller only has one input for all of the channels, the control pulses are sent sequentially. The format is usually PWM or PPM. You can do PWM with software:
Not all three, specially the sbus or ibus, because I have seen many modern FC have sbus or ibus, some don't have the PPM (I also can be wrong, please correct me then) , thats why sbus or ibus will be better.
Can you tell me how can I encode all the channel values to sbus or ibus? It will be soo much helpful for me.
I'll check but I believe Betaflight, at least, allows selection of PPM as the expected control input protocol.
TBH I would not go between an Arduino and a FC with PPM. The modern serial digital protocols are better.
How you get the r/c transmitter information into the Arduino is entirely your choice. Since you are writing or stealing borrowing code for both, you can use any system you want, even one you make up yourself.
In the Arduino, you will therefor have access to the data from the transmitter, and whatever additional data you hope to modify, override or otherwise tinker with those values before passing them along to the FC.
Which mean you need to synthesize either bus signal protocol in the Arduino.