Tinee9: Arduino Controlled ESC

About: Tinee9 is a startup company with a goal to help DIY makers, companies, and inventors to make their projects come to life, especially in small packages. One of the way we will achieve that is by providing ins...

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 controlled 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 PCBA 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.

Difficulty: Moderate

Knowledge: Need to know soldering, Need to know basic power connections of a drone.

Reminder Tinee9.com has other Tutorials regarding Arduino and also talks about common electronics such as Drones. I talk about how they are used and how the sensors work on Drones used by companies or research and development teams.

Step 1: Materials

I didn't want to choose the solder, solder Iron, PC, and USB Cable but you can get the rest of the Items from this link KIT

Materials: ESC

Motor

Battery that will run the motor

Solder

Solder Iron

Arduino Nano

Bread Board

Jumper Wire

PC

USB Cable

Arduino IDE

Step 2: Basic Assembly

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.

Step 4: Attach your ESC Black to the Arduino GND Pin.

Step 5: Attach your ESC White wire to Arduino D9 Pin.

Step 6: Attach Arduino Nano to PC with USB Cable.

Step 3: Code

Step 7: Program Arduino Nano with this Code in Arduino IDE.

What the code is doing is initializing ESC and then it ramps up faster every 0.25 seconds till a hardcoded set point then turns off. Then repeats. Basically this code is allowing you to see how a motor is commanded by an ESC. Also the code is the basic building block for commanding 4 ESCs at the same time when you develop the rest of the code to fly a fixed wing or quadcopter.

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 4: Connect and Run

Step 8: Attach your ESC Red wire to Battery +.

Step 9: Enjoy your Arduino Nano commanding the ESC with PWM commands.

Share

    Recommendations

    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Plastics Contest

      Plastics Contest
    • Optics Contest

      Optics Contest

    Discussions