South Africa
Asked — Edited
Resolved Resolved by Rich!

Trying To Get The Esc Into Reverse (Tamiya 101Bk)

Hi,

I'am having trouble with my programming, I cant seem toe get the ESC to go into reverse. I'm a new user of the ARC software so it could just be me interpreting the code wrong but this is what I wrote to try and get the ESC into reverse.

Move(D0, "stop") Movement_Wait("stop") Move(D0, "reverse") Movement_Wait("reverse") Servo(D0, 100)

Every time i run the code it tells me that there is a problem with the word "stop".

Any help will be greatly appreciated.

(I'm using the key control to control the movements)


ARC Pro

Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

United Kingdom
#9  

Sorry, my bad, you do need the quotes around the movement direction. I was responding without ARC or EZ-Script manual to hand.

That said, the original code works. I just tried it in ARC and the code runs without error.

As for controlling the ESC, what does it say in the datasheet?

United Kingdom
#10  

OK a quick google and on the Arduino forum it says that you control this ESC as you would a servo.

Not having any information on the ESC nor having ever used one I can't test it however if you follow the procedure for a Modified Servo, add the modified servo control and configure it for the correct port, provided the Arduino community are correct it should work.

If you can try that and let us know it'll save digging around for a decent datasheet on the ESC.

South Africa
#11  

My builder gives me an error message. I don't have a data sheet for the ESC, it came with a rc car that I bought 3 years ago.

As for the PWM it does not work that good and it would not go into reverse.

South Africa
#12  

The code runs now, but the motor keeps on going forward.

#13  

Rich, I think you're on to something... Since PWM doesn't work well, we need something in ARC that will mimic radio controller pulses... So shouldn't modified servo command work as you suggested?...

United Kingdom
#14  

What about using the Modified servo control?

If that doesn't work then the datasheet will be needed to see if we can figure out how the ESC is controlled.

As far as I can find out online from quick searches, PWM should work. Some experimentation may be needed to work out what PWM value do what to the ESC though. This is something you would have to do unless someone else on here also has the same ESC (which is doubtful).

To be honest, why use the ESC? Replace it with a H-Bridge and you will make everything so much simpler.

United Kingdom
#15  

OK, I stumbled upon something else...

Does your ESC have a button on it which is used to set the values for neutral, full acceleration and full reverse? According to one post online it does.

It runs from PWM. You will need to calibrate it to the specific PWM values. The you will use those PWM values to control it.

Before I go about explaining the best way to do that please tell us if there is a button on it for calibration.

PRO
Synthiam
#16  

PWM command is not a good idea because it is a modulation range between 0% and 100% . An ESC takes a similar PWM range as a servo. The PWM of a servo is not 0% to 100%. With the PWM command, it will be a lot of guess work to identify the PWM range of the ESC.

For reference, the PWM of a servo is different and explained in detail on the servo page for the v3: https://synthiam.com/Tutorials/EZBv3-Servo.aspx

Now, the question you are waiting for.. How do make the ESC work? Well, firstly if the ESC is your method of movement, then use the Modified servo Movement Panel. Therefore in EZ-Script, you would use the Stop(), Forward(), Left(), Right(), Reverse() commands.

If the ESC is not your method of movement, and perhaps used for controlling an ARM or something - then use the Servo() Control. This is because the ESC receives PWM similar to a servo. So, in this case you would need to identify what appropriate PWM commands work with the ESC.

On a v3, try this

Servo(d0, 10) <- that should move one direction Release(D0) <- that should stop the motor Servo(d0, 90) <- that should move the other direction

If those don't work, try changing the numbers like this...

Servo(d0, 11) <- that should move one direction Release(D0) <- that should stop the motor Servo(d0, 89) <- that should move the other direction

Servo(d0, 12) <- that should move one direction Release(D0) <- that should stop the motor Servo(d0, 88) <- that should move the other direction

Servo(d0, 13) <- that should move one direction Release(D0) <- that should stop the motor Servo(d0, 87) <- that should move the other direction

Etc... EZ-Robot did not make the ESC. And no ESC's or Servos follow any standard what so ever... So it's literally impossible for us to have a single parameter that works with all ESC's and Servos. The only way to make it work is to find the appropriate servo PWM value for your ESC.