Building a Micro Quadcopter, Part 0

We had a requirement to build a micro quadcopter for a workshop in March, so I needed to get all the hardware together and see that it's possible. I've labelled this as "part 0" because I really just want to assess the feasibility at this stage. Any subsequent parts will be the actual building.

OK, I'm going to build a 10cm quadcopter weighing around 35g, so I had a root around the house for some bits...



I assume that everybody has this stuff lying around waiting to be made into something that can fly, or maybe it's just me?

My design is as follows:

4 x HubSan X4 replacement motors 15g
Flip32+ Flight Controller 8g (but you can get a 2g version)
FrSky D4R-II 6g
1S LiPo 8g
Total: 31g

Then I need a frame (Depron) and some means of connecting the Flip32+ to the brushed motors. A HubSan X4 weighs in at 33g and has rotors spaced 9.2cm diagonally, so it looks like I'm in the right area. The two questions I need to answer in terms of feasibility are whether the flight controller and receiver will work on a 1S LiPo and how the flight controller is going to drive the brushed motors.

The 1S LiPo voltage question is easy to answer:



It works! But to explain how I got here, the Flip32 was flashed with the latest NAZE32 firmware (1.11.0 NAZE 2015-11-28 17:37 STABLE) with the radio configuration set to Parallel PWM. My Futaba Field Force 8 is using a FrSky module and is bound to the D4R-II receiver. I checked the transmitter and receiver separately first by powering the receiver with a battery and making sure that I could control a servo plugged into channel 1. Once I was sure the radio was working, I connected it to the Flip32+.

IMPORTANT NOTE: it seems that the FLIP32+ needs to have all four channels connected otherwise nothing works. It took me a while to work this out.

Channel 1 of the D4R has connections for +, - and signal, while channels 2,3 and 4 only have their signals connected by single wire leads. You can just about see the connections in the next picture. This means that the receiver is being powered from the flight controller, which in turn is about to be powered from the 1S LiPo.

The breadboard is only there to make it easy to connect the relevant wires, so the LiPo is connected to the + and - pins on the motor 6 connection of the flight controller, simulating an ESC supplying power via its BEC. Wires go from the LiPo to the breadboard, then from the breadboard to the flight controller. I'm using a servo lead with bare wires on one end and the signal wire loose to connect the power.



That was easy, you can see the graphs on the Cleanflight radio configuration screen showing the control inputs as I waggle the sticks on the transmitter.

Now for the hard bit - brushed motor control. The Ready to Fly Quads website sells a brushed motor controller which is intended for use with micro quads: http://www.readytoflyquads.com/brushed-motor-driver

The problem is that I don't have one of these and the only source seems to be the US, so I'm going to have to make one. Using a MOSFET to drive a brushed DC motor from a logic output is a fairly standard circuit. Actually, though, my first idea was to use the L293 H-Bridge driver IC which I had used on a previous robotics project using a 3.6v LiFe power source. Unfortunately, I couldn't get this to work as it's really a TTL logic device and won't work below 4.5v, but a 3v H-Bridge Driver would be a good choice.



I'm not suggesting anybody copies this circuit because it isn't very good, but I just used what I had to hand. The LiPo powers the motor, but only when the input to the transistor is high (on).

Now comes the interesting part. Cleanflight contains code which is designed to be used with brushed motors and which drives the motor output pins at a much higher frequency than is used for brushless ESCs. You need to go into the command line and set the following options:

feature MOTOR_STOP
set min_throttle = 1000
set motor_pwm_rate = 32000
save

So the PWM drive for the motor should now be set to 32KHz. Connecting everything back up, here is what I ended up with:



I tested the PWM output from channel 1 using the motor configuration screen on Cleanflight, measuring the pulse frequency to make sure it was 32KHz and that moving the throttle on the configurator screen varied the mark to space ratio correctly.

Now there's only one thing left to do - connect up the motor and see it spin. Before doing this, though, I made myself a small frame out of Depron so I could attach the motor and prop and not have it jumping all over the desk.



That's all there is to it really. The motor spins when I use the mouse to move the throttle slider up and down.

Whether it will fly is another question, but I think it's a viable project. I just need sort out the motor control circuit.

Comments