Thursday, November 28, 2013

My Quad Copter

I have built my first quad copter after looking at a bewildering array of information about helicopters, aka drones. Here are the decisions a newcomer must make. 
How many propellers?  Three, four, six, or eight?
What size propellers and motors to use? 
What size battery?
What type of flight controller? A Hoverfly? A MultiWii? An APM Copter? and others I probably haven't heard of.
What type of construction?  Aluminum? Carbon Fiber? Plastic? Someone even made one of Styrofoam.
Since my goal was to be able to carry a GoPro camera, that set the basic requirement.  A copter big enough to lift 250 grams and stable for photography.  Since quads appear to be the most common design, as well as the simplest, I chose to build a quad.  I consider tri copters more complicated than quads because one motor and propeller unit must be tilted by a servo.
The frame construction was an easy choice for me.  Since I have metalworking capabilities, I decided on an aluminum frame.
Next was choosing a motor and propeller combination.  I saw a quad using NTM  28-26A 1200kv motors and 9 x 4.7 props, so I went with that.  It was a good choice, for my quad was stable from the first flight.

For a battery, I chose a Turnigy 3000 milliamp hour, 40 amp battery. This is a good battery, but the flight time is only 10 minutes. Next time I will go a little larger.  I added a low voltage alarm, but next time I will simply add a buzzer to the MultiWii board.
Next, a flight controller. Since I learned about Hoverfly products before I became aware of the other choices, I went with a Hoverfly Sport.   It is a good, ready to fly board, but is more expensive than most and has only one added feature, an ultrasonic altitude control.  Unfortunately, it does not have auto level, which is helpful for inexperienced pilots. 
I decided to replace the Hoverfly board with a MultiWii board from Hobby King.  It is loaded with features, and is only $27.  Containing both gyros and accelerometers, a compass, and a barometer, it gives you a lot for your money. .  The MultiWii software has auto level, heading hold using the compass, and altitude hold using the barometer.
Here is the MultiWii board connected to a 6 channel Spektrum receiver:
One thing I like is that the board and the receiver can be powered by the USB cable. This makes programming and troubleshooting easy, for there is no need to have the motors, ESC's or battery attached.  
  I removed the pin headers and soldered short PWM cables directly to the board. Knowledgeable readers will realize that the black and red wires are redundant. Only one of each is needed. But the weight savings is minimal, and I felt that having complete cables for each channel might make troubleshooting easier.  
 I soon tired of attaching a USB cable, so I bought an MWC Bluetooth board. At only $8.30 including shipping, it is a bargain.  It comes preconfigured for the MultiWii baud rate of 115200.  The Bluetooth pair code for these boards is 0000. It worked instantly on my Toshiba laptop running Windows 7. 
Here is a screenshot of MultiWii Config while communicating through the Bluetooth connection. On my laptop, the connection uses COM42.
 
Having settled on a quad, I began the 
design of the frame.  I did not care for the nearly universally used construction of a rigid center consisting of one or two plates with arms bolted to them, for I consider it inefficient and heavy.  Also I wanted to make my quad fold, and that design generally requires all four arms to be loosened and pivoted.  My design eliminates the need for the heavy center section by by using two long spars attached in the center instead of four short ones.  Now my center section does not carry any flight loads, and primarily serves as a protection for the electronics. 
The bottom of my center section is an aluminum sheet about as thick as a beer can. I rolled the edges for stiffness. The flight control board is attached to the two studs seen in the picture of the bare frame.  Using only two mounting points for the board has worked well. 


 The ESC's are attached to the arms, and allow the arms to be folded, as seen here:

This version never flew. I became aware of Hobby King's 12.8mm x 12.8 mm aluminum tubing, which was far lighter than my aluminum C channel with its 2mm thick walls. So I used my thick aluminum only where necessary: For the center section and the motor mounts. 



The joints are epoxied with J-B Weld, and have proven to be exceptionally strong. I have had a few mishaps while learning to fly, and while I bent a few pieces, these joints never failed.  The tongue of the machined part is 12 mm long, and has grooves to match the internal ribs of the HK tubing:


These pieces are for the camera mount.  I used the same design for all of the epoxied joints.






