Project History

In 2000 and 2001 I was taking pilot classes learning to fly Cessna single-prop airplane in a hope to get the pilot license. Unfortunately in 2001 our country was hit by the 9/11 tragedy, so all the small airports around the tri-state area got closed for quite some time. That ended my flying lessons, but, luckily, I was still alive – I worked then for Lehman Brothers and our company was located in the WTC…

Anyway, I still dreamed about flying and looking at Earth from high above, so, naturally, I turned to the idea of RC airplanes with the hope to equip my model with the camera and “fly” using FPV. Hobby level FPV was unheard of at that time (at least, by me J), so I did some Internet search, picked up some components and came up with the following, rather crude by the modern standards, FPV set up, which, surprisingly, still works:


By the way, the image on the screen of the FPV is the central console of my current quad.

For learning to fly RC airplanes, I decided to start simple – with 2-channel models. Each model served me usually for just one flight, which always ended either in a solid crash or, more often, in the tree. Luckily, I did not use my FPV on these planes – instead I put the camera on the RC truck and had a lot of fun driving it around the cubicles in the office navigating just by FPV. Hope my colleagues enjoyed it as much as I did.

Finally, I decided to get some guidance in RC flying, so I bought a new 3-channel model and… joined the RC flying club - http://www.bergencountysilentfliers.net/, which I am a member of still. With the help of fellow members (mainly through using the trainer cord) my flying got much better, but definitely not up to the FPV level. Actually, I am still not a great RC pilot, so, in my flight control boards, safety, ease of control, and forgiving nature for pilot errors are major design parameters.

