Saturday, July 31, 2021

DIY Drone using YMFC-32 Autonomous with QMC5883L Magnetometer and Ublox Neo-6m GPS Module

  •  Important
  • this build credit for code goes to joop brokking whos code I am just modifying. You can find more information on his YouTube channel about build.
  • I am not a professional programmer.
  • This code use is educational purpose only and be careful while testing.
  • Do it on your own risk.


1.Hardware

-STM32F10C8T6

a bit about STM32,Here I am using clone CKS32F103C8T6 because I don't get original but clone just works fine it is officially licensed chip with 128k flash.so in further step I encountered an error where I2C bus not recognizing devices and when STM32 runs I2C scan it freezes the microcontroller. I encountered this problem maybe you encounter or not it depends on luck but code works on both cases with and without error. Don't get demotivated reading this because I got solution in Code part. May be this error due to clone STM32.

-QMC5883L(instead of HMC5883L which original build uses)

-MPU6050

-MS5611 Barometer

-Ublox Neo 6M (instead of NEO 7M in original build)

-ESC 30A Simonk

-1000KV 2212 BLDC MOTOR

-8 inch propeller(recommended) or 9 inch propeller or 10 inch propeller

2.Flight Controller PCB

In my build I used my custom DIY transmitter and receiver so the receiver side is built in the flight controller PCB. if you like you used professional transmitter and receiver or you can build receiver out side of flight controller PCB or you can remove receiver part from PCB in case you are using professional transmitter and receiver for that I will providing Easyeda project in this link

I am going with tonner transfer method. Which came out pretty good with 0.5mm trace and pitch.so here are some photos for that.



Tonner transfer came out good I think.


And finally etched PCB. ready for drilling.



Do Check whole components on project board before soldering to PCB.


And here it is finale flight controller PCB. Mounted on a plastic box cover.

On top left corner they are voltage regulators and at bottom left is receiver part which has nrf24l01 module and Arduino Nano.at the top right corner that is telemetry transmitter  WIR-1186.You can use any other with UART communication with 9600bps baud rate. Remaining is STM32F103C8T6(CKSF103C8T6 in my case).a logic level converter and MPU6050.Other sensors I mounted in sensor box because barometer has to stay above propeller level for avoiding ground effect and magnetometer should be away from high current wires and GPS antenna has to face upward. You can see my arrangement in further photos.

3.Frame

You can use any commercially available 450 size frame or build your own. If you like to build your own frame like I used check my blogpost on this link. It is foldable and has less weight than commercial frames.

4.Transmitter and Receiver

As I mentioned earlier I built my own transmitter and receiver you can use any commercial one with PPM. Have look some pictures which not gives you great aesthetics but good learning journey. If you need more info about my diy transmitter write down a comment below so I will write a Blog for this in future.



5.Code

Solution for problem I mentioned in hardware section is that not using hard wire I2C instead we use softwire I2C. sounds crazy but works fine. soft wire is on same pins as hard wire. As far as I know this works any case if you face this problem or not but if you like to use hardwire just comment down softwire line and uncomment hard wire line and don't forget to add wire.h library and also change every SWire command to HWire in every program file. Here is the code link

6.Final Result


first I talk about that sensor box I talked earlier. Here what it looks like on top.


I putted sponge  around  barometer avoid turbulence to getting into sensor and soldered the sensors so that they fit in sensor box.




Drone with opened arms.





Drone folded arms and without propeller and battery weights around 765 grams. with battery weights around 916 grams. Battery has 2200mah capacity 3S And 40C current delivery rate.




Okay, enough boring photos lets see the flight video. This flight test is carried out in 22-25 km/h wind speed and lot of turbulence from near by trees flight time is about 7-10 minutes with 2200mah battery.


Thank you.


No comments:

Post a Comment

DIY Drone using YMFC-32 Autonomous with QMC5883L Magnetometer and Ublox Neo-6m GPS Module

  Important this build credit for code goes to joop brokking whos code I am just modifying. You can find more information on his YouTube  ...