The motor wires run inside the tubing. The connectors fit inside, but must be inserted one at a time to get through the small opening in the motor mount.


 Because I had a lot of #16 wire, I used it, but doubled it. That is why there are two wires going to the connectors.
Attaching the motors with only 2 screws has worked well. The motor ends are stainless steel, and very strong. The 3mm stainless socket head screws are quite strong, too. I have not had any problem with motors coming loose.

An aluminum cover secures the wires and protects them from impact should the quad suffer a bad landing.


The accelerometers should be calibrated frequently, and it is important that the copter be level when this is done.  To make this step easier, I attached a small bubble level to one of the arms.



Here is a bottom view: 

The camera mount attaches to the center post, which is the backbone that holds everything together. The camera is well protected here, and has an unobstructed view. 










The plugs for the battery pass through holes in the camera mount. This holds them securely and makes connecting and disconnecting the battery easier.
     After a few test flights I realized that having the ability to cut power to the board is useful for a few reasons. One is that a hard landing, aka, a "crash", can cause the board's program to freeze and leave a motor running. It is much easier to flip a switch than unplug the battery.  Another reason is that you can plug in the battery in without worrying about an accidental arming of the board. Yet another use for the switch is in troubleshooting. Since the board can be powered by the USB cable, the switch can be turned off, which prevents the ESC's from receiving power from the USB. Since the switch is only carrying the current needed to power the flight control board, it can be very small. It can be seen in the lower right corner of this picture.













The Hoverfly board can use a sonar for altitude control, so I bought a Max Sonar unit.  The board looked fragile for something that needs to be mounted under the copter, so I made a Plexiglas enclosure for it.  The sonar worked well, but with limitations. The Hoverfly is programmed to enter a gentle climb when the sonar reading is unreliable. That means if you climb out of range of the sonar, the copter will keep climbing, even if the throttle is set to zero.  If this happens, you must be careful to set the throttle to an approximate setting for a hover and then switch back to conventional control.  Otherwise, you could lose control of the copter.

The MultiWii board has no provisions for sonar. However, its other attributes outweigh this shortcoming.


Here is how I programmed my 6 channel Spektrum transmitter to give me 5 different flight modes with the MultiWii board.


 Set Gear and Flap sub trim to zero
 Set Flaps to 100% with zero Elevator




Set Mix 1 to mix Flap with itself.  The Flap switch enables mode #2.
Set 100% down and 49% up.
Flap travel is set at 116% up.  
I am using the Aileron D/R switch as my mode #3 switch.
You may use whatever switch you prefer.



Set Mix 2 to mix Gear with itself. The Gear switch enables mode#4.
Set 9% down and 72% up.
Gear travel is set at 93% up.
I am using the Elevator D/R switch as my mode #5 switch.
 I have the following modes set up:
#1:  Normal mode.
 All switches are off for this mode.
On MuitiWii config, Aux 1 & 2 are approximately 1100.
#2:  Horizon: provides a mixture of normal flying and auto level.
The Flap switch is on, the Aileron switch is off.
Aux 1 reads approximately 1900
#3:  Mag: Uses the compass to keep the copter oriented in a particular direction.
The Flap and Aileron switches are both on.
 Aux 1 reads approximately 1500
 #4: Headfree: Uses the compass to make the copter behave as if it is always facing away from you.  This is helpful for preventing becoming disoriented in flight.
The Gear switch is on, and the Elevator switch is off.
 Aux 2 reads approximately 1900
#5:  Baro:  Uses the barometer to provide altitude control.
The Gear switch and the Elevator switch are both on.
 Aux 2 reads approximately 1500

The Gear and Flaps do not interact with each other. That means you can choose combinations of modes 2 & 3 and 4 & 5.   The settings I used, as well as the switches I used are optional.  There are  many possible combinations.   All that is required is that you have settings that will make Aux 1 & 2 have 3 positions of approximately 1100, 1500 and 1900.

I had to set both the Aileron and Rudder  to reverse for proper operation on my quad.
To get my board to arm and disarm, I had to set the Throttle, Rudder, Elevator, and Aileron travel adjustments at their full limits, 125%.


The quad flies well, and here is the proof, an aerial shot of my house.