Around 2004 in one of my Internet searches for another model to crash, I came across a fantastic piece – Silverlit X-UFO! Promotional video (https://www.youtube.com/watch?v=K-5mzOHkX1Y) showed how easy it is to fly, how stable it is – a great FPV platform for a not so good pilot like me! Therefore, I immediately decided to buy it as a present for my son…

Maybe I got a cheap clone or maybe it was just fate – my UFO did not fly! Did not fly at all! Did not even get into the air – as soon as I gave it a little throttle, it just flipped over! I contacted the company, got a replacement gyroscope – a true mechanical gyro with its own micro motor, not some cheap MEMS sensor, and replaced it – same result!

I got really disappointed! Mechanically it looked OK (much, much later I realized that one of the motors was not up to the standard and provided just about 70% of the thrust), control board seemed rather simple – just a few chips and passive elements, thus, I decided, it should be relatively simple to put together something to keep it level in the flight. I brushed up on my long dead by then electronics (I do have some engineering background – see “About Me”) and delved into quadrocopter control issues.

Rather early I realized that whatever I come up with, it will require some MCU to hold things together. Luckily one of the members of our club was a person who actually designed ESCs and radios for some companies; I approached him with my questions and got a suggestion from him to look at Microchip PIC MCUs – that’s why my boards are PIC-based and not AVR J

It was a rather bumpy ride – I had to refresh basic electronics, learn about various RC components and their communication protocols (like PWM and PPM), MOSFETs, buffers and drivers, sensors, and PIC programming and related tools. Something that looked relatively simple became a major 3-year project resulted, finally, in a control board – Version 0. It looked ugly – soldered with the TTH components on a generic solderable breadboard with a lot of air-wires, that I had to cut, bend, and solder in place. Just putting together this board took me a week of efforts.

I call it “Version 0” because it never got even close to the quad! It used just one sensor – 3-axis analog accelerometer from Freescale and PIC24F processor. The original idea was that triple-axis accelerometer should be enough to estimate attitude of the model by using gravity for reference, which is always vertical. It is true – in theory, and works fine for tilt-compensated compasses and similar devices. However, the flying models are subject to a lot of accelerations invalidating gravity as the only acceleration reference. On top of that, there is the issue of vibration, which generates ample random accelerations. A few experiments on the stand that I put together for testing proved it. So just the accelerometer does not cut it! Reaching this understanding, I scrapped this project and started a new one.

After the rather painful experience of putting together board Version 0, I decided that cutting pieces of wire and soldering them onto the generic breadboard is not the way to go. The proper way is to make custom PCB – and for that you need Eagle! Eagle is not the best and definitely not the easiest PCB design SW package, but it is FREE and, as such, has a huge user base. Some people from this user base are kind enough to share their experience in the  form of nice tutorials and are ready to answer questions on multiple forums – just drop any Eagle-related question into Google and you will see for yourself.

So I got to learning Eagle and designing my own PCBs. However, at that time I was not yet comfortable soldering SMD components, so my first PCBs were for the TTH components. Yes, PCBs – two, actually, as I was not able to fit everything I wanted onto one board!

The purple one at the bottom is the IMU – it collected data from the sensors, pushed it through the fusion algorithm implemented on PIC24HJ128GP MCU, and generated true attitude of the board relative to the plane perpendicular to the Earth gravity vector. The board used HMC5843 3-axis magnetometer, and 6-DOF “Razor” sensor board containing Analog Devices 3-axis ADXL335 accelerometer, and LPR530A Roll and Pitch and LY530ALH Yaw gyros from STMicroelectronics. Both sensor breakout boards were from Sparkfun.com.

The green board on top provides connector to plug in RC receiver, output pins to control 4 ESCs. This board is the actual flight controller responsible for providing control input to ESCs based upon the commands from the RC receiver and the attitude data from the IMU. Brainpower for all of this provided PIC24HJ128GP MCU. Flight controller board received attitude data from the IMU board over UART at 1 MHz every 2 msec.

Each of the boards also provided connector for XBee so I could wirelessly upload telemetry from them for debugging and tuning my algorithms. This was a nice setup, which could control the Silverlit quad (that started this whole project!), but not very reliably! The problem was with the gyros – these gyros have sensor masses oscillating at relatively low frequencies – 3 to 5 kHz, which is just within the range of vibration frequencies typically present on helis and quads. As I increased the throttle input, there was coming a moment when vibration frequency reached the resonance frequencies of the sensors and the attitude estimates just shut through the roof! That was the end of the Version 1 board.

Except for the vibration issue, the IMU board was actually a success and a good test bed for sensor fusion algorithm. It is still operational and recently I demoed it at the Maker Fair for kids in the local school. I wrote a Windows program displaying two airplane controls - compass and “artificial horizon”. This program wirelessly connected to the board using XBee using its attitude data to adjust the on-screen controls. When kids were tilting or rotating the board, they could see its orientation on the laptop screen a few meters away.
Equipped with all my new knowledge and experience, I immediately started on board Version 2. One of the reasons that I could not fit the previous version on one board was the fact that with the MCUs in a DIP package I could not go above 28 pins – Microchip just did not make those in PIC24HJ lineup – and 28 pins was just not enough for everything I wanted to achieve. Despite all my fear, I was pushed into the SMD space!

I bought 852D+ Hot Air soldering station and started designing the new board. I still was not sure about the SMD components – they looked so small, so I used SMD parts only when there was no other choice. Emboldened by use of digital magnetometer HMC5843 and after some research on the Internet, I decided to use a new at the time sensor MPU-6050 from Invensense, which combines a 3-axis gyro and 3-axis accelerometer in one package. The critical factor for this choice was that the X, Y, and Z-axis sensing masses in this gyro are oscillating at 27, 30, and 33 kHz respectively, which is high enough to eliminate potential for resonance with vibration. During the time I was working on Version 1, Honeywell came up with the new better magnetometer – HMC5883, so for Version 2 magnetometer also received an upgrade.

While soldering this board, I realized that working with SMD components is actually much easier and faster than soldering TTH components, so I decide that all follow-up projects will be purely SMD.

I also realized that my old Silverlit frame with small brushed motors is probably not worth any more efforts. I still keep it around for sentimental reasons, but as a platform for quad it was really outdated. So for my new board I decided to put together a real quad constructed around the Tarot SK450 Multi-rotor Frame, Hobbywing Skywalker Quattro 20A*4 Brushless ESC, and 4 Power Up 400 Sport Brushless Motors – something to build a real quad for my new Version 2 board.

The Version 2 board was the first real success – it proved to be everything that I expected from it! After loading it with my custom firmware and doing some bench tuning of PID, it happily took my quad into the air - https://www.youtube.com/watch?v=kEo5DSe7PDg! On the picture below you may see this board installed on my quad with the top cover removed to provide the better view:



Since that first flight I made a lot of modifications to the firmware – introduced “course lock” (control sticks operate the same independently of the quad current Yaw), integration of the Yaw control, intelligent management of the battery depletion, etc. Using available pins I also experimented with adding additional sensors – the barometric altimeter MPL-3115A2 from Freescale and a range of ultrasonic sensors including Maxbotix LV-EZ4 and US-020.

However, every piece of equipment at some time reaches the end of its life cycle – I wanted more on-board sensors, better resolution, GPS, ability to control hexa- and octa-copters, more RC input channels – something that this board could not provide… That was the beginning of Version 3, which will be the topic of this blog.

No comments:

Post a Comment