- Building Smart Drones with ESP8266 and Arduino
- Syed Omar Faruk Towaha
- 776字
- 2021-06-24 19:00:02
Connecting the ArduPilot
Connecting the ArduPilot is one of the most important tasks for flying and controlling the drone. The ArduPilot is basically the brain of our drone. It enables the drone to control the movement, the camera, and the other sensors connected to it. We will connect a radio to our ArduPilot later, so that we can control the drone remotely.
Let's look at the ArduPilot first.
The ArduPilot has basically eight types of pins, as marked in the following diagram. Lets look at the what the uses of them are:
These pins are used to add the ESCs signal or output cables. Remember the three wires of the ESCs? They will be connected here. You can add up to eight ESCs in the ArduPilot. The rightmost pin of a row is used for the signal cable, the middle pin is for the power cable, and the leftmost pin is the ground pin. See the following diagram for a better idea:
There are some specific rules in which orientation you should connect your ESCs output wired to the ArduPilot. As we are building a quadcopter, the opposite motor of a motor should rotate in the same direction (clockwise or anticlockwise). There are two kinds of quadcopters depending on the shape of the quad's hands. One is plus shaped and the other is cross shaped. The motors must be connected, as shown in the following figure:
If you are unsure about which is the pusher propeller and which is the normal propeller, you may remember, pusher propellers rotate clockwise and normal propellers rotate anticlockwise. In the propellers, you may find P or R after size marks. P or R denotes that it is a pusher propeller, otherwise it is a normal propeller. See the following diagram for more clarification:
These pins are used for the analogue sensor pins of the drone (for example, sonar sensor, airspeed sensor, voltage or current sensor, and so on). We will learn more about the pins' uses in the coming chapters. Refer to the following diagram to know how the sonar sensor is connected to the ArduPilot:
These pins are used for connecting the remote or radio or RC receiver to the ArduPilot. We will learn how to connect a radio to the ArduPilot in a while.
These pins are used for adding a common power module to the ArduPilot board. The common power module provides 5.37V and 2.25 Amp power supply. It allows the ArduPilot to work more accurately with a lot of sensors connected to it, such as the compass sensor. A small variation of the power will cause the direction to go wrong. If there is a small variation of power, the direction will be changed because of that, as it will trigger the compass inaccurately. So, using a common power module to these pins is needed if you want good accuracy of the measurements from the sensors connected to and built into the ArduPilot.
In these pins, a Bluetooth device or an RF transreceiver (having 900 MHz or 2.4 GHz frequencies) is connected, so that it can communicate to the ground control station. It can cover up to 50 m or the radius, depending upon the model of the Bluetooth device. Using these pins, we can easily connect our drone to the computer without any wire and download flight data without any wire. We will discuss more about these devices in the coming chapters.
The ArduPilot does not come with a Global Positioning System (GPS) sensor or GPS Receiver. So, we have to connect an external GPS sensor or GPS Receiver, so that your drone can do some complex things related to GPS (for example, position holding and waypoints navigations). If you want to make your drone fully autonomous, this port is needed. We will discuss more about this port in the coming chapters.
If you look closely, you can see that a jumper is there. If the jumper is connected, the board will use the internal compass; if not, then the board will use the external compass. It is not necessary to remove the jumper unless you buy an external compass, or the on-board compass is not good. The compass is used to define the direction of the drone while flying. So, this is important for a smart drone.
This is a multifunction MUX port (in network communication systems, MUX is the short form of multiplexing, it can send multiple signals at the same time to another device), which is used to connect to the computer via UART0, UART2, I2C, or OSD. If you do not alter anything, the default setting is OSD.