Articles

Arduino flight controller

I found amazing project with many videos to build a quadcopter controlled using arduino uno. I am now analyzing the arduino code to understand how it works. I already found some interesting ideas : Loop frequency is 250hz. It means MPU6050 is read 250 times in a second and esc are updated 250 times too  It is a higher frequency than rasberrry zero can produce MPU6050 code to compute pitch and roll is different than mine. It seems to use acceleration rather than angle to compute pitch and roll. And it does not use dplf to reduce noise. I am surprised. It need to be tested. Battery voltage is read and used to increase esc pulses when voltage drops. It permits to stabilize quadcopter performances. Because when voltage decrease, motor rotation decrease too. Good idea. Esc pulses don't use the arduino servo library. They are generated manually using raw commands (pulse high for 1000-2000 us then low for a total cycle of 4000 us). So it needs a loop frequency of exactly 250 hz....

Arduino Test

Image
After few days thinking why my quadcopter python algorithm does not work during real test, I finally suspect the pwm pigpio libray does not do the job. So I decided to test my algorithm using Arduino beacuse it has 4 hardware pwm pins. I bought Arduino Uno. So I started to rewrite my python algorithm in C/C++. During rewiting my code in C/C++, I feel to go back 20 years ago...in the 1990s....Use basic functions, keep care low usage memory... Using Arduino is very very different from Raspberry, Logs are basics, you must use serial communication using an usb cable. It is not so easy....But I finally ended my code. MPU6050 code is finished. I read it and compute roll/pitch. PID and speeds motors are compute too. Now I have to test my code again as I did with Raspberry I have not yet tested pwm harware pins. I should have do this first but I got a basic problem. In fact, my usb cable between my computer and my arduino/quadcopter is too short ! So I have to w...

Mini quadcopter Eachine e55

Image
Few weeks ago I got an mini quadcopter Eachine e55 for the Father Day. After few flies, I bought 5 batteries on banggood. Now i can play with my quadcopter for 1 hour. It is fine. I use my smartphone to control it over wifi. It is easiest to control than the rc control (I am still a beginner) But two days ago I broke a motor... I found no help on the web how to repair it. So I decided to disassemble myself my Eachine e55. And I made my first youtube video to explain how to :  Some pictures Now I am waiting my motor order from banggood. I will receive it at the end of july

Quadcopter - What is wrong ?

Last 2 days I made few tests with motors ON All tests confirm my previous vitual tests . But reality is not virtual and the quadcopter does not do what I thought ! As in my    previous vitual tests , fo r the first test, I tilted  my platform  in front and start the quadcopter with motors ON. I  thought the lower side will raise to go and stay in horizontal position. In fact, the lower side raised as expected but it did not stop to raise when it got horizontal position. It raised again and then the quadcopter turn over the other side.... Considering another little problem which is sometimes at startup only 3 of 4 motors starts normally. I suspect pigpio library not to do the job. Is this libray able to send PWM signal for all 4 motors ? Just remimber this is not a hardware PWM signal.... So today,.I don't know where to search...  I am a little desperate...

Indoor Test - Pitch and Roll computation

Image
I have written my first algorithm to compute pitch and roll. So I made few tests to check it. Pitch shows if quadcopter tilt front (pitch is positive) or tilt back (pitch is negative) Roll shows if quadcopter tilt left (roll is positive) or tilt right (roll is negative) Determining pitch and roll is very important to control motors and get a stable flying quadcopter. For example, if quadcopter tilt front pitch will be positive. So, to get a stable quadcopter, we will need to increase front motors speed and decrease back motors speeds To do this, I found help on this page . It use acceleration in the computation.to correct read values from the sensor MPU-6050. All tests were virtual test with motors OFF For the first test, I tilted my platform in front, then I raise it to horizontal and then let it down Here is values read and used to compute pitch qay quadcopter acceleration Y read from sensor MPU-6050 qrx quadcopter ...

Indoor Test

Image
After my first test outside which led to the breakage of 2 propellers, I decided to do tests inside. For that, I tied the quadcopter on a wooden board. Two feets are fixed and the others two are free. Thus, by tilting the board, I hope that algorithm will compensate the inclination and adjust the motors so that the quadcopter is stable horizontally Here is a quick diagram

Raspbian - How to connect to multiple wifi networks

Today, I have configured my raspberry to connect at boot to the HotSpot Wifi of my phone if it is available. If not, It will connect to my home wifi To do this, you need to edit the wpa_supplicant.conf file: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf And you must add a second block "network": country=GB ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="my home network" psk="password" scan_ssid=1 priority=0 id_str="Home" } network={ ssid="my phone network" psk="mot de passe" scan_ssid=1 priority=1 id_str="Phone" } You must add in each block : Scan_ssid = 1 to search the wifi network Priority = 1 to select by default the network that has the highest priority Id_str = "xxx" to give a name to the network (may be optional?) Now when I am outside, I can conn...