ESC control not working! Urgent, project is due soon...

Hello all!

I have a high school project due, one which I originally thought was going to be pretty easy. However, I have run into a road block.

For my project, I am automating a 1/16 Traxxas Slash. It has an XL 2.5 ESC in it, which works perfectly with its transmitter and receiver setup. However, despite the hours of research I have done, I cannot get it to work with the Servo library.

I have checked my wiring a couple thousand times, and there are no mistakes.

I have tried:
Servo library functions
Calibration (though I don't know if I'm doing it right anyone know what I should try?)
Turning the ESC on with its TQ Transmitter, then running the Arduino program (however, it seems to know when I've switched- how???? why is it so darn smart?!)

I also tried reading the receiver output using PulseIn, but I don't know what data I'm getting and how to use it.

The ESC seems to not be able to read the Arduino's Servo library output

Do you guys have any idea what I should do? I'm sort of in a rush...

Thank you for any help!

1/16 Traxxas Slash. It has an XL 2.5 ESC in it

A what, with a what?

I have checked my wiring a couple thousand times

Really?

I also tried reading the receiver output using PulseIn, but I don't know what data I'm getting and how to use it.

sounds a useful thing to do. I wonder what the results were?

This guy may have useful experience.

This is the RC truck:
https://traxxas.com/products/models/electric/70054slash1164x4
And this is the ESC:
https://traxxas.com/products/parts/escs/xl25lvd

And I know the wiring thing is stupid, but everything works except for the ESC, and the ESC will work with its own TX/RX setup.

As for the PulseIn data, it is 0 when the Traxxas RX is disconnected, but when I plug it in and the RX has no power, it gives me data anyway. I don't know why, either... When I plug it in, the #'s don't seem to differentiate. When I squeeze the throttle, put it in neutral, or put it in reverse, it also looks the same. Is there a way I could use this? Is it some sort of PWM measure? If it is, could I use a software to make a usable readout visual?

By the way, I am opening it up in the Serial Monitor in the Arduino IDE. This is my PulseIn reader program:

byte PWM_PIN = 12;

int pwm_value;

void setup() {
pinMode(PWM_PIN, INPUT);
Serial.begin(115200);
}

void loop() {
pwm_value = pulseIn(PWM_PIN, HIGH);
Serial.println(pwm_value);
}

As the program runs, the RX LED flashes on my mega at varying speed depending on which Internet- downloaded PulseIn program I use. They all give the same data, though.

I don't really understand PWM, either, to be honest.
Thanks for any help

byte PWM_PIN = 12;
 
int pwm_value;
 
void setup() {
  pinMode(PWM_PIN, INPUT);
  Serial.begin(115200);
}
 
void loop() {
  pwm_value = pulseIn(PWM_PIN, HIGH);
  Serial.println(pwm_value);
}

I'm not interested in your badly posted code, I'm interested in what it produces.

It looks like this:

6783
4395
6576
4396
6478
4093
6582
4402
6582
4299
6582
4299
6472
3989
6576
4397
6537
4403
6271
3905
6375
4112
6582
4313
6369
4319
6576
4210
6478
4216

and it keeps going and going...

I read somewhere that there is a pattern you can take from this: the average highs and lows and neutrals. I just don't know where to take it from, how to use it, or anything!!

By the way, I just busted out laughing. That's my own post you put in a link to a while ago. Not much help there tho, but the War and Peace in Russian comment made the situation lighter... :smiley:

Ok, I figured something out. When I isolated the receiver the ESC, I was able to turn the RX on without the ESC and I got helpful data from the Serial Monitor- it was the 1000-1500-2000 number stuff from the other posts. Now, I know exactly what I don't know how to do! How do I get the ESC to understand the Arduino's mimic output using the confirmation of that data?

Hello all!

I have a high school project due, one which I originally thought was going to be pretty easy. However, I have run into a road block.

For my project, I am automating a 1/16 Traxxas Slash in which the TX/RX setup is replaced by an Arduino Mega. It has an XL 2.5 ESC in it, which works perfectly with its transmitter and receiver setup. However, despite the hours of research I have done, I cannot get it to work with the Servo library. The reciever puts out

This is the RC truck:
https://traxxas.com/products/models/electric/70054slash1164x4
And this is the ESC:
https://traxxas.com/products/parts/escs/xl25lvd

I have tried a bunch of types and methods of ESC calibration (though I don't know if I'm doing it right, anyone know what I should do?) and turning the ESC on with its TQ Transmitter, then running the Arduino program (however, it seems to know when I've switched- how???? why is it so darn smart?!). None of this has worked, I get no response from anything.

The ESC has a fully charged battery connected to it. The white data wire is connected to pin 10 on my Mega R3. The black is connected to the Arduino ground. The red is not connected to anything, as I've herad it can destroy your board. It is usually only used to power the onboard RX.

I read the Traxxas RX output with a PulseIn function, and I got 974, 1475, 1964 for my 1000,1500,2000 microsecond measures.

The ESC seems to not be able to read the Arduino's Servo library output, even when I use those #'s.

Do you guys have any idea what I should do? I'm sort of in a rush...

Thank you for any help!

The calibration is very touchy with some car esc's. Once it's calibrated with the reciever and you power it off and swap it to the Arduino it may not arm if the pulse is even 5-10us off. Try playing around with the center position a bit.

If the ESC thinks that it's getting even a very small amount of forward or backward it won't arm.

Ideally you want to calibrate with the arduino. Normal calibration is powered on in neutral full throttle, full reverse back to neutral you would have to work out the proper timing. Some traxxas transmitters have a button to enter calibration/ programming mode. If so, you'd have to investigate the signal from that a bit more.

When an ESC loses the signal it should go into fail-safe and need re-arming. Otherwise a loose/ intermittent signal could be very dangerous.

So far in this Thread it seems there is a problem and a lot of messing about trying to solve the problem but no actual description of the problem apart from "not working".

If the problem is arming the ESC then you need to read the documentation and tell us what it says about the arming sequence. For example maybe you have to move the joystick to full on, then full off (or any of 100 other variants). Whatever it is you need to make your Arduino program go through that process.

If it is not an arming problem then perhaps you will tell us what the problem is.

...R

Ok, so like you guys said, the ESC does have an arming sequence. I read the manual before, but I don't know the exact way to mimic it. You hold the on button after you turn it on, give it full throttle, then full brake. After, it's calibrated. However, I can't get it to respond to anything. It will give me the correct lights, however. I will play around more with the us measures. I have also sent to the actual company to see if I can get some tech specs.

I know I have to be pretty exact with th measures, but the reciever put outs varying numbers. For instance, full gas is almost solidly 1964, but it will go to 1970-80 as well for a fraction of a second.

Thank you for your help, I'll spend some more time on it. Hopefully it'll work! (This is the most helpful stuff I've received since I started...)

Stingray63Vette:
You hold the on button after you turn it on, give it full throttle, then full brake.

That sounds like you need to hold the button while the Arduino moves gradually through to full throttle and perhaps pauses for a moment like a human would and then moves gradually to full brake.

...R

That's what I think, I just have to time it right.

Thanks, still working on some other parts of my project. Having trouble with a GPS breakout as well...