Introduction: DIY-Arduino-based-quadcopter-Drone

Hey, what's up, Guys! Akarsh here from CETech.

This is the third and final part of our Arduino-based Drone Series. In the first part, we made a flight controller for our drone using the Arduino Nano and MPU6050 module. In the second part, we made an Arduino-based Remote Controller Pair to control our drone. Now in this final part of our drone series, we are going to assemble the frame of our drone, load it with motors and ESC's and after that, we will complete the circuitry part as well by connecting the Flight Controller and Radio Receiver that we created. The frame that we are going to use here is the DJI F450 Quadcopter frame. Apart from that, we will use BLDC motors with a kV rating of 1400 and some propellers. One thing to keep in mind is that we use two different types of propellers whenever we use them with our Quadcopter. Two propellers are of one type and two propellers are of different types. We will discuss that in detail ahead in the article.

So let's not waste time and get to the fun part.

Supplies

The components that we require for this project are:-

  • DJI F450 Quadcopter frame
  • BLDC Motors 1400kV - 4 Nos.
  • 30A Electronic Speed Controllers - 4 Nos.
  • 12V, 2200 mah Lipo Battery
  • Propellers

Step 1: Get PCBs for Your Projects Manufactured

You must check out PCBWAY for ordering PCBs online for cheap!

You get 10 good-quality PCBs manufactured and shipped to your doorstep for cheap. You will also get a discount on shipping on your first order. Upload your Gerber files onto PCBWAY to get them manufactured with good quality and quick turnaround time. Check out their online Gerber viewer function. PCBWAY takes care of its customers a lot that's why they offer reward points with every purchase that you make from them these reward points can be redeemed for various useful items from their gift shop.

Step 2: Know the Components

Before moving on to the Assembly part, you first need to know the components that we are going to use to better understand what you are doing. So, let's discuss the components one by one:-

  • DJI F450 Frame: The frame that we have used is one of the best quality frames when it comes to the Quadcopters. The DJI F450 frame is named so because of its diagonal wheelbase i.e. the distance between diagonally opposite endpoints of the frame is 450 mm. The frame is made of ultra-strong material that makes it resistant to crashes. The arms of the drone are designed to support the flight of the drone. Apart from all these, there is an Integrated Power Distribution Board as well, which makes it easy to distribute power among the ESCs without using separate connections for all of them.
  • Propellers: Propellers are devices that transform rotary motion into linear thrust. The drone propeller provides lift for the aircraft by spinning and creating an airflow, which results in a pressure difference between the top and bottom surfaces of the propeller. You can get a propeller of Glass fiber Up to 3 inches, 3 inches to 7 inches, 8 inches to 10 inches, 11 Inches and above along with Propeller accessories. If you want lightweight and extra strength you can prefer Carbon Fiber Propeller also. The Propellers are of two types. These propellers have a difference in the alignment of their blades which you can observe if you compare them.
  • BLDC Motors: A brushless DC motor (also known as a BLDC motor or BL motor) is an electronically commuted DC motor that does not have brushes. The controller provides pulses of current to the motor windings which control the speed and torque of the synchronous motor. These types of motors are highly efficient in producing a large amount of torque over a vast speed range. In brushless motors, permanent magnets rotate around a fixed armature and overcome the problem of connecting current to the armature. The Kv rating of a brushless motor refers to how many RPM it turns per volt. The kV rating on a BLDC motor is equal to RPM per VOLT applied to the motor. So a BLDC motor with a kV rating of 1000 kV will spin at 1000 RPM when 1 volt is applied, if you apply 12 volts the motor will spin at 12000 RPM.
  • Electronic Speed Controllers: An electronic speed control (ESC) is an electronic circuit that controls and regulates the speed of an electric motor. It may also provide reversing of the motor and dynamic braking. An electronic speed control follows a speed reference signal and varies the switching rate of a network of field-effect transistors. By adjusting the duty cycle or switching frequency of the transistors, the speed of the motor is changed. It has two terminals on one side which are to provide power to the ESC and on the other side, it has three wires for connection with the motor and three more wires that are to be connected to the Flight controller for receiving the Control Signal. Using ESC we can also provide a power of 5V which we will do here.

Step 3: Assembling the Frame of the Drone

