This video shows the maiden flight of my new brushed quadrotor, a “totally DIY" project using my own C++
firmware (Multiwii clone with hardware abstraction), 3DFly
3D-printed frame, and, best of all, a 32-bit brushed-motor flight controller that I built from a Teensy 3.2 board. Why build your own brushed flight controller, instead of using one of the many excellent commercial FCs available today?
Apart from the educational value and satisfaction of building something yourself, I was frustrated by the the limited signal pinout on the commercial off-the-shelf (COTS) boards. Inspired by the work of Geof Barrows with the Crazyflie platform, I wanted to be able to connect an I2C or SPI sensor to my brushed flight controller, while still using a standard R/C transmitter / receiver. Like many others, I am also drawn to the Teensy/Arduino platform because of the enormous variety of code libraries available for it. By the time you hear about a new sensor, there's likely already Arduino support for it. Finally, I had spent a significant amount of time developing my own hardware-independent C++ firmware , which I already had working with COTS flight controllers on a brushless-motor quad, a brushed quad, and even a DIY simulator. So I was reluctant to buy into another open-source project like the (admittedly awesome-looking) Crazyflie, with its own firmware, radio, base-station software, etc.
The photo below shows one of my earlier attempt to build an FC using a Teensy board and a standard MPU6050 Inertial Measurement Unit (gyro/accelerometer) breakout board. It's obviously much too big for a brushed copter,and I had such poor results using it on one of my brushless vehicles that I gave up, and returned to trying out COTS solutions.
Then I stumbled across the Pesky Products store on Tindie. Not only was there a cutting-edge IMU shield (with magnetometer and barometer) suitable for mounting on a Teensy; there was also a shield for turning PWM signals into rushed DC-motor voltages. Thirty-six bucks and a few days later, I had them in my shop. I soldered pin sockets on the Teensy and pin headers onto the two shields, then soldered a female 1.25mm micro JST connector to each of the four motor through-hole pads on the motor shield. For battery power I cannibalized the power cable on an old Hubsan X4, soldering female jumpers onto the ends (though I subsequently discovered that you can get even these cables on Amazon!) This allowed me to use the standard set of 8.5mm motors and 3.7V battery for this vehicle.
I modified the Pesky Products IMU code to work with my firmware, and then used my own Arduino PWM input library to access the radio signals on my FrSky VD5M receiver. To flash the firmware and test the motors and the receiver signals, I made up a no-power USB cable following the “Option #2: Cut the Red Wire” directions for the Teensy (No, the RED wire!!!) Several iterations of modify/flash/test later, it was up and flying.
Although the all-DIY quad has about the same gross weight (60g) as the equivalent vehicle with a COTS board, the DIY version is much bulkier. It also doesn't take advantage of the awesome FrSky-compatible micro PPM receiver that I prefer for indoor vehicles; so, instead of one signal wire from the receiver, I need four (or five, for the auxiliary switch). So now that I have a flying prototype, my next steps are:
- Get another Teensy, IMU, and DC motor board and mount them together directly with pin headers for a much flatter profile.
- Get the micro RX working with an existing Arduino PPM library. I nearly got it working with this library, but I was doing something wrong, because when I powered up the motors, the throttle and yaw signals would swap values with each other intermittently (Yipes!)
One I've done that, I'll do a proper build post, then start comparing flight times and current draw against a COTS board. No data on that yet, but my impression is that the DIY board flies maybe a half or a third as long on the same battery. (I've also ordered a compatible battery with twice the charge, which should improve things – and this time I ordered the one with the correct polarity!)
Meanwhile, the firmware is on github if you want to look it over.