Tiny quadcopter (Part 1)

I figured my daughter might like to learn to fly a quadcopter during lock-down.

Ages ago, I printed this frame, and bought an F3 2.0, a set of brushed motors, and some batteries. It's all just been sitting in a drawer. I need a receiver, though.

It seems a lot of people do this using an NRF24L01+ and an Arduino. In fact the two have even been combined in a single board by someone enterprising. I decided against the Arduino, because the cheap ones need 5V, and the quadcopter is powered by a single lithium battery. Also, the Arduino has limited PWM resolution.

So at this point I was considering a black pill I had lying around, but it weights 6g, vs 2g for an Arduino pro micro. Then I thought about an stm32f411 black pill, which weights 2g like the pro micro.

It turns out the flight controller includes a boost converter to power 5V 'peripherals' so that eliminates that argument.

It's also controlled by a serial port rather than PWM, so I don't have to worry about the Arduino's 8bit PWM, so now there's no particular reason not to use one.

Before I worked that out, I'd written a transmitter and receiver in Rust using PWM as the RX control protocol, and adapted the receiver code to run on the STM32F411 black pill. The TX protocol use postcard, because I've used it before and it's quick and easy.

I've bought a couple of the combined arduino/NRF24L01+ boards I linked above, because that's obviously going to be the most reliable solution in the end.

But now I have two boards to consider.

I also need to pick a serial RX protocol supported by cleanflight. I could also use that as the basis for the TX protocol, if I wanted the Rust code and Arduino to inter-operate.

SUMD seems like an obvious choice since it uses vanilla serial 115200 8N1. It sends updates only at 100Hz, which seems a bit slow.

Finally, I want to avoid soldering headers onto the STM32F411 black pill, so I wanted to see if I could program it via the USB port, instead of via an ST-Link, and found this article.



Popular posts from this blog

3D Printer ramblings

Balance Bot V2

Robot arm