Monday, March 3, 2014

SlamyCopter Project - Part 1

I has been a while since the last serious stuff here. Since September 2013 I'm working on a quadrocopter from scratch (uuuh mainstream D:).

But a little story first. When I was 14 or 15 this thing here came out.


This is the Silverlit X-Ufo and one of the first r/c quadrocopters you could buy for private use. I WANTED it ... and got it for christmas :3 lol. Compared to the models we have today the X-Ufo was kinda strange as it uses a mechanical gyroscope in the middle to detect the angle. It was simply awful as this was quite a limitation. After you start this thing up you had to wait for about 5 seconds until it was ready which is not that bad as todays gyroscopes also want to calibrate themselfs to have less drift. But bad is the limitation of the angle as .... if i remember correctly .... about 10 degrees are the maximum for every axis. And not only bad but quite frustrating is the tendency to failure. The mechanical gyro was deactivated if to much g-force was applied horizontally. This always happend if you move in one direction and then flipped the joystick in the other direction very fast. The resulting negative acceleration was to much for the little gyro which stopped rotating. Without any stability system the X-Ufo crashed to it's doom. I got a friend having also one. His died first. My only weeks later....

So the years were going and after seeing the Parrot ARDrone owned by another friend and, some DJI Phantoms in the r/c stores and some videos on YouTube about the famous MikroKopter I was hyped again. The last important question was: Buying or Building? As I'm quite experienced in soldering, pcb design and digital circuit design I decided to give it a go. Until this point I didn't knew how much blood, sweat and money I've to spend to reach my goal.

The first part I've built is the motor controller which is based loosely on the schematics found here on the microcontroller wiki. And I have to say that these look quite similar to those of the BL-Ctrl. You can see my inspiration^^. My controller is based on IR2104S FET drivers, an ATMega88 and IRFR1205 FETs. The prototype looked like this and was tested using an old broken harddrive.

After that multiple things were done simultaneously. I've bought my R/C the Spektrum DX6i together with an AR2610 receiver while I've layouted the circuit of the brushless controller using eagle so that I could send it to the pcb manufactory which takes quite some time. The mentioned wait time was used for other planings as a frame had to be constructed. I first thought about building it with balsawood which is quite light. But some forums said it wouldn't be the ideal material for a project like that..... so i sticked to 10mm aluminium profiles from the hardware store.... like everyone else. Some big inspiration was Thomas Pfeifer and his quadro project here.
Sadly I don't have any photos to show here from this time...

Also I needed a cental controller which contains the "intelligence". A friend of mine suggested using the STM32F4 Discovery which he had lying around at the moment. Normaly the NXP LPC guy i tried it out and it seemed to be a rather good board.... a little bit big but whatever. Besides the controller some sensory was needed. The quadro needs to know how angled it is as usual quadrocopters are self stabilizing. Through my work I've learnt about the MPU9150 which is a monolithic chip including an accelerometer, a gyroscope, a magnetometer and a DSP :-O. This thing is simply amazing as you don't have to do any data fusion to get the 3 sensors together. At least the manufacturer praises this.....

What is still missing? Right, the motors! I've used the MK2832-35. The inspiration coming from the MikroKopter isn't deniable. The motors are quite expensive but I'm hoping for good quality here. Bad motors tend to have some problems as this german review suggests. 

After soldering the brushless controller and building a cross out of aluminium I designed a power supply board which sticks under the STM32F4 discovery containing a step down to generate 5V for the discovery from the battery pack.

Speaking of batteries. The one I use is the Turnigy 4S 3000mAh 20 which gives me ~13 minutes of flight time. For charging I use a SkyRC IMAX B6 (the non fake version :3).

Then I put it all together and finally in december my first flight was possible.
At least I tried. The PID algorithm i used wasn't optimized yet. Again Thomas Pfeifer was my inspiration as I've built myself a wooden structure containing the quadro in a free rotating position at least for one axis. The videos below will explain more about it. After I've found a quite usable configuration it was time to fly.

There are still enhancements going on. GPS, a barometer, and FPV flight are the topics I'm working on at the very moment. I've prepared also a VideoBlog on YouTube. Check them out and stay tuned for more :3.