In this step, the assembly of the drone's frame will be done. Along with the frame, motor placement and their connection with ESC will be completed. So you need to follow the instructions given below to get the frame ready:-

  • In the frame accessories, you should have received two plates that you need to connect in between the arms of the frame. Out of these two plates, grab the bigger one. You will observe that there are solder pads present on the plate with some positive and negative signs on them. This board is the power distribution board of the drone.
  • So now take this power distribution board and attach the four legs of the frame to the plate and tighten them with screws. Now before placing the second plate, you need to complete some other things as well.
  • Take the ESC and remove the connector that is attached to the power wires of the ESC. You can identify that by observing the no of wires attached to that connector and also the size of the connector. Once the connector is removed, take the soldering iron and attach the red wire of the ESC to the pad with the "+" sign on it and the black wire to the pad with the "-" sign.
  • Repeat the process with all four of the ESCs and after that connect the LiPo battery in a similar way but connect the battery through a switch which you can turn ON or OFF when you want.
  • Now place the ESCs under the drone's arms with the help of cable ties and place the top plate of the frame as well.
  • As the ESCs are connected, now you need to take the motors and put them in place i.e. the end of the drone's arms, and tighten them with screws. Once that is done, you will see that there are three wires coming out of the BLDC motor. You need to connect those three wires to the three wires coming out of the ESC.
  • Take the middle wire of the motor i.e the yellow-colored wire and connect that to the middle wire of the ESC. Connect the rest of the two wires as you want we will adjust them later on. Repeat the same step for all four motors but remember not to attach the propellers at this point in time.

With this the frame assembly is complete. Now in the next step, you need to calibrate the ESCs and adjust the directions of the motor rotation as well. How to do that will be discussed in the next step.

Step 4: Calibrating the Electronic Speed Controllers

In this step, you need to calibrate the ESCs. By calibrating here we mean to say that we are going to inform our ESC of the max and min limit between which it is going to be operated. The Calibration of ESCs is necessary to prevent some problems such as motors not starting together or the speed of some motors not being as it should have been. These kinds of problems can be prevented by calibrating the ESCs. It is a very simple process and for this process, we need some jumper wires, an Arduino UNO, and the drone frame assembly that we made in the last step. You need to follow the steps given below to calibrate your ESC:-

  • Before starting the process, keep one thing in mind that during this calibration process you should not have your propellers attached to the motors.
  • You should have noticed a connecter coming out of your ESC with three thin wires connected to it. These are the wires that you need to use in this step. Out of the three wires, one is of Red color, one is of Black color, and one is of Brown/Orange color.
  • The Brown wire is the signal wire. Take that wire from the ESC and connect that to the Digital Pin 6 of the Arduino UNO. Similarly, connect the signal wire from other ESCs to Digital Pin 7, 8, and 9 and the Black wire i.e. the GND wire of each ESC needs to be connected to the GND pin of the Arduino UNO.
  • This will complete the Connections for the Calibration. One thing to keep in mind is that do not keep the LiPo battery connected to the ESCs at this time or if you have connected them through a switch then put the switch in OFF state for the time being as we need to supply power from LiPo to ESC in the upcoming steps.
  • Now connect the Arduino UNO to the PC and head over to the Github repository from here. In the Github repository, you will see a file named "ESC_Calibrate.ino". This is the code for the calibration of ESCs. Open the code in the Arduino IDE. Select the correct Board and COM Port and hit the upload button.
  • Once the code gets uploaded, Open the Serial Monitor. On the Serial Monitor, you will see that the Program has begun, and after that, it will show Turn On the Power Source. At this point, you need to supply power to the ESC using a LiPo battery. Once the LiPo Battery is connected. wait for two seconds and then press Enter.
  • Serial Monitor will show "The ESC is calibrated" which means that our ESCs are calibrated successfully. Now to test that we need to enter any value in the Serial Monitor from 1000 to 2000 and hit the enter. This will start the motors and you will be able to see that the motors are perfectly calibrated or not. To stop the motors you need to send a value of 1000 and to run the motors at maximum speed, you need to send a value of 2000. Any value in between will change the speed of the motors.
  • As we have calibrated the motors, now we need to check if the direction of motor rotation is correct or not. For that, you need to select the front part of your drone. Once you have decided on the front part of the drone, you need to make sure that the left motor of the front part of the drone and the motor which is diagonally opposite to it i.e. the motor on the right side of the Rear end of the drone rotates in the clockwise direction and the other two motors rotate in the Counter Clockwise direction. You can change the direction of rotation of the motors by simply interchanging the two wires other than the middle signal wire of the BLDC Motor.

Once this is done, you can remove the Arduino UNO that you used to calibrate the ESCs and move on to the next step which is connecting and Placing the Flight Controller and Radio Receiver on the Drone.

Step 5: Connecting the Flight Controller and Radio Receiver to the Drone

