Go Down

Topic: motor, arduino ESC and 11.1 V Battery (Read 9184 times) previous topic - next topic

yosler

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.

zoomkat

Quote
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.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

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?

retrolefty


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: http://www.hobbypartz.com/07e-skywalker-20a.html

Does that help?

Lefty

yosler

#4
Jul 26, 2012, 01:53 pm Last Edit: Jul 27, 2012, 12:24 am by yosler Reason: 1
Basically, can the Arduino give a command voltage(0-5V) to control a 1000kV something (in this case, motor)

deepu1994

@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 >>>>>>> :smiley-sleep: :( :.
Sorry for my bad english........ :smiley-zipper:

Code: [Select]
#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);
}

fenix8k

Hi there :D this is the code from arduino examples

Code: [Select]
// 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"


yosler

@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.)
Code: [Select]
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
}

zoomkat


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=
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

DuaneB

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
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

deepu1994

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

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:(

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?

MatCat


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).

MarkT

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.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up