Progress Update

The main focus has been on getting all the individual components working together, It was decided quite early on that because the Barometer is not accurate to the ground that it would be hard to use to keep the quadcopter at a specific height during autonomously flight. To this end I’m using an Ultrasonic sensor as well as a MultiWii control board and Raspberry PI.

Already the MultiWii board and the PI are connected using a custom firmware I wrote on the MultWii to cut communication with the PI in the case of anything going wrong in flight, Returning control to the radio transmitter. The PI sends control signal through a serial connection to the MultWii with a level shifter in the middle.

I also looked into various ways of connecting an ultrasonic sensor and tried three approaches:

Sonar to MultiWii – This involves writing custom code in the firmware to send and receive signals from the sonar. The drawback is this uses one of the auxiliary channels for the controller, which is being used as a safety feature. The other channel is being use to arm the device making it possible to very quickly take control and turn the quadcopter off.

Sonar to PI – There is two ways of connecting sonar to the GPIO. Using resistors to divide the power or using a level shifter on the sonar’s echo wire. I went for the level shifting as I already have one being use and 2 free channels. The problem is the PI does not have a real time operating system making the sonar readings not accurate and causing the PI to have a high CPU load.

Sonar to Ardunio (With serial bridge) –   The sonar connects directly to the Arduino and using the new ping library the readings are incredibly fast and accurate. The problem with this is that is only one UART on the PI. To solve this I’ve tired making a serial bridge the forwards the serial signals between the Multwii and Pi through the Ardunio board, and sending the sonar data to the PI. In testing this works very well.

Looking at these approaches the last two actually would work. The Ardunio approach has the best result however the MiniPro board I was using stopped working while I was re-soldering some connections. So it has been put on hold until I can get a new one or fix it. (Note that other boards are two big to fit). For time being I’m trying to improve my code for the Ultrasonic sensor on the PI as this does work.

In addition to the problems with the MiniPro my Control board stopped working, so I’m using a spare until a new one turns up next week sometime.

Code wise I have a working PID controller and have writing a class for communicating with the MultiWii board, so I can fly the quadcopter using the PI. Everything just needs a little optimization and testing. I should soon be ready for a flight test; however I predict the outcome being bad because of the sonar sensor problems.

Hopefully in the next few weeks I will be testing autonomous flight and trying the Arduino approach in practise which should solve the problems.

Quadcopter Lives again!

As I mentioned in the previous post, The quadcopter had an issue where some of the ESC’s caught fire, This is likely to poor manufacturing.

This week I rebuilt the quadcopter using 4 brand new Lulin 30 amp ESC’s and a F450 frame. I used a commercial fame instead of 3d printed one because of structural weaknesses in the printed frame design. However I am very likely to switch to another printed frame design once it’s tested out.

The construction progress did take a fair amount of the time mainly because it was a different frame and the ESC’s had to be calibrated.  The end result was a pretty smoothly flying quadcopter.

Serial Communication Success

I have finally managed to get serial communication between the MultiWii board and the Raspberry PI working through use of a level shiftier  Admittedly this did took a few attempts likely due to back connections when soldering. This also involved disabling the serial console on the Raspberry PI so I could take over the UART on the GPIO without the system closing the port after a certain time.

2012-12-28 11.02.26

In addition I have been working on adjusting the MultiWii code to allow for dual control input via serial and an RC receiver and have managed to successfully control the quadcopter through serial but still need to implement a way of switch between control methods. Also with help from the MultiWii community I managed to connect a HC-SR04 ultrasonic sonar sensor, allowing for more accurate distance from ground readings then from the Barometor.

Unfortunately the quadcopter is currently unusable due to not one but two ESC’s catching fire. This occurred after a very minor crash and is likely due to age and overuse of the ESC coupled with poor quality. To this end I have ordered four new ESC’s which should arrive sometime in January. So until then my focus is going to be at getting the software components working perfectly ready for a series of flight tests.

Flight test with Ardunio

Yesterday,I tried a flight test to see if the Ardunio I programmed would work effective as a bridge between my RC receiver and the flight controller, Allowing the control to be switch between the my RC transmitter and Serial input from the PI.

2012-12-18 14.45.34

As you can see from the image above, The test didn’t quite go as expect. However I had a level of control the Quadcopter randomly moved in various directions. I believe with some fine-tuning and perhaps smoothing of the input from the RC this could be fixed. The end result was a few broken parts nothing some super glue wont fix for the moment.

However this approach creates a lot of extra wires that makes it harder to debug basic problems. For the time being I’m going to focus on another approach until at-least my Arduino Mini Pro turns up. So my new approach is to slightly re-program the firmware on the MultiWii board to add an extra option to allow for me to switch from RC control to Serial control. Half of this is done already in the code as you can already define serial control but not both.