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.



Sunday, April 28, 2013

Mini Mill Solid Column Conversion

The original design Sieg Mini Mill( sold as Harbor Freight, Grizzly, Little Machine Shop, Micro Mark, and others) featured a tilting column that few people used.  The pivot point and the relatively thin column allowed for a considerable amount of flex in the machine. I found this especially troublesome when using a boring head, for its single cutter creates a highly unbalanced load.  I could only take very light cuts, or the column would flex.  Fortunately, Little Machine Shop has been working with Sieg to improve their products sold under LMS' Hi Torque brand.  First they enlarged the table significantly, then they replaced the motor and noisy gears with a more modern design. That left one area to improve, the flexible column.
 The new solid column is not just the old column with the pivot removed, but an entirely new and much heavier casting that weighs 11 pounds more then the old one.  28 vs. 17.  That is a huge 64% increase in weight.  The weight is in additional wall thickness.
      At left is the original column, where they apparently tried to make it as thin as possible.

Here is the new solid column, with wall thicknesses about double the original, and a substantial mounting flange cast as one piece, rather than bolted on as before.

 Since there is much less space inside the column, I had to trim the head of the bolt holding the gas spring in order to get it to fit inside.








The solid column comes with mounting holes for the Hi Torque electronics, which mount differently than the Harbor Freight electronics.  At left is the unpainted HF column, showing the mounting holes, and the painted Hi Torque column below it. I drilled the new column to match the HF, see below.  I also drilled a hole for the gas spring conversion.

Since I had everything apart, and I am now aware of the added stiffness of the solid column, I decided to add a spacer to the head which extends the head out 19 mm and moves it up 20 mm.  I made the spacer from a piece of 3/4 inch aluminum.  It has 4 tapped holes and 4 clearance holes.  The spacer bolts to the front half of the head, and then the rear half bolts to the spacer.






This mod uses the 4 original 8 mm socket head cap screws and 4 hex head bolts, 8 mm x 35 mm.







Spacer bolted to front half of head.












Rear half of head is then bolted to spacer.  This picture shows all that is left of my original Harbor Freight mini mill.  Everything else has been replaced with parts from Little Machine Shop.  Even this remnant of the HF machine has 4 significant mods:
Belt drive conversion.
Gas spring kit
Spring loaded spindle lock
And now my spacer.
Still to be done is the relocation of the fine feed knob. Eventually this will be replaced by a ball screw Z drive.
What does the inside of a mini mill head look like?  Here are some pictures:

The intermediate gears are no longer used. I left them in place, but locked their position so that they are disengaged from the main shaft.


The rear half of the head showing the pinion gear.


The finished machine. It is a vastly different mill than the original Harbor Freight mill.



I put the machine through its paces and while it was much improved, it still had some head shake under heavy loads.  Even though I had the gibs very tight, when I placed my finger so that I was touching the head and the column at the same time, I could feel the difference in vibration between the head and column.  This meant the head was moving against the column. Unlike the gibs for the X and Y axis, where the forces are mostly pressing the sliding parts together, the head is hanging from the dovetails on the column.  This means that the four 6 mm setscrews are supporting much of the load, and their contact area is very small.  I added a fifth setscrew, and milled smooth recesses in the back of the jib where the setscrews press against it.  This solved the problem, and my DRO no longer changes its reading when I tighten the lock..


One thing I did not expect when making the conversion is that the column is moved nearly 2 inches forward on the solid column base.  Here is a photo of the two bases showing the location of the column on each.  With the pivot assembly gone, Sieg was able to move the column forward where the pivot used to be.  While this would not be a problem for most users, the column now interfered with my 4 inch vise, which I had machined to clear the pivot.  I decided that the easiest solution was to change back to the tilt column base and make an adapter to fit the solid column to it. I wanted my adapter made from cast iron for the same reasons machinery is made from it.  It has good wear and vibration dampening properties.

I scoured my local scrap yard for a suitable piece of cast iron and found something with nearly perfect dimensions for the job: A 10 pound barbell weight.  At about 8 inches in diameter and nearly an inch thick, it required a minimum of machining to transform it into an ideal adapter.  First I surfaced both both sides to get them flat and parallel to each other. Then I cut it square and drilled the holes.  I also had to machine a step in the bottom to match the step on the base.





 Prior to machining the step, I milled the top of the base flat.  This part of the casting was smoothed with body putty, a trick Chinese manufacturers have been using for years.  I milled the surface down until I had clean metal, then I machined the step in my adapter to match.




I then bolted on my adapter and drilled the holes for the 8mm column mounting bolts into the base.  I drilled these 14mm deep to accommodate 50mm long bolts. After the holes were drilled, I removed the adapter and applied JB Weld to the rear surface of the base, and reassembled it.

  I did this because I wanted the adapter and base behave as one piece when I tapped the holes, and while torquing down the column.


After the JB Weld cured, I tapped the 8mm holes for the column and assembled the machine.  The column is now moved 0.85 inches toward the rear compared to a stock solid column mill.  This is not as far back as the location of the tilt column due to the fact that the solid column has a flange in the rear.  However, it is a big improvement over the location of the stock solid column machine.
That created a new problem.  The rubber bellows no longer reached the column, so I made a bracket which clamped to the column dovetail and shortened the distance the bellows needed to stretch.


 A setscrew in the side provides the clamping force in the same manner that jib adjusting screws work.












I lowered the mounting point to give the Z axis stop a place to rest that is below the surface of the table.  The original bellows mounting screw holes can be seen above my clamp.


Here is the Z axis stop in its resting position. Here it does not interfere with my vise, the end of which is visible on the left.

I believe the finished machine is at least as good as a stock solid column mill, and has some advantages. The additional clearance of 0.85 inches may not seem like much, but on a small machine like this, it is significant.  My spacer in the head increases the throat depth by 0.75 inches over the stock machine.  The combination of the tilt base and adapter plate is very rigid, with the 8 pound plate solidly attached with 7 bolts.  This is a viable alternative for those who want the advantages of the solid column without having to discard their perfectly good base.