So over the last year or two I’ve been intermittently doing stuff with unmanned aerial systems. Nothing for work, strictly hobbyist stuff, and strictly for fun, though with a serious goal in mind.
More or less every year now the village I live in floods. The degree to which it does so varies, as does the response from the council and locals. Last year we managed to get aerial photography from some friends with a light aircraft handy which was fascinating to see – we could start to see the bounds and patterns of the flooding in context. Trouble is, it took a while to arrange and we only got one set of pictures.
Wouldn’t it be nice to be able to get more pictures, faster? Here’s my story so far in the wonderful world of multirotors…
Right away I made my first mistake: I bought into the UAir kickstarter for my very own little quadcopter. The UAir kickstarter turned out to more or less be a scam (and the company disappeared, only to reappear months later in South Africa under a different name), delivering an unflyable vehicle, broken hardware, awful flight controllers and telemetry. The code, far from being state of the art, was atrocious, and lacked key features. The hardware turned out not to be well-designed, either. The metal frame was prone to bending, and mounting options were limited. The speed controllers could easily short themselves mid-flight and the motors were hard to source, used collet-type rotor clamps that in two cases detatched during flight and in one case snapped the motor shaft off on landing.
Having learned that expensive lesson I went about replacing parts until I had something flyable. My first iteration simply took the existing flight hardware, and replaced electronics; the speed controllers with JP 40A controllers, and the flight controller with a MultiWii – this got me flying, briefly. Then a motor failed mid-flight, flipping the quad and delivering it at some speed into a fencepost, breaking the frame entirely (and taking a chunk out of the post)
For revision three, I decided it was time to retire the metal frame and replaced it with a clone of the DJI F450 glass fibre/plastic frame, adding a set of landing gear to provide some additional clearance to hang payloads. I also swapped the MultiWii for an OpenPilot CC3D, which cost about the same but had a massively nicer set of tools and much more actively developed code. The CC3D was the first flight controller I’d used to feature the STM32 series of microcontrollers, which are a huge improvement over the 8-bit Atmel based flight controllers I’d used previously. As well as having more room for complex code, the sensor filtering and fusion algorithms you can fit into these chips is clearly worlds ahead of things like the ATmega series.
The F450 frame has served me well so far. I replaced my Keda K20 motors with a set of 2217 880KV motors after a bearing failure on one of the K20s; the 880KV number is effectively a torque rating – these motors are decent mid-range lifters, and the quad can happily lift about 800g of payload in addition to its dry mass of about 1.5 kilos (including battery). It might carry more, but I’ve not tried yet.
Slung below the frame is a battery mount and vibration isolating gimbal mount, all hanging from a set of carbon fibre load tubes and both themselves carbon fibre. I tried several options for mounting cameras, computers and batteries before settling on this option for now. My first attempt was to build a battery housing which would hang from the load tubes and be vibration isolated, and then to mount the camera on that ‘clean’ section. This worked, but the balsa construction failed catastrophically in a ~300ft crash, and I opted for a more rigid approach. The crash was the first serious crash I’ve had – I flew nose-in and lost my bearings, tried to correct but failed and ended up cutting the motors when I couldn’t see it clearly. The tree actually cushioned the blow…
Remarkably, all of my hardware was ready to fly again immediately, sans one chipped prop blade.
While I don’t yet have a gimbal – widely accepted as being a non-optional addition to any multirotor for smooth video or photography – I do have a camera in the form of a Raspberry Pi B+ and camera module, seen above. It’s not perfect, but it does work quite well. I have some Python code which handles locking off the white balance and exposure settings on startup to avoid the sky causing the camera to overcompensate, causing the ground to just appear as a dark blob.
I’m also trying to get this video multicast back down to a ground station, but that’s taking some time – I have an old camera bag with a Ubiquiti Bullet M2 access point and Mikrotik 750G router which the Pi will connect to if it can see it. Latency is a major issue for real-time feedback to help adjust flight; there looks to be a lower bound on that of around 100ms with the Pi’s video encoder etc.
I’m lucky to live in a rural area where flying is straightforward, from a legal compliance perspective – it’s easy to stay the required distances from people and buildings. I am (just) within the RAF Brize Norton CTR airspace so can’t exceed 400 feet in altitude but that’s really not an issue; I’m actually pretty certain I’m fine to fly higher given I’m flying a sub-7kg drone non-commercially, but I’ll be talking to Brize Norton to ask permission before I do so, just to be sure. It’s easy to see anything coming remotely close and get on the ground fast, so from a purely practical perspective it’s not an issue, but I’ve been making sure I comply with absolutely all of the CAA guidance and requirements throughout all this. I’m also a fully paid-up insurance-holding British Model Flying Association member – this gives me third party liability cover in the event of an accident.
The only major downside to all of this is simply cost. It’s not an exaggeration to say that I have spent more on this project than I have on, say, my car, or my main computers. It’s incredibly fun – not just the camera side of things, but actually flying. Items like motors and speed controller are £30 a pop – so now you need four of everything and suddenly that’s £240. Batteries are £40, carbon fibre frame parts range from ~£25 to ~£200 depending on the part, simple flight controllers and radios are <£100, but are limited. Props may only be £5 a pair, but you get through plenty while learning! Then there’s all the ancillary bits and pieces you need – power step-down boards, battery connectors and power wiring, it all adds up.
I’ve done a lot of building my own stuff, too, like soldering up my own power distribution looms and so on; this is something you can avoid doing but it’s much more fun to do so if you ask me!
My latest step is to upgrade the electronics on my quad, now I’ve gotten the actual flight hardware fairly well sorted. This involves replacing the CC3D with the Pixhawk flight controller, which is basically the most powerful flight control board out there (perhaps aside from DJI’s A2/Wookong boards, but neither of them are open source and both are viciously expensive). I’m also replacing my old Turnigy 9X radio with a Taranis X9D+ and X8R receiver combo, which gets me 16 channels of remote control and simple telemetry. The Pixhawk can make use of the MAVLink protocol for in-air control and telemetry, so I’ve got a set of 3DR 433MHz telemetry radios to do just that.
The main enhancement, though, is a GPS board for the Pixhawk to finally add “semi-autonomous” flight to the project. The goal of this next step is to get the quad to the point where it can fly itself, doing position hold and pre-programmed flight routes. I purposefully didn’t choose to do this from the outset so I could learn how to actually fly – I think I have a decent chance of being able to recover from an autopilot failure now. The Pixhawk/PX4 stack, based on the NuttX real-time operating system, provides a really great platform not only to use out of the box but to develop applications on, and to integrate with external computers. This opens all sorts of possibilities up!
There’s still a lot to do in order to turn this quad into a serious platform for aerial photography. I’m going to mount a second Raspberry Pi (A+) pointing straight down with the NoIR camera to play around with vegetation analysis, and I still need to get a gimbal and a camera with a larger bit of glass on the front than the Pi camera for decent, stable photos! A first-person-video link would also be a huge bonus and help with orienting and flying the vehicle, but as with the GPS I’m holding off till I’ve had more practice. Still, even with this fairly simple rig I’m flying right now I can take decent photos and video, learn to fly properly and have a lot of fun. If you don’t mind bankrupting yourself, it’s a fantastic hobby.