Till now we have assembled the Drone Frame and calibrated the ESCs for our Drone. Now in this step, we are going to place the Flight Controller and Radio Receiver that we made onto the drone and will do the final connections to complete the setup of our Drone.

  • First of all, you need to place the Flight Controller in the center as much as possible with the Front part of the flight Controller towards the front part of the drone. The front part of the Flight Controller can be found out by using the Multiwii application. In that application, the animated drone on the right-hand side moves when we move the Flight Controller. So the side of the Flight Controller facing the screen of the Laptop when the arrow on the animated drone faces us is the front side of the Flight Controller.
  • Now as you have the Front part of the Flight Controller, So place it on the drone accordingly. After placing the Flight Controller on the Drone, Place the Arduino Receiver on the drone as well. Now connect the 5V pin from the Flight Controller's Arduino and connect that to the Vin Pin of the Receiver's Arduino. Connect the GND pin of both the Arduinos. This connection is done in order to supply power to the Arduino on the Receiver from the Arduino on the Flight Controller.
  • After the power-sharing connections, we need to connect the PPM pin from the Receiver to the Flight Controller. The PPM pin is the D3 pin of the Receiver's Arduino it was pre-declared in the code and it needs to be connected to the D2 pin of the Flight Controller's Arduino.
  • After the Interconnection of the Flight Controller and Receiver, you need to connect the ESCs to the Flight Controller for this purpose you need to use those wires of ESC that were used to calibrate the ESC. Connect the Black wire i.e. the GND wire from all the ESCs to a common GND pin of the Flight Controller Circuit.
  • After connecting the GND pins. Connect the Brown wire i.e. the Signal wire from the ESC connected to the Front left motor to the D3 pin of the Flight Controller's Arduino. Similarly, the Front Right Motor to D10, Rear Left motor to D11, and the Rear Right motor to the D9 pin. in this way, the signal connections are completed.
  • Now you need to connect the thin red wire coming out of the ESC to the Vin pin of the Arduino UNO. You just need to connect only one wire and that can be from any of the ESCs. This wire is used to supply 5V power to the Arduino of which the ESCs are capable.
  • Now you need to connect the LiPo battery to the ESC and Connect a separate GND pin of the Flight Controller's Arduino to the GND of the LiPo battery.

And this will complete all the connections of the drone assembly and we can say that our drone is ready to be flown. In the next step, you will get to know how to start the drone and how to fly it.

Step 6: Flying the Drone

Till this step, we were taking care of the drone assembly the connections, and all the complex stuff. Now in this step, we need to give our drone the finishing touches and try to fly it. So now, what you need to do is to take the propellers and attach them to the motors. There need to be two propellers of one type and two propellers of the other type and similar types of propellers should be attached to diagonally opposite motors. The propellers should be properly tightened as the motors rotate very fast and there remain chances of propellers flying off that may cause damage. After the propellers are attached, you need to turn On the power supply to the ESCs. this will turn on the drone but you will see that the motors are not running. This is because we need to arm our drone before flying it. Arming means to start the drone, when the drone is armed, the motors start to rotate but at a slower speed. To arm the drone, first of all, we need to power up the Transmitter and make sure that the drone is placed in a big and open space because as the Transmitter is self-made, it may take some time for you to understand how to control It properly so to avoid any kind of damage, make sure that the drone is at an open and empty space. Now to arm the drone, you need to hold the left side joystick and take it to the bottom left position and hold it there for one or two seconds. Make sure that you take it to the exact correct position otherwise the drone will not arm. Once the drone motors start running, slowly increase the throttle i.e. move the left joystick upward this will increase the speed of the drone and the drone will slowly take off. Control the direction of movement and drift of the drone with the help of the right-hand side joystick.

So in this way, we are ready with our own Arduino-based drone. Some points that I want to add based on my personal experience is that always bring 2 extra sets of propellers because these are the components that definitely break whenever someone makes a drone. After that, use a LiPo battery tester. It will make a sound whenever the LiPo battery is near the set Threshold value and will protect the LiPo battery from getting permanently damaged as if the battery is drained below a certain value then it causes irreversible damage to the battery. Make connections carefully and always double-check them with the help of a multimeter for some possible shorting and connect the power supply only after getting sure that there are no connections short in the circuit. I bricked an Arduino Nano due to this mistake, So take care of that. Make the frame as stable and vibration-free as possible because it may cause the drone to disbalance. make sure all the screws and propellers are tight enough to keep the drone stable and damage-free and last but not least, never lose hope there will be definite problems when you try it hands-on but you can overcome them easily with a little bit of focus and a bit of extra effort. I myself faced a lot of problems but in the end, I was able to complete it and fly it as well. With this, I will bring this article to an end. Until next time, enjoy flying.