Go Down

Topic: ESC & PWM (Read 180 times) previous topic - next topic

jan5650

Sep 16, 2019, 08:58 am Last Edit: Sep 16, 2019, 09:00 am by jan5650
Hi!

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: https://www.rcmoment.com/p-rm4101.html

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!

zwieblum

Look at the "Servo" library.

slipstick

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.

Steve

jan5650

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?


slipstick

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.

Steve

jan5650

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...

Go Up