Dhananjay Khairnar @. Powered by Blogger.

26 September 2016

Testing BLD( Brushless DC) motor with arduino:

Requered:
1) BLD motor link for buy in India(cost 450rs - 500rs)(Buy from Amezon)
Note: carefully buy BLD motor 1000KVA is ok for beginners. see the bullet connectors are their.
2) ESC( Electronic Speed Controller)(cost 450rs - 500rs)(Buy from Amezon).
3)Arduino UNO.
4)Power Supply or  11.1v battery (it will be ok if voltage source between 8v - 12v , 2A).
5) Connecting wires.


Step 1:
 see the part witch i used to test BLD motor 

BLD motor


ESC
Propellar( Be careful before ruining motor with propeller)( you can Buy from Amezon).
  
Step 2 :
Their is two method to operate BLD motor using arduino 
 i) By using library and without library
 ii) Without library


 Step 3 :
Make connection between BLD motor and ESC as given in diagram
Note  : Do not connect ESC vcc pin to Arduino. May be it will damage ESC



Step 4 : load one of the following sketch in arduino.
 here pin 10 is signal pin.

With Library : 
install servo library in Arduino IDE from library manager if not install before
#include

#define MAX_SIGNAL 2000
#define MIN_SIGNAL 1000
#define MOTOR_PIN 10

Servo motor;

void setup() {
  Serial.begin(9600);
  Serial.println("Program begin...");
  Serial.println("This program will calibrate the ESC.");

  motor.attach(MOTOR_PIN);

  // Wait for input
  while (!Serial.available());
  Serial.read();

  Serial.println("Now writing maximum output.");
  motor.writeMicroseconds(MAX_SIGNAL);
  delay(2000);

  // Send min output
  Serial.println("Sending minimum output");
  motor.writeMicroseconds(MIN_SIGNAL);
  delay(2000);

}

void loop() { 
  motor.writeMicroseconds(MAX_SIGNAL);
}


for start motor open serial terminal and pass any integer value.

Without library:
 int ESCpin = 11;    // ESC signal wire connected to pin 11 on arduino
int val = 0;        //variable to store PWM value

void setup()
{
}
void loop()
{
 for(val = 0; val <= 255; val += 5)
 {
   analogWrite(ESCpin, val);
   delay(100);
 }
}


Step 5 :
Now power on suply and hold motor at base tightly or you can make plywood board to fix it. don't try to run motor with propeller as it will be very dangerous to you. 

 

About DK

Hi, My Name is DK. I am a embedded system designer and embedded programmer. I am a certified holder of Diploma in Embedded system designing. We have a team of professinal programmers, developers work together and implement innovative concepts.

0 comments :

Post a Comment