4 Years ago I made my own drone for a cost of $300 back when the first commercial drone was about $1500. The Arducopter controller controled the motor ESC, I used the DJI DIY frame, and bought a 720MHZ remote control. Here is a modified KIT of what I built 4 years ago. KIT

Now that I have bit more experience in electronics aerospace engineering, I want to build my own arducopter controller to control the drone. I will be using Arduino for my platform. For today, I will demonstrate that we can control an ESC with and arduino nano.

Materials: Get Most Materials Here
ESC
Motor
Battery that will run the motor
Solder
Solder Iron
Arduino Nano
Bread Board
Jumper Wire
PC
USB Cable
Arduino IDE

Step 1: Solder your Motor to the ESC controller.
Step 2: Attach your Arduino Nano to a bread board.
Step 3: Attach your Battery – to the ESC Black Wire.IMG_20180605_005410
Step 4: Attach your ESC Black to the Arduino GND Pin.
Step 5: Attach your ESC White wire to Arduino D9 Pin.IMG_20180605_005423

Step 6: Attach Arduino Nano to PC with USB Cable.
Step 7: Program Arduino Nano with this Code in Arduino IDE.
Code:
#include <Servo.h> ;
Servo esc;
int Pin = 0;
int x = 0;
void setup()
{
esc.attach(9);
}
void loop()
{
int throttle = analogRead(Pin);
throttle = map(throttle, 0, 1023, 0, 179);
for(x = 0; x < 175; x++){
esc.write(x);
delay (250);
}
esc.write(0);
delay(10000);
}
Step 8: Attach your ESC Red wire to Battery +.
Step 9: Enjoy your Arduino Nano commanding the ESC with PWM commands.


 

Advertisements