Hi,
I am new to arduino and creating a RC car. I was wondering if anyone could help me programme my motor with ESC. I have tried to do it but it doesn't seem to work.
Thank You!
Hi,
I am new to arduino and creating a RC car. I was wondering if anyone could help me programme my motor with ESC. I have tried to do it but it doesn't seem to work.
Thank You!
Generally we drive brushless motors/ESCs using the standard commands from the Servo library.
Show us what you have tried and what errors/problems you had.
Steve
#include <Servo.h>
Servo myservo;
void arm(){
setSpeed(0);
delay(1000);
}
void setSpeed(int speed){
int angle = map(speed, 0, 100, 0, 180);
myservo.write(angle);
}
void setup()
{
myservo.attach(10);
arm();
}
void loop() {
myservo.write(180);
}
It didn't run at all.
I am just trying to get it to go forward at maximum speed.
Can you post a link to the ESC data sheet or a part number of the ESC? Is that the complete arming sequence for the ESC?
What ESC/motor? How are you powering the ESC and the Arduino? Make sure all grounds are connected to Arduino ground.
Do you get any beeps from the ESC/motor when you first power it up?
Steve
The ESC and motor are the ones in this link
The arduino is powered through a 9V battery and the ESC is powered through a 7.4V 4500mAh Lipo Battery
The ESC does beep when turned on and I think all the grounds are connected.
Here is the Document fro the ESC. It is in german, but if you put it into translate I think you can get the idea, otherwise I can translate any parts necessary.
http://www.produktinfo.conrad.com/datenblaetter/1400000-1499999/001456606-an-01-ml-OFFROAD_BRUSHLESS_MOTOR_REGL_de_en_fr_nl.pdf
I am not sure if it is the way to arm it.
Hi,
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Thanks.. Tom..
When I am working with parts for an RC car, I find it useful to have a working RC car to help troubleshoot.
Do you have an RC car? Or know someone who has one?
It would be very helpful if you have an RC car transmitter and receiver.
Then you could plug your ESC in to the RC car receiver and work out what the arming sequence really is.
Some times it is
With an RC car transmitter and receiver, you can work that out.
Another possibility is to use the Knob Tutorial.
Do you have a potentiometer you can use?
This lets you use the pot to work out the arming sequence in the same way.
You need one of these, not a whole RC transmitter/receiver setup!
Not exactly sure on how to draw a proper circuit diagram, but this is how it's set up. Is there any other way of findign out the arming sequence? Also do all ESCs need an arming sequence? Would anybody maybe also be able to give me an example code with a different arming sequence in it just as an example?
Thanks
Many or most ESCs have some form of arming sequence.
Some have an arming switch.
Edit: this is what the arming sequence I described would look like (untested)
void arm() {
setSpeed(0); //zero throttle
delay(2000); //wait 2 seconds
setSpeed(180); //full throttle
delay(2000); //wait 2 seconds
setSpeed(0); //zero throttle
delay(2000); //wait 2 seconds
}
If you try this, make sure you have the motor mounted securely. This might cause the throttle to go full throttle during the arming sequence.
Hopefully the OP is not actually using that style of 9V battery as its current supplying capacity is very limited even for supplying the Arduino