Jason Lyons's Posts (2)

Sort by

Setbacks and Batteries

Well, after playing more with the IMU, the roll gyro has stopped working! I performed a visual inspection of the breakout board, and didn't see any shorts or signs of arcing. I reworked all the solder joints, making sure none of them had come disconnected. Finally, I removed the gyro daughter board from the IMU and tested it on its own, still no luck. The self-test function also is not returning anything, so I think it's stuffed.What a pain in the ass! Just as I was starting to get somewhere with the Kalman. Fortunately Sparkfun have offered to take a look at it and see if they can figure out what's wrong (and perhaps replace it!), as at the moment I can't afford buying any new sensors ($30 shipping every time is a killer!). If I have to buy a new one, I guess I'll have to wait until I have enough cash for a GPS unit, magnetometer and TTL->USB board as well so I don't get nailed for shipping twice.In the mean-time, I ordered some LiPo batteries for super cheap off ebay (E-Fly 2S, 900mAh, 15C), 3x batteries for $10! And only $10 shipping (from Hong Kong). I know what you're thinking.. never buy cheap & nasty batteries, but this is a low-budget project. I'm hoping these batteries will replace the 8.4V 650mAh NiMH batteries that my helicopter has been flying off, and that the weight saving will give me a bit more leeway with my autopilot payload. The only thing that I am concerned about, is that if these LiPos have built-in under-voltage protection (ie. switch off after reaching 3V per cell). Is that standard on all LiPos these days? Being a no-name brand, I couldn't find any specs on the batteries themselves..If I can sort that out, hopefully I can blow the dust and cobwebs of the heli and get some flights going this weekend to re-balance the helicopter and trim it right up.
Read more…

Goals and First Start

I thought I'd start out by outlining the goals of this project. Several years ago, I bought a remote control helicopter from Hong Kong, it's a Walkera Dragonfly fixed pitch helicopter (pretty much identical to the E-Sky Honey Bee Micro, or the Twister). It was pretty difficult to fly, and almost impossible if there was any wind. After I started getting into microcontrollers and control systems at uni (I'm now in the final year of an Elec engineering and Comp Science double degree), I started playing around with an Arduino and after awhile decided that I'd like to build a PID (or LQR) stabilization controller for my helicopter to make it easier to fly if I ever had the time (and then evolve into full automation if I can). This was a year ago, and in the mean time I haven't really had time to do much about it. Now it seems I finally have time (or, at least, the willpower to make time for it).I already had an Arduino Duemilanove, so I bought my first sensors a couple of months ago when I was all cashed up. I got these:ArduIMU Main board (4 DOF with room for 2 more gyros)http://www.sparkfun.com/commerce/product_info.php?products_id=93722x ArduIMU Daughter boardshttp://www.sparkfun.com/commerce/product_info.php?products_id=9373I got these about a week later, and assembled them no problems. I was surprised just how small the unit was. I managed to do some basic coding (getting the values from the Arduino to serial) but decided to save the rest for the summer uni break.Fastforward to now: I started working on it again about a week ago, and due to full-time work experience I only really have evenings with which to chip away at this project. I've got the sensors connected to the Arduino and I'm scaling the ADC values to units of gravity and degrees/sec, then calculating the gyro angle (in radians) through integration and acceleration angle using arctan2.Here's the setup:

Then I recorded a sample, rolling right & left then pitching down and up and yawing right then left. The X-axis is time in seconds.

As you can see, there is quite a bit of drift on the gyros, so I'm going to implement a Kalman filter to hopefully eliminate this.
Read more…