motor, arduino ESC and 11.1 V Battery

I'm building an RC airplane w/ my friend.

I have a 1000kv 400xt brushless motor. www.hobbypartz.com/40tyoubrmo.html

I have an 11.1V, Li-Po, Rechargeable, 1800 mAh, 25 C, 3 cell, Gens Ace. http://lightake.com/detail.do/sku.11.1V_1800mAh_25C_RC_Lipo_Rechargeable_Battery_for_RC_Helicopter_-31807

Wondering how to power the motor with the 11.1V battery and still get the commands from the Arduino.

Wondering how to power the motor with the 11.1V battery and still get the commands from the Arduino.

The RC ESC is usually controlled just like it is a servo.

My motor can't survive on just 5V. I need it to run with the 11.1V battery. The only problem is, I want the Arduino to give the command voltage. usually the ESC can withstand the 11.1V and deliver it with the new correct voltage. How do I do that with the Arduino built in ESC/PWM?

yosler:
My motor can't survive on just 5V. I need it to run with the 11.1V battery. The only problem is, I want the Arduino to give the command voltage. usually the ESC can withstand the 11.1V and deliver it with the new correct voltage. How do I do that with the Arduino built in ESC/PWM?

Your kind of skipping over the ESC part. That is a device (electronic speed controller) that interfaces between the 11.1vdc battery and has three output wires that power the motor. The ESC has a logic level (0-5vdc 1-2 millsec ppm pulses) speed control input that 'looks' just like a servo and can be controlled by an arduino using the servo library. Most ESC also have a BEC (battery eliminator circuit) which ouputs regulated +5vdc that you can use to power a arduino board via it's ground and 5v pins.

Here is a typical ESC module from that site you linked from: HobbyWing AIRCRAFT SYSTEM SkyWalker Series 20A

Does that help?

Lefty

Basically, can the Arduino give a command voltage(0-5V) to control a 1000kV something (in this case, motor)

@retrolefty
Hi bro........ Is there any library for controlling bldc motors with esc using arduino>>>> i cant understand the way to control it ...will this work:(
if i upload this to my uno.... the esc just started beeping with a time interval of 0.25 sec.... :~
but my esc troubleshooting says that that the trottle stick is not in the bottom position.and moe it to the bottom position!!!!! got stuck here >>>>>>> :sleeping: :frowning: :.
Sorry for my bad english........ :zipper_mouth_face:

#include <Servo.h>
Servo.motor;
void trottle() {
speed(0);
delay(1000);
}
void speed(int rpm) {
int angle = map(rpm, 0, 100, 0, 180);
 motor.write(angle);
}
void setup() {
motor.attach(9);
trottle();
}
void loop() {
speed(40);
delay(1000);
}

Hi there :smiley: this is the code from arduino examples

// Controlling a servo position using a potentiometer (variable resistor) 
// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott> 

#include <Servo.h> 
 
Servo myservo;  // create servo object to control a servo 
 
int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin 
 
void setup() 
{ 
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object 
} 
 
void loop() 
{ 
  val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023) 
  val = map(val, 0, 1023, 0, 179);     // scale it to use it with the servo (value between 0 and 180) 
  myservo.write(val);                  // sets the servo position according to the scaled value 
  delay(15);                           // waits for the servo to get there 
}

realy easy to use conect the "esc" in the same way u conect a servo to Arduino 1 wire ground 1 wire power and 1 wire siganl (usualy orange)

Blue wires to your motor, big red and black wire to your battery, white wire to your arduino tiny red and black i think u don t have to conect, or u can conect to your arduino.

Bye and good luck

u have use the function "name of the servo".write(val); to set the "angle" / "Output to your motor"

@deepu1994:
#1 - are you using a servo or motor?
#2 - When you used "speed(0)", what were you trying to do? Set the motor to stop position?
#3 - what was "angle" supposed to be? Like a servo and bent to a certain direction, or like a motor to a certain speed?

Try the following code. Note I changed "speed" to "setRPM" since "speed" is a function (someone probably made a library with "speed" in it). (Copy and paste the code in a new Arduino program window and upload it.)

int rpm;      // declaring rpm as an integer

#include <Servo.h>    // including the servo library
Servo motorServo;     // naming the servo as "motorServo"

void setup()
{              // runs code once on setup:
  motorServo.attach(9);   // reporting the pin motorServo is attached to
  throttle();      
}

void loop()
{              // runs code repeatedly:
  rpm = 40;
  setRpm();
}

void throttle()
{
  motorServo.write(0);   // sets the throttle to 0
  delay(1000);           // waits one second
}

