Sunday, November 20, 2011

Assembly complete!

With the frame together, I slapped together yaw mechanism.  (For yaw to work properly, a tricopter needs to be able to rotate one motor about the axis of its arm).  It's sort of tricky to make one that's slop free.  The more wobble there is between the servo arm and the movement of the motor, the worse the tricopter will control.  I made mine tight by using a delrin-like material for the motor mount.  I say delrin-like because the material is just a bit softer than delrin.  By drilling it out a bit smaller than the shaft that it rotates around, I get a really solid grip.  It moves pretty freely too.  The shaft that the motor mount rotates about was then attached to the frame by binding the two with some thin steel wire, then soaking the mess in CA glue.  It's solid.  The servo was attached similarly.
The shield containing the arduino and wiimote sensors was mounted on some slivers of the Tempur-Pedic foam.  I first tried cutting it with a hot wire which worked okay, but I found that a sharp xacto did a better job.  I used small amounts of CA to glue it to the frame and the board.  Otherwise, the foam tends to soak up CA and turn into a brick.  The board is now nice and squishy.  The foam does a really fantastic job of killing vibration.
I tested it by putting the board on my phone (set to vibrate) and taking sensor readings.  I then put a sliver of foam under the board, and watched all the wobbles go away.
Before flying, I had to adjust the PID settings.  PID or proportional integral derivative is a type of algorithm used in control systems.  It's used in a lot of places, from line following robots to HVAC systems.  In my case, P values set the amount of force with which the tricopter resists motion.  If P is too small, the tricopter drifts, and if it's too big, it will oscillate (overcompensation for a change in motion creates a runaway feedback loop).  The I value takes where the tricopter is, where it should be, and the time that it's been off to determine how to correct itself.  This also prevents drifting.  The more time the tricopter has not been in the right place, the harder it will work to get there.  The D value increases the speed of recovery, but if too high, it can also amplify oscillations.
I've learned that PID tuning is a fine art, not only is there a PID loop for each axis, but each variable affects the others.  It took me almost a day of trial and error to get a nice stable platform.  The values I used are to the left.
I'm really pleased with the gyro stabilized flight mode, it feels really solid with the exception of small oscillations after quick maneuvers.  I need to look into that.  For smooth hovering and basic flight, this setup rocks.

To change settings, all I need to do is upload new values to the Arduino.  I do this with an FTDI programmer.  One end plugs into six arduino pins, the other into my computer's USB port, then magic happens.

anyway, flight videos soon!

Thursday, November 17, 2011

stabilization system assembly

Yikes, it's been a while.  I was sort of hosed this week, so this was last weekend's work.
The rest of the electronics arrived yesterday, including a Wiimote and nunchuck.


They obviously didn't want to be disassembled.  I quickly encountered the infamous Nintendo "tri wing" screw.  Not even the immense tool collection of MITERS had such a screwdriver.

Instead, I drilled them out, absolutely mangling the cute Nintendo peripherals in the process.  The sensors intact, I desoldered their proprietary connectors and replaced them with wires.
Next, I soldered the arduino, 90 degree pin headers, and sensors to the shield.
I plugged it in, and it didn't work.  I was frustrated and sleep deprived so it took me extra long to figure out that the two data wires were reversed.  Easy fix, and...
YAY!
The thing in the background is an open source piece of java based software used for multiwiicopter configuration.  It's pretty straightforward to use, and it lets me know that the board is working.  Each of the colored lines represents the magnitude of a gyro or accelerometer reading.  It was pretty satisfying to see my motions made into a graph in real time.
Riding an enthusiasm wave, I soldered connectors to my motors and speed controllers.  (reversible connectors make it easy to reverse the direction that the motors spin without desoldering anything)
 I also drilled some holes in my frame and attached the motors and props just to see how it looked.
sweet!

Anyway, I wrote this post while waiting for my batteries to charge so I can start testing functionality, and now they are charged!

Saturday, November 5, 2011

Foam and Frame

I somewhat awkwardly picked up my Tempur-Pedic Sample Kit from the mail today.  While I may someday be interested in the purchase of a mattress of theirs, today is not that day.  I'd read elsewhere on the internet that the  Tempur-Pedic mattress foam makes a fantastic vibration damper, and indeed it seems to.
  The sensors on a multicopter need to be fed the motion of the aircraft as accurately as possible, and things like motor vibration, and oscillations in the frame and booms tend to screw up those sensor readings.  I did a simple test by placing my phone on my desk, asking it kindly to record its accelerometer readings, then banging on the table.  I did the same with a chunk of foam underneath it, and all of the nasty spikes in the data went away.  Cool.
Last night at MITERS, I slapped together a quick and nasty frame.
 I was searching for compositey stuff to make arms from, when I spotted some bamboo.  Many people use wood arms in multicopters, so bamboo could have potential.  It's pretty light and strong, and it's a heck of a lot cheaper than carbon fiber or even fiberglass.  I was worried it would split at the end (rather like composites tend to) so I wound some thread around it and CA'd it solid.
  We'll see if the booms are as fantastic as I'm hoping they'll be.  If they're not super stiff, I might try layering and gluing multiple pieces to get a bigger cross section.  Hrrm, bamboo composite could be interesting.
To get those beautiful 120 degree angles, I sloppily cut out an equilateral triangle from thin acrylic sheet and drilled some holes in it for zip ties.  The sheet is another source of flex in the frame.  If my other components turn out to be so heavy as to make the flexibility a problem, I'll probably add a second layer of triangle.  Standoffs between the two layers would let me mount sensitive electronic things in there instead of leaving them out in the open.
Anyway, as soon as my parts get here, I can get a better idea of the scale and proportions of what I'm making.  For now it's just prototyping for funsies.

Thursday, November 3, 2011

Pre-CADding

Here's an update on progress.  I made a cad model of some sketches I had.  I want to get an idea of scale so I can make the necessary tweaks.


Also, some of the components for the control board have arrived.  I'm feeding sensor output from Wiimote and a Wii nunchuck boards to an arduino.  Pictures when I get my hands on those.