Posts

Tiny Quadcopter (Part 4)

I've got the two radios talking to each other, and I've written a trivial implementation of sumd, which I haven't tested yet. See https://github.com/davidji/rust-rc A bunch more stuff has arrived in the post, including: Tiny form factor NRF24L01+ modules, w/o LNA Combined Arduino Nano NRF24L01+ boards This is rather quicker than I expected, which makes me regret cobbling together an STM32F4 board, NRF24L01+ with LNA and buck boost converter. The trouble with the STM32F4 board is it's too long for the quadcopter frame. More annoyingly, so is the combined Arduino board. It's probably time to go back to the Arduino pro micro with Tiny NRF24L01+ module and LDO regulator. It would be interesting to know, when considering the energy efficiency of various things I might put on a quadcopter, how much power the quadcopter needs to hover and how that relates to it's weight. It's pretty likely that almost all the power goes to hovering, and weight is very ...

Tiny Quadcopter (Part 3)

I though the regulator on board the micro-controller would not be enough for the range extender, but it can actually output 300mA, so I think it is. Here's a bunch of reference information on the board , which may be useful in any case. The regulator is an AP7343 . It's drop-out voltage is only 310mV, but that still means I'd need 3.6V or so to still have regulated power, which is more than the LIPO will have at the end of it's discharge. At least when I plug in the USB, it can power the radio for testing. What can I do otherwise? The radio and the micro-controller can run on a voltage as low as 2V. I have adjustable regulators on hand, but they don't help much, because they have much higher drop out voltages. I have 2 Pololu S7V8F3 s  somewhere . They would be ideal if I could find them - they are pretty much designed for my purpose. What I actually found is an S7V8A, which I guess will do... Although I have the challenge of adjusting it before soldering it...

Tiny Quadcopter (Part 2)

See previous post . Programming via DFU worked fine, and USB serial also worked, after I added stm32f411 to the list of supported devices in stm32f4xx_hal . I should just check that serial echo example works and submit a pull request: so far I've only tried printing messages. This means I can definitely use my STM32F411 board without soldering any headers onto it, which keeps it small and lite. I've updated my project to use that board for the receiver, and a STM32F103 black pill for the transmitter. I now have a dilemma re NRF24L01+ boards. There are a few variables: With, or without RFX2401 range extender. The main issue is they draw 90mA during TX. The on board 3.3V regulator on the micro-controller board can't handle that and neither can the 5V output of the flight controller, so I would have to add a dedicated regulator, powered directly from the battery. It also draws 8mA in receive mode. Standard header vs 1.27mm edge connectors: the boards with the latt...

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...

Dell power supply emulation

Image
The original idea for this came from hacking a dell power adaptor , which I found after taking my laptop to Australia and finding the USB-C PD to dell adaptor I took with me would power my laptop, but not charge it. I ordered some 3-wire cables on e-bay and resolved to try this at some point. I'm now in the process of building a dock for my laptop, in which I've used one of the 3-wire cables. Before that can be any use, I've got to get this working. There's a one wire library called  OneWireHub  which includes a  sketch specifically for emulating a dell power supply . It's easily the best example, with a clear menu of power supplies to emulate. OneWireHub can be found in the Arduino library manager. I was going to use a Digispark clone, but the OneWireHub library doesn't compile in the Aduino IDE (or in the eclipse arduino plugin for that matter). That's because they both use an older GCC version for the ATtiny85. I suspect there's no reason for th...

Embedded Rust

I want to become fluent in Rust, and I have a few things I'd like to do with embedded systems, so I figured I'd combine the two. This has got a lot easier since I first thought about it: there's a book . The thing I specifically want to do is regularly sample the ADC, using non-blocking APIs. This is sort of supported: There are some standardised HAL API s, and they use nb  which is a generalised non-blocking mechanism. This does mean, however, that you end up needing a spin loop that tries everything you are waiting for. You can handle interrupts, so perhaps there's a sleep function that wakes up after an interrupt has been processed? Then I could add something like Chibios events: the interrupt would set the right event flag, and the main loop would act on each event flag that was set, each time it woke up. I don't need to do this, because the RTFM framework does it already, and statically analyses your program for deadlocks. RTFM lets you define '...

Caliper data port using ADC - no conversion circuit

EspDRO  uses the ESPs ADC to avoid needing a level converter to receive caliper data. This makes me think I could do even better using STM32 ADC and Chibios: efficiently reading several calipers at once. I got out the calipers I'd previously soldered wires too, and promptly managed to break the wires off one. There are several connectors on Thingiverse now. I think I better print one. I found the EspDRO link in this one .