void setRpm()
{
  int rpm = map(rpm, 0, 100, 0, 179);    // maps rpm to a motor-friendly number
  motorServo.write(rpm);                     // sets motor to the rpm speed
  delay(15);                                        // waits for motor to get there
}

yosler:
Basically, can the Arduino give a command voltage(0-5V) to control a 1000kV something (in this case, motor)

Some previous post concerning ESCs that might help you.

https://www.google.com/search?hl=en&as_q=esc&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=http%3A%2F%2Farduino.cc%2Fforum&as_occt=any&safe=off&tbs=&as_filetype=&as_rights=

Hi,
ESCs expect to be used with an RC Radio, each radio can be set differently and so there is normally a calibration procedure. Has your ESC ever been calibrated against anything ? if not you need to find the calibration procedure which is normally quite simple, something like

  1. Press button
  2. Pull stick right back
  3. Press button
  4. Push stick all the way forward

This will depend on your ESC model so find the manual, find the set up procedure and then write a simple sketch to calibrate it with you Arduino -

servo.write(0); // stick all the way back

// wait for a button press here or use a potentiometer to represent the stick, whatever is easiest for you

servo.write(180); // stick all the way forwards

Duane B

rcarduino.blogspot.com

@retrolefty
i m using brushless dc motor of kv 2400,....
by spedd(0); command i m arming my esc with the least throttle signal .....

@retrolefty
hi no use of u r code ... my esc keeps beeping :(...that according to the manual is that the throttle signal is irregular:(

I want to avoid using an ESC in my airplane. (Sorry my title had "ESC" in it.) I'm trying to use the Arduino's PWM pins. Would they be able to give 5V commands for an 11V motor?

yosler:
I want to avoid using an ESC in my airplane. (Sorry my title had "ESC" in it.) I'm trying to use the Arduino's PWM pins. Would they be able to give 5V commands for an 11V motor?

You will NEED an ESC to drive an RC motor, the voltage of the motor and the voltage of the arduino have nothing to do with each other, because the ESC and Motor are powered from the main flight battery (Presumably a 3 cell LIPO since you say 11.1), the servo connection from the ESC has 3 pins, ground, signal, and +5v (assuming you are using an ESC with a built in BEC, some do not), that +5v rail can power the arduino, it would not be 11.1v, it would be 5v, in a normal RC application this ESC connection to the RX would power the entire RX and all of the servos via the power rail built into the RC RX, the Arduino in this case IS your RX, remember that most ESC's have a 2a to 3a 5v power rail, which is enough for about 4 9g servos (typical on foam planes).

The motor will draw 10+A without the slightest problem from that battery - you absolutely need to use a brushless motor ESC with it, those current levels are far beyond anything any component on the Arduino can tolerate. The ESC has a 3-phase MOSFET bridge capable of PWMing very large currents with very low loss, and automatically tracks the position of the motor's rotor via back-EMF sensing (without this the motor cannot be commutated) - you need an ESC, its a requirement.

deepu1994:
@retrolefty
hi no use of u r code ... my esc keeps beeping :(...that according to the manual is that the throttle signal is irregular:(

That is usually an indication that you are not using the correct 'arming' sequence controls to start the ESC. One I had years ago required I move the throttle control to 100% and leave it there for at least one second and then move it back to 0% and then the ESC would signal with a proper beep to let you know the ESC was active and any new speed command would be sent to the motor. Different ESCs may have different 'arming' sequences. A decent ESC should cover it's 'arming' start-up instructions in it's owner manual, but many of the cheap Asian ESCs come with no or very poor documentation.

Lefty

hi bro lefty::
all my traps had gone out of my way>>>>
now i m able to control my bldc motor with ease>>
her is wat i ve done

  • i armed my esc first by sending the least throttle signal for 2 seconds
  • the wrote microseconds to the servo name(not angle values)
  • my motor responds to time interval of 1000-2000 microseconds
  • here 1000ms is least throttle signal and 2000ms is the highest throttle signal
    thnx for all the replies to my kind bros>>>>> :grin: :grin: :grin: :slight_smile: :slight_smile: :slight_smile: :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue:

Glad its all working now - most ESCs arm on minimum throttle setting for a few seconds, certainly the one's I've got do (all cheap from eBay - only one of them exploded!)

deepu1994:
check out this link to the project I'm working on and there's a chart of the microseconds compared to the speed of the continuous servo. Activity 4: Test Speed Control | LEARN.PARALLAX.COM
Your motor should also look something like that chart with a 1000 - 2000 instead of 1300 - 1700