I have to send a PWM signal to a controller module from an Arduino Uno. I'm not sure how to interpret the spec I've been given, and how to translate it into a PWM signal. The module is a Castle Creations Mamba Monster 2, if that helps.

The spec says the unit wants a 50Hz carrier, and the control is:

1500 microsec = idle
2000 usec = full forward
1000 usec = full reverse

I get that the period of the carrier is 20,000 usec but how does that relate to the control periods? Does it mean that for "idle" the PWM signal is high for 1500 usec and low for (20000 - 1500) usec?

Any help or insight is appreciated. Are there libraries that can deal with PWM in the given terms? Any good tutorials? I generally understand how PWM works, I just don't get the notation used here.


For a full 50Hz wave you have 1/50 seconds, or 20,000 microseconds, as you have already determined.

That is split into two portions - the ON period and the OFF period. With a 50% duty cycle the ON and OFF periods are equal - 10,000 microseconds each.

With a 25% duty cycle it is ON for 25% of the time (5,000 microseconds) and OFF for 75% of the time (15,000 microseconds).

Every time the ON and OFF must add up to 20,000 microseconds.

So for a 1,500 microsecond "idle" time that's 1,500 microseconds on, and (20,000 - 1,500) 18,500 microseconds off.

Or to see it as a duty cycle - 1,500 / 20,000 * 100 = 7.5% duty cycle.

With an 8-bit resolution that's a value of 19.2 (256 * 0.075), or the closest integer match of 19.

  • Thanks, so it's what I assumed. I'd just never seen it expressed in that way, rather as a duty cycle as you show..
    – Jim Mack
    Jul 27 '17 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.