I just got the Turnigy Multistar 20 Amp Multi-rotor Brushless ESC 2-4S.

I have a motor and a battery hooked up to the ESC. On the three pin connector, I attached the brown ground wire to a ground pin, and yellow signal wire to a PWM-capable IO pin. I'm trying to figure out how to send motor signals to the ESC, with no luck. I know that I need to send PWM output through the yellow signal wire, but I don't know the frequency or high time of the PWM signal. Also, I've read that certain ESC's have an arming procedure, and I'm not sure how that works.

How do I control my ESC from a generic output pin hooked up to a microcontroller?

  • 1
    \$\begingroup\$ You may want to build a pulse generator firmware driven by a potentiometer or something for testing/calibration, since these are designed with the idea that the user has transmitter sticks and trims to manipulate, sometimes in quiet complicated multi-step sequences. \$\endgroup\$ Commented Jul 30, 2014 at 22:02
  • \$\begingroup\$ I forgot to ask this, but what's the community opinion on self-answered questions? On Stack Overflow, they're technically encouraged but for some reason people tend to frown upon them. I just did this, and thought it would be really useful for other people. \$\endgroup\$ Commented Jul 30, 2014 at 22:19
  • \$\begingroup\$ It's not clear that there's much to this that hasn't been covered here several times before, so if it's a problem you had already resolved rather than an outstanding one needing assistance, I'm not such a fan for that reason. \$\endgroup\$ Commented Jul 31, 2014 at 1:02
  • \$\begingroup\$ Well that's the point of answering your own question, right? So you can help other people that have the same issues as you? \$\endgroup\$ Commented Jul 31, 2014 at 1:08
  • \$\begingroup\$ The problem is that what makes your question unique from existing ones is largely irrelevant. The next person with a similar problem may have a different brand esc and not recognize yours as relevant any more than you recognized the existing coverage of pwm-driven RC gadgets as relevant. \$\endgroup\$ Commented Jul 31, 2014 at 1:24

1 Answer 1


The PWM output on the signal wire usually uses a 50hz signal with 1-2ms high time. The arming procedure consists of a signal of the lowest power for a short period of time, followed by a beep from the ESC.

Using Propeller GCC and the simpletools library that comes with it, it would looks something like this:

// Arming:
pwm_set(4, 0, 1000);
waitcnt(CNT + CLKFREQ); // Wait 1 second.

// Spin at low speed.
pwm_set(4, 0, 1100);
waitcnt(CNT + CLKFREQ);

// Spin at high speed.
pwm_set(4, 0, 2000);
waitcnt(CNT + CLKFREQ);

If you want to make it a little easier, you can write a utility method:

// Speed should be between 0 and 1.
void motorSpin(double speed)
    pwm_set(4, 0, 1100 + 900*speed);

Good luck!


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