Axial Wraith ESC controlled by Arduino

I think I am confused on this whole ESC thing. It seems to be a very simple setup and just requires a few PWM signals to arm it. Oddly enough, when initializing the signals with simple servo writes, my motor actually turns. This is not good for a number of reasons (the arming function is invoked at setup, before the loop, which jerks the rover around). I am leaning towards the fact that maybe this particular ESC (Axial AE-2) is already armed somehow. Most of the sample code that I have looked at maps throttle input from 0 – 180. While playing with values I noticed that to move this rover I need to give it a value > 100. Also, I noticed that no mater what value I send, I cannot get this thing to go in reverse, which is the current problem I am working on. Below I have documented the ESC arming sequence from the manual thinking maybe this will help later on.

I am posting because I feel like I may be going down the wrong path. Sure, the rover moves forward, but that doesn’t mean I wont burn up the ESC in a day because it is not properly armed. Something feels fishy here. I can certainly post more code, I just didn’t want to clutter up the first post.

  1. Apply full throttle on the transmitter.
  2. Turn the ESC on while applying full throttle.
  3. The ESC will emit a series of beeps through the motor with the “Red” LED.
  4. Continue applying full throttle until the ESC blinks “Green” and emits a series of beeps to finalize the full throttle endpoint.
  5. Once the ESC blinks “Red”, apply full brake/reverse, and hold.
  6. The ESC will emit a series of beeps while blinking “Red” to finalize the reverse/brake endpoint.
  7. Return the throttle to neutral and the ESC will emit a series of beeps to finalize the neutral point.
  8. The ESC will emit one last series of beeps confirming the ESC is ready to go.

To me, this would look something like the following

// Start Arm sequence

// Wait for ESC to finish its series of startup beeps
delay(3000);


// Full throttle until the ESC blinks green
motor.write(180);
delay(3000);

//Full throttle reverse?  wait for ESC to blink red
motor.write(0);
delay(3000);

//Return throttle to neutral for final calibration
motor.write(90);
delay(3000);

// End Arm sequence

Since you haven't posted the full code I presume you have "motor" defined as a "servo".

A few things spring to mind ...

Servos are not very precise so 90 deg might not be precisely the mid point. Do you know if full fwd is at 180 deg or 0 deg - many R/C controllers have the ability to invert the sense of movement of the control sticks. You might find servo.writeMicroseconds() gives you better control

When you run through the Arduino code do you see the ESC responding as you would expect?

Looking at your code it seems as if you are not following the first two instructions which are to have full throttle before you switch on the ESC?

I suggest you write a short sketch that goes through the arming sequence followed by a short motor run and then post the whole sketch here. Plus a link to the ESC specifications.

...R

Well, I figured it out. Maybe this will help the next person who comes along. Long story short, my ESC was armed correctly(The same behavior as when I arm it with the actual rc transmitter). However, during trial and error I managed to send the exact sequence of throttle positions to enter what is known and manual ESC programming mode. It is essentially an audible menu that consists of beeps that you interact with by either hitting the throttle, or reversing the throttle. As an end result I managed to enter an option to shut off reverse functionality. Here is some documentation:

Referenced from : http://www.axialracing.com/blog_posts/787000000

Manual programming

Follow these steps to change settings on your Axial AE-2 ESC without a computer.

Remove your pinion gear before calibration and manual programming as a safety precaution!

STEP 1: Start with the transmitter ON and the ESC switched OFF and not connected to the battery.

STEP 2: Plug a battery into the ESC. Hold full throttle on the transmitter and turn the ESC switch ON. After a few seconds you will get the four rings in a row signaling full throttle calibration. Keep on holding full throttle. After a few more seconds, you will hear another four rings in a row. After the second group of four rings, relax the throttle to neutral. If you have successfully entered programming mode, the ESC will beep twice, pause, and repeat the two beeps.

STEP 1: Start with the transmitter ON and the ESC switched OFF and not connected to the battery.

