Arduino flight controller for drone (Part-2)

9

 In my previous article, you saw how to make a radio transmitter and receiver for drones and any kind of RC projects.

in the opinion of my viewers, This transmitter was very official And had a decent look.

if you haven't read my preview Article, then I want to tell you, must read that Article.

Part -1 Article link




So in today's series, you will see how to configure a drone's flight control system.





And I promise, if you read this article from beginning to end, then you can make an official drone for yourself, at a very low cost.

and with that, I want to tell you, my flight control system will work just like an office system.



OK, when building drones some people make mistakes in flight control systems.

So that, you don't make these mistakes,

For that, let's understand how the flight control system actually works.

I have divided my flight control system into two parts.

One of which is the receiver section, which will receive the signal from my transmitter, 



and the second section, will collect this signal, and control everything.

which section  name is flight control,



 which is controlled by Multi-Wii firmware,

The function of the multi-Wii section is to keep the drone in balance and fly stably in the sky,

with that, this multi-Wii section gives the right signal to all the motors to keep them in the right balance.

Ok, I believe you understand the subject completely.


Ok, this is my flight system board, 



                                                    Download This PCB's GERBER 



First of all, I will use AMS1117, a 5-volt regulator IC here, to give the correct voltage to all microcontrollers and modules.

Then I want to take a look, is 5 volts out from this IC?

When I realized the correct 5 volts were coming out from this IC

 now I can put all the components on the board.

As a multi-section brain, I am going to use SMD Atmega-328P IC here.




Wait, there is nothing to be afraid of seeing SMD IC, you can do it with Arduino Nano if you want,

This IC is also used in the Arduino Nano, 



I am mounting the SMD IC directly on the PCB here to make my drone relatively light in weight.

with that, Since drones need to exchange codes all the time for multi-configure,

So, I will use the hC340 UCB Communication IC here.

And you can see this IC in Arduino Nano.

If you want, you can take it off from Arduino Nano, if you are a beginner, use Arduino Nano Direct on the Prototype Board.

Despite that, if you are confused, I will say, that I made a video with this IC, how to program all ICs with this HC-340IC only. watch that video.





As I said earlier, this section controls the balance, so we need an MPU-6050 gyroscope module here.





And our flight control system is ready,





Receiver Section



Now we need the receiver section, to receive the signal from the transmitter.


Here I am going to use an Atmega-328P IC, 



Which is used as an Arduino Uno, of course, I need an 


NRF24 module here to receive the signal from the transmitter for wireless communication.





This is a drone's flight control system, which was very easy to build.





                                                  Download This PCB's Diagram 



CODE PART


 Download This PPM CODE



 I will upload this code to my atmega328p IC, with my homemade programmer. Then I will put the IC on the board.



now the next step to insert the Miltui-Wii system in the flight control section.


 For that, I will connect the USB to my flight control board.




Since it is Arduino Nano, I will select Arduino Nano here.




Ok, this is the Miltui-Wii code, in the Miltui-Wii code you just have to go into config.h and you just have to enable the mpu6050 gyroscope.





Download This Multiwii code and Software




After uploading the code, I will open software called MultiWe Config.





And I will go there and select the correct Arduino port.

then you have to click this start button and see some graphs here.

Now I have to keep this board on flat serfs to calibrate the balance of the drone,



this procedure is best for a complete drone.

But I'm showing you an example here.

Again I will click on the calibrate accelerometer. Now show my flight controller showing live positives.



Multi-wii is a platform through which you can calibrate drones helicopter planes and much more

Now the thing to notice my receiver is receiving the correct signal from my transmitter, I will select the angle mode switch 1 and the horizontal mode switch 2.

Then I will select all these selections in write mode, and then go to them in rede mode and configure them in my Arduino.

And see, whenever I send a signal from my transmitter, it shows the correct value here,

this is the biggest proof that my transmitter has communicated properly with my flight control board.




Now I will check it physically, will that work properly?

In my case, I'll use four brushless motors here and the brushless motor is really good it doesn't break easily.

These motors require four ESCs to run.

I'm going to use an ESC of 30 amps here.

I will associate every positive and negative of this ESC with my board.

I will then connect every ESC signal cable to the board,  so that,  it can get the correct signal for each motor.

And see, whenever I select the throttle 0 and yea signal 255 and hold it for 3 seconds, just then my motors start spinning.



Now we need a beautiful frame in which I can fit everything properly.

So in the next article, you will see how to build the right structure for this drone.

And how to fly this drone in the sky in a successful way.


Tags

Post a Comment

9 Comments

please do not enter any spam link in comment box

  1. Bro the transmitter and receiver code is showing some errors whil compiling... how to compile it without errors.... it’s errors like some character is not declared in the scope like that... can you tell me how to compile it without errors brother......

    ReplyDelete
  2. Bro i want your inverter digram of 300w 50hz frequency sg3524 I literally try to get your inverter digram from your YouTube channel but seems there the problem exist to browse your scemetic. Sees the problem error404.. Please offer me your scmetic 500w inverter

    ReplyDelete
  3. Hello. Can you update the drive files? The file does not open. Or can you share your files with me via e-mail? [email protected]

    ReplyDelete
Post a Comment

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top