Introduction: ARDUINO - MOTOR BRUSHLESS With ESC

Picture of ARDUINO - MOTOR BRUSHLESS With ESC

I want to show you in this "Instructable" how to control a brushless motor with Arduino.

Step 1: Parts Required

Picture of Parts Required

1.- Arduino UNO

2.- Battery and Compact Charger

3.- ESC

4.- BrushLess Motor

5.- Battery and Motor/ESC connectors

5.- Breadboard

6.- Wire

7.- PC with Arduino IDE

I bought some components by Internet:

1.- BrushLess Motor/ESC/Propeller/connectors set:

http://www.banggood.com/XXD-2212-MotorZTW-AL30A-Br...

2.- Battery

http://www.banggood.com/Wholesale-Lion-Power-11_1....

3.- Compact Charger
http://www.banggood.com/TITAN-B3-2-3Cell-7_4v-11_...

Step 2: Battery Charge

We need to charge de battery, then connect the charger to the power and 3 green LED lights will illuminate. Then connect the battery to the charger and 3 red LED lights will illuminate. When the 3 battery cells are 100% the 3 green LED lights will illuminate.

Step 3: Soldering Connectors

Picture of Soldering Connectors

We need to solder some components:

1.- BrushLess Motor

2.- ESC

Step 4: Upload Arduino Program Control

We need to load the program that controls the ESC/Motor

- Code:


/*Coded by Marjan Olesch
Sketch from Insctructables.com Open source - do what you want with this code!
*/ 

#include <servo.h>

int value = 0; // set values you need to zero

Servo firstESC, secondESC; 

//Create as much as Servoobject you want. 
//You can controll 2 or more Servos at the same time

void setup() {

  firstESC.attach(9);    // attached to pin 9 I just do this with 1 Servo
  Serial.begin(9600);    // start serial at 9600 baud

}

void loop() {

//First connect your ESC WITHOUT Arming. Then Open Serial and follo Instructions
 
  firstESC.writeMicroseconds(value);
 
  if(Serial.available()) 
    value = Serial.parseInt();    // Parse an Integer from Serial

}

Step 5: Create Sketch

Picture of Create Sketch

Once uploaded to the Arduino sketch by the USB wire then we connect motor brushless with the ESC. And we connect the ESC to the Arduino like:

- ESC Green wire -> GND Arduino

- ESC Red wire -> Null (dont connect because its possible that the usb port PC will crash)

- ESC Yelow wire -> PIN 9 Arduino

Open the monitor serial at Arduino IDE and write 700 ( it's the minimum value for the motor)

Connect the battery to the ESC

And it will sound some melody from the ESC.

You can write at serial monitor diferent values like ( 750,800,900,..., maximum value is 1900 for this motor)

Comments

MaciucA (author)2016-04-07

Hello, why the ESC red wire doesn't connected. What is the current on the red wire?

About This Instructable

6,919views

36favorites

Add instructable to: