I am neewbie with PWM & ESC. I bought a cheap ESC to try codes. This ESC is for Burshed DC motors. I buyed an 12V, 150W 775 Brushed motor.
The esc is this:

Dunno the spec's, but maybe this is: 320A 2~4S LiPo Battery Brushed ESC Electronic Speed Controller with 5.6V/2A BEC for 1/8 1/10 Off-road Monster Truck

So i connect the control wire (the white one) to Arduino PWM 9 port.

Now how can i map the controlling values? How can i controll the ESC when i got the values for brake, forward, revers? Can someone write me an example?

Thnak you!

Look at the "Servo" library.

Try it with the Knob example from the IDE. Usually 0 is full reverse, roughly 90 is stop and 180 is full forward.

Or just search "Arduino control ESC". Don't worry if the examples say they are for brushless motors. The ESCs work the same.


Thank you!

I found the exsample.
Sadly i'm not at home to try this out, but with this code can i increase/decrease the speed of the motor too, or just the direction of rotation??

I am expecting i need to do a PWM with delay() between sending HIGH/LOW to the DC motor...
So when i increase the value that i write to ESC from ~120 --> 180 then the motor speed up too?

Yes that's how it works with most car ESCs that have reverse - I think that's what you have. 90 is stopped and speed increases as you head towards 180.

But you don't need to mess with PWM yourself. The Servo library does all that for you.


Thank you!

The last thing: is there any alternative to replace an expensive ESC into any H-bridge that can handle 30-40A?

First i want to use L298N H-Bridge, but it only can handle 2A, and have a voltage drop...