I bought a rc motor (sensorless, brushless) with an ESC to make a customized rc car (I am not use a radio transmitter at all. Purely controlled by Arduino). However, I cannot control the ESC via Arduino. When I programmed it with Arduino, it only runs fastforward with high speed (betwen 1600 and 2000 rate - writeMicroseconds). There is no response below 700 - 1500. Am I missing something here? I tried many times to find the right values for writeMicroseconds for the brake. When I exit the program, the motor stops but it seems to going forward a little bit because of the forward motion without braking the wheel.
If I have a wrong ESC to be compatible with Arduino, what should I get? Any recommendations?
An ESC is not a time machine. You have to tell it in advance, if e.g. the motor should be stopped, and the calculation of the time-to-stop, from the current speed and momentum, is up to you.
Did you program the ESC, or do you use the default settings?
Yes, I used "servo.h" and moving forward is somehow manageable. However, I cannot trigger to stop, especially hard stop. It keeps going although the motor is stopped because of the first law of motion. Really need a hard brake or some brake after slowing down the car.
See the data sheet how to configure the brake function of your ESC. The manual vaguely refers to a programming interface or device, with buttons and a menu. You'll have to figure out more details, as you have the ESC at hand.
"ESC PROGRAMMING PROCEDURE
Programming is accomplished using the SET button on the ON/OFF switch.
Programming the ESC:
Connect a fully charged battery to the ESC.
Power ON the ESC.
Hold the SET button for 1 second until the green LED blinks, then release the SET button to
enter programming mode.
Press and release the SET button as needed to get to the desired menu option (the Green LED
will blink corresponding to the menu
item number).
When at the desired menu item, press the SET button for 3 seconds until the green LED blinks.
Press the SET button to move among the settings based on how many times the green LED
blinks (Refer to the table for more information).
Save the setting by pressing the SET button for 3 seconds.
Power OFF the ESC switch and repeat the instructions above to change other settings.
If desired, the ESC programming can be returned to default settings by powering on the
ESC switch and pressing the SET button for 5 seconds. If you perform this operation, you
must recalibrate the ESC to the transmitter."
The table it mentions is just below this section.
You can use this procedure to configure the brake function.
Thanks for the reply. Yes, I did configure it according to the manual. The running mode was "forward/reverse with brake". I tried other option too. Arduino programming does not response to "reverse" or "brake" mode. I tried both but no response from the arduino except for running fast forward only.
All power supplies and all modules must share a common line, denoted as ground or Gnd. If a signal is not received properly, this often indicates a missing common line between the controller and the module.
1550uS - 2000uS = Forward
1000uS - 1450uS = Reverse/Brake
1450uS - 1550uS = Neutral
You might need to play with the neutral band a little, but it'll be somewhere around there.
Next you need to calibrate the ESC as per the instruction sheet, so you need manual control of the pulsewidth, probably the easiest thing to do is hook up a pot to an ADC and display the pulsewidth on a spare LCD, HD44780 or what ever's handy.
Another feature of that ESC is it's drag brake, by default it'll apply 5% brakes when in neutral.
Again you'll need manual control of the pulsewidth for setup, bump it up to 25% and it should slow the vehicle quite nicely, if you've got a lot of mass to stop you can try a higher setting.
The normal brakes tend to work in one of two ways. The most common you put the ESC into reverse, it'll apply the brakes, once the vehicle stop it'll automatically go into reverse until you go back to neutral.
The second you go into reverse and the ESC will apply brakes until the vehicle stops. Then you go back to neutral, this time when you go into reverse the ESC will actually go into reverse.
For future reference, you can get ESCs that use a programming card, instead of trying to set it up with beeps and led flashes they give you a little interface with buttons and a display, they make life a lot easier!
One more thing, an ESC designed for a crawler model would be ideal, they're a very simple forward in one direction, reverse in the other and drag brakes in the middle. No cleverness to get in the way, ideal for driving from a microcontroller.
With any luck you might be able to get something from that lot, hope it helps!
Between brushless motor or brused motor, which one is better to control a rc car with hard brake? Brushless motor seems to be harder to control the brake via esc. Any thoughts?