How to control a brushless motor through a ESC with Arduino

#Test #test #flight #controller #esc #arduino #serial

A post shared by Ahmed Sobhy (@sobhydo) on

This tutorial helps you to control and run a Brushless DC motor using Arduino, Over Serial and using potentiometer.

we will use PWM signal from arduino to control the speed of brushless motor with a ESC.This will save you the money to buy a servo tester or a RC Transmitter and receiver.So Lets Get started!

Things you need:

  1. Arduino
  2. Potentiometer
  3. Lipo Battery (Which is able to supply Sufficient Current)
  4. ESC(Make sure that the motor draws less current than mentioned on the ESC)
  5. Brushless Motor

Connections:

  • connect the three terminals of Brushless motor to the the three terminals of the ESC.
  • Screw the Motor to a heavy wooden plank anything similar so that it remains stable at high RPM.
  • Download and Flash the code available at the bottom of the page to the arduino .
  • Connect the signal wire of ESC mostly white or yellow colour to any PWM pin Arduino,I connected it to the D9 pin and specified it a Pin 9 in both Arduino Sketches (Serial and Pot).
  • You can use more than one pins for controlling many motors.
  • Connect the Potentiometer to the vcc or 5v pin of the Arduino and the Ground.
  • Connect the third terminal that is the variable pin to the Analog pin A0

Codes and programming: 

To control your motor using Serial Monitor upload arduino code below and Values from 1000 to 2000 at serial monitor to start and increase the speed of the Motor.

Arduino Code for Serial control : https://github.com/sobhydo/BrushlessWithArduino/

To control your motor using Potentiometer upload arduino code below and slowly turn the Potentiometer Knob to start and increase the speed of the Motor.

Arduino Code fo Potentiometer control : https://github.com/sobhydo/BrushlessWithArduino/

 

Leave a Reply

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