web analytics
Arduino

Building Airship using Arduino

In this lesson we will learn how to build a small airship (limited capabilities) using the Arduino electronic controller, in fact that this ship was designed only to fly a few meters above the surface of the earth like a balloon, but this project is wonderful because its cost is within the reach of everyone’s hands and is put up for the first Once on the Internet for free, in general you will learn how to choose the different motors, power units and controllers. In addition, we will explain in detail the codes used so that you can fully know the knowledge and calculations that we put on our website and we will explain all the components used in this project and we hope Be careful and cautious about the gas that we will use in building the project. This project is one of the graduation projects from the Hashemite University – Jordan. It is the preparation of students of the Faculty of Mechanical Engineering who graduated in 2019 and I have permission to prepare and publish this project to the public everywhere.

What is an Airship?

The air ship is one of the aircraft that man made in the past but it is lighter than the air because it is filled with very light gas such as helium or other gases, so that its density is less than the air and thus raises the vehicle up like a piece of wood on water We have studied the details of the air ship in the lesson of general classification of aircrafts We mentioned one of the problems of this aircraft is the ease of drifting with the wind, so we solved this problem by using electric motors that we can control to set the flight path of the plane (the air ship).

 

—————————————————————————————————————————————

Work basics

Well to build an airship you need a little bit of knowledge about the components. The tools and motors do not mean anything if you do not know how to deal with them so we put the following topics for you that you can click on to view them before you start to detail the components and assemble them correctly:

After reading the above topics you will be able to handle and fully understand the components that we will use, now let us explain to you what we will do in this project. We will make an Airship. We will use a body filled with a certain amount of helium gas made from a light material which is (Biaxial oriented polypropylene). The reason for choosing this material is that it is very light it is the same material that is used for making food packaging papers. We will use two brushless DC motors to connect them with Arduino Uno R3 using electronic speed control ESC.

 

 

In addition, we will use the ultrasonic sensor to read the distance of the airship and based on the distance it will send information to the Arduino and control the speed of the DC motors brushless when the ship reaches a certain distance we will keep this distance stable. Generally we will use the distance 2 meters, and by this we mean that the maximum height of the ship will be 2 meters, when the ship goes down it will rise automatically and when it exceeds 2 meters it will go down again. To build this project you will need the following electrical components:

ComponentNumber
Arduino UNO R31
Brushless DC Motor2
Electronic Speed Controller (ESC)2
LIPO BATTERY1
Servo motor1
Wires30
Ultrasonic sensor HC-SR041

Frame

You can use the structure that you will fill with helium gas from any lightweight material that allows storing helium gas. In this experiment we used (Biaxial oriented polypropylene) and the reason we chose this material is that it is available and light in weight but it must be protected from holes and the reason for choosing helium gas is its light weight and can be found From the shops easily. Generally, the following pictures show the structure that you will build:

The dimensions of this structure are carefully studied, so that the ship can rise upward with the total weight that represents the electrical components. You will need to build it with the following dimensions:

  • Length: the minimum length should be 2.5 meters.
  • Diameter: The diameter should be at least 0.4 meters.

 

 

Are these dimensions compulsory? In fact, yes and no, these values are the lowest values that you can use to lift the ship to good distances, but in general if you want to raise the ship to higher distances you will need to use a structure of stronger materials and you will need an increase in length and diameter.

The following pictures illustrate the frame photos from different viewing angels:


Motors Mounting Base

Certainly from the image above,  you noticed the presence of a component at the bottom of the ship, as shown in the image below.

As you can see from the above picture, the electrical components are placed inside and on the ends, the motors are installed. The design shall be such that the base is at the bottom of the ship so that it can generate a lifting force to raise the ship up and the base length is 80 cm, meaning that the distance between the two engines is 80 cm. The final component of this body is fins, which are located at the edge of the body. It is an additional factor for the stability and steering the ship in the air, as shown in the following figure:

fin

Electrical Specifications

As we said, we will use the Arduino Uno due to the multiple digital outputs and entrances, especially the inputs and outputs that operate with the (PWM) system , which we will use with the ESC electronic speed control unit. As for the brushless DC motor, we will rely on our design on the brushless DC motor A2212 / 137 which has a voltage constant (KV) for it equal to 1000KV.

 

 

The ESC current will be equal to 40 Amps. So now that you have sufficient knowledge about the structure, its parts, the characteristics of the electric motors and the ESC parts that we will need, we have to choose the last component which is a lipo battery, in this project you will use a 1S 1 cell lipo battery which equals 3.7 Volts and has a capacity of 3000 MAh or 3 Amperes . The pieces are shown below:

Schematic Diagram

Well after you assemble the structure and fill it in helium gas, you should not compress the gas, just open the gas cylinder and when the structure is filled with gas you stop supplying gas. We mean here that you do not use pumps to compress the gas inside the structure or else the structure will explode. Because the structure we used is relatively light. After you design the structure and prepare electronic parts, you will connect the components together, so that the battery connections, motors, electronic speed control units and Ultra sonic with Arduino UNO R3 are as follows:


Code

The last step is programming. Ensure that your connections are completely correct, then connect the Arduino to the computer with a USB cable, preferably connecting the battery with a connection key. Then upolad this code to the Arduino board or any other board you own:

/* www.tocircuit.com
 Prepared by Fawzi Al-azraq 
 admin@tocircuit.com
 */
#include <Servo.h> //Use the Servo librarey for generating PWM

const int trigPin = 5;
const int echoPin = 6;


// defines variables
long duration;
int distance;

Servo ESC1; //name the servo object, here ESC1
Servo ESC2; //name the servo object, here ESC2
Servo servo;

void setup()
{
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input

ESC1.attach(9,1000,2000); //Generate PWM in pin 9 of Arduino
ESC2.attach(10,1000,2000); //Generate PWM in pin 10 of Arduino
servo.attach(11); //Generate PWM in pin 11 of Arduino

Serial.begin(9600); // Starts the serial communication
}

void loop()
{
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(3);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance= duration*0.034/2;
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.println(distance);


int throttle = distance; //Read the distance from Ultrasonic 
throttle = map(throttle, 100, 0, 1000, 2000); 
ESC1.writeMicroseconds(throttle); 
ESC2.writeMicroseconds(throttle);


if (distance >= 100) {
      servo.write(90);}
else{
      servo.write(0);}
}

Code explanation

Defining the servo library so that we can control the three motors (2 brushless DC motors and a servo motor) 

#include <Servo.h> //Use the Servo librarey for generating PWM

Definition of ultrasonic sensor terminals

const int trigPin = 5;
const int echoPin = 6;

Define variables for motors and ultrasound sensors

// defines variables
long duration;
int distance;

Servo ESC1; //name the servo object, here ESC1
Servo ESC2; //name the servo object, here ESC2
Servo servo;

Inside the void setup () we do several things to set the motors and the Serial monitor (optional) so that we know the input and output of the sensor and define the value of the pulses and the initialization of PWM:

{
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input

ESC1.attach(9,1000,2000); //Generate PWM in pin 9 of Arduino
ESC2.attach(10,1000,2000); //Generate PWM in pin 10 of Arduino
servo.attach(11); //Generate PWM in pin 11 of Arduino

Serial.begin(9600); // Starts the serial communication
}

Finally inside void loop () we perform the last operations of programming to setup the sensor and motors according to the specified values from the datasheet and make a map for brushless DC motors:

{
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(3);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance= duration*0.034/2;
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.println(distance);


int throttle = distance; //Read the distance from Ultrasonic 
throttle = map(throttle, 100, 0, 1000, 2000); 
ESC1.writeMicroseconds(throttle); 
ESC2.writeMicroseconds(throttle);


if (distance >= 100) {
      servo.write(90);}
else{
      servo.write(0);}
  
}

Thus we finished building the air ship, you can modify the program to change distances and speeds, or add more motors and make additions as you wish. In the next lesson, we will connect the air ship with phone device to manually control it using Andriod ot Ios App, add a gyroscope sensor to adjust the ship’s stability and connect the servo motor to guide the ship.

And of course, do not forget to download the To Circuit for smartphones program for free, to always be aware of the lessons we publish daily by clicking on the following image:


Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *

Close
Close

Adblock Detected

Please consider supporting us by disabling your ad blocker