STEP 2: Plug a battery into the ESC. Hold full throttle on the transmitter and turn the ESC switch ON. After a few seconds you will get the four rings in a row signaling full throttle calibration. Keep on holding full throttle. After a few more seconds, you will hear another four rings in a row. After the second group of four rings, relax the throttle to neutral. If you have successfully entered programming mode, the ESC will beep twice, pause, and repeat the two beeps.

STEP 3: The programming sequence is always presented in sequential order and always starts with the first setting (None) within the first section (Voltage Cutoff). The first beep(s) signifies which section of the programming you are in and the second beep(s) signifies which setting is waiting for a “yes” or “no” answer. As you go sequentially through the options, you will need to answer “yes” by holding full throttle, or answer “no” by holding full brake until the ESC accepts your answer by beeping rapidly. Once an answer has been accepted, relax the throttle back to neutral for the next question. After a “no” answer is accepted, the ESC will then present you with the next option in that section. After a “yes” answer is accepted, the ESC knows you aren’t interested in any other option in that section, so it skips to the first option in the next section.

Settings and explanations

The following section explains all the settings available to you via manual programming and what each one does to change the reactions of the ESC in order to tune it to your specific preferences. More settings are available via “Castle Link”.

  1. Cutoff Voltage

Sets the voltage at which the ESC lowers or removes power to the motor in order to either keep the battery at a safe minimum voltage (Lithium Polymer cells) or the radio system working reliably (NiCad/NiMH cells).

Setting 1: None

Does not cut off or limit the motor due to low voltage. Do not use with any Lithium Polymer packs!

Use this setting ONLY with NiCad or NiMH packs. With continued driving, the radio system may eventually cease to deliver pulses to the servo and ESC, and the vehicle will not be under control.

You will irreversibly damage Lithium Polymer packs with this setting!

Setting 2: Auto-LiPo (Default)

This setting allows you to go back and forth between 2 and 3 cell LiPo packs without having to change the cutoff voltage for each one. The ESC automatically sets the cutoff voltage correctly for a 2 or 3 cell pack when that pack is plugged in.

  1. Drag Brake

Sets the amount of drag brake applied at neutral throttle to simulate the slight braking effect of a neutral brushed motor while coasting.

Setting 1: Drag Brake OFF

Vehicle will coast with almost no resistance from the motor at neutral throttle.

Setting 2: Drag Brake 15%

Very Low amount of braking effect from the motor at neutral throttle

Setting 3: Drag brake 25%

Low amount of braking effect from the motor at neutral throttle

Setting 4: Drag Brake 40%

More braking effect from the motor at neutral throttle.

Setting 5: Drag Brake 50%

Fairly high braking effect from the motor at neutral throttle.

Setting 6: Drag Brake 100% (Default)

Full braking effect from the motor at neutral throttle.

  1. Brake / Reverse Type

Sets whether reverse is enabled or not, and exactly how it can be accessed.

Setting 1: Reverse Lockout

This setting allows the use of reverse only after the ESC senses two seconds of neutral throttle. Use it for race practice sessions and bashing, but check with your race director to see if this setting is allowed for actual racing.

Setting 2: Forward/Brake Only

Use this setting for actual sanctioned racing events. Reverse cannot be accessed under any circumstances with this setting.

Setting 3: Forward/Brake/Reverse (Default)

Reverse or forward is accessible at any time after the ESC brakes to zero motor RPM.

Axial Car ESC Programming Reference:

1: Voltage Cutoff

Option 1 : None

Option 2 : Auto-LiPo (D)*

2: Drag Brake

Option 1 : Disabled

Option 2 : 15%

Option 3 : 25%

Option 4 : 40%

Option 5 : 50%

Option 6: 100% (D)*

3: Brake/Reverse Type

Option 1 : Reverse Lockout

Option 2 : Forward/Brake Only

Option 3 : Forward/Brake/Reverse (D)*

(D)* = Default setting from the factory