Saturday, August 28, 2010

Using a Complementary Filter to Combat Vibration

This is the data I received from the IMU along the y-axis (pitch). Accelerometer data is in radians and the gyro data is in radians per second. The data points from 0 to 41 are before the motors turned on. 41-89 is the quad tilting left. 89-129 is the quad tilting right. 129- is the quad tilting to the left again.



As you can see the accelerometer data is quite noisy. I tried dampening the vibration using foam underneath the circuit board, but that didn't help much. Looking at the gyro data it is quite smooth in comparison.

So I looked into using filters that combine the accelerometer data with the gyro data. Using the code for a Complementary Filter (thanks to RoyLB). I was able to produce the following results.

Sunday, August 22, 2010

First Balance Test



I adjusted the support rig to hold the quadcopter at the left and right arms allowing it to pivot in only one axis. Above is a video after spending 3-4 hours tweaking the code and adjusting the PIDs (I'm still out one motor and I disabled the other motor for testing). It seems to start the balance quite well but begins to destabilized. After some debugging it looks like the receiver chip is receiving some bad signals. Sometime this week I'm going to debug the receiver code to figure out what's happening. I may also try to remove the receiver code for now to see if I can get a stable balance.

Puff!!! There Goes A Motor.

During a firmware upgrade one of the motors started making a very strange noise. After 3-4 seconds a puff of smoke, the motor was dead. Still not sure what happened. Unfortunately that means ordering another one from Hobby City which has the best price but takes at least a week to get here.

Sunday, August 15, 2010

First Take-Off



I managed to have a clean take-off and landing. I don't have any of the sensor data mixed in yet just the R/C receiver throttle. I have the quadcopter held down using zip ties. Next step, new rig to get higher and more control over the flight.

Circuit Physical Layout



Before I sent the PCB off to BatchPCB I wanted to make sure the physical layout would work. I printed a 1:1 version of the circuit and took a piece of foam and tried out the parts. Good thing I checked because I had an overlap between a couple of the components. My circuit also has expansion ports for GPS, general IO and other TWI components.

My ciruit on BatchPCB

Quadcopter Eats Some Propellers



My quad ate it's first propellers. During my first hover I guess things weren't secured as well as they should have been and the propellers and speed controllers had a collision.

Here is what I think happened: I had the speed controllers taped to the board and the quad took-off and ripped the tape up. Then I landed and the speed controllers went up into the props. Thankfully the speed controllers came out with only a couple of gashes.

Quadcopter Circuit



I'm using 3 ATmega328P processors for the prototype circuitry. The first is used to communicate with the R/C receiver and filter the results. The second is used to communicate and process the sensor data from the accelerometers, gyros, and compass. Those talk to the main processor over TWI which combines the receiver and sensor data to control the motors. The main processor also sends out telemetry data using an XBee serial connection as well as monitor the battery voltage.