The ESC I choose is a Turnigy  Plush 30

As described, the motor speed  is only a function of the voltage.

The ESC (electronic speed control) has got the main function to modulate the 3 phases of the motor  in order to control the speed of the motor.

The main characteristics are:

  • Curent:30A
  • suggested: battery 2-4S
  • weight:25g

This esc  has got a BEC  that can provide a 5v/2Ain order to power the rpi .

There are also some interesting features for the quadcopter:

  • start mode: it is possible to decide the time for the start up of the motor.The dafault value is a soft start, it means it take 1 second to reach the requested speed.
  • Low voltage protection: it can reduce the power when the battery is decreasing the voltage under a thresold. By default, for a 3S,  it will reduce the power when the voltage is lower then 8.5V. This is for preserving the lipo battery.

The esc received a pulse from  the rpi and convert it to  motor speed.

This signal has by default a frequency of 50hz  and the pulse width  can vary from 1ms (motor speed =0)  and 2ms (max motor speed)  with a possibl estep of 10us (=0,01ms)

IMPORTANT: ESC needs a procedure for inizialisation.It can vary by model. This is the description for my model:

First Start (to “calibrate throttle”)

  1. DO NOT connenct power cables
  2. Connect motor to ESC (and mount motor firmly!)
  3. Set throttle to max (in our rpi, set PWM to 2000us)
  4. Connect power cables
  5. ESC using the motor frame, sounds 2 beep closly to indicate the throttle is calibrated.
  6. Set throttle to min(in our rpi, set PWM to 1000us)

Standard Startup

  1. DO NOT connenct power cables
  2. Connect motor to ESC (and mount motor firmly!)
  3. Set throttle to min(in our rpi, set PWM to 1000us)
  4. Connect power cables
  5. ESC using the motor frame, sounds a tri-tone ,that means ESC is started, N beep where N is the number of the battery cells, N beep for the battery level,finally a beeeep for ESC ready.
  6. Increase throttle  (in our rpi, set PWM to 1050us) and the motor moves.

23 thoughts on “esc

    1. solenerotech Post author

      I think it depends on the esc used. In my case .No. In fact i recently tested also the case that the esc is already powered thar i start rpi and sw.
      In this case i commented the line for the first set of pwm to 100%.
      As soon as i connect esc power it start to beep every sec. As soon as i set the pwm to 0 % the esc does the init and than it is ready. It means i can use the bec of tje esc to power rpi.

  1. Alex Ellis

    I have my motor going forward now and stopping with 1500 stopped and 2000 max – 1600 moves forward. But how do I move backwards, reverse – is there a sequence needed?

    1. solenerotech Post author

      In order to reverse the rotation it is necessary to invert two of the 3 cables of the motor. No matter which 2 you invert.
      It is not possible to reverse the brushless motor direction via sw.

      1. Danny

        Hi, Alex, Slenerotech, It IS possible to reverse, but you need an ESC that can do it – I have a pi -> adafruit pwm chip -> hobbyking ESC -> brushless, the adafruit is just cos I needed more than one esc and motor, and the pi only has one pwm output. Anyway, on mine the ESC can do all sorts of cunning things – it can reverse (there is a sequence needed, you need to be in neutral (1500us) for a number of cycles, and then go to something in ‘reverse’ meaning between 1000 and 1500. It can also do breaking, meaning introducing a hall effect resistence and hence recharge the battery by slowing the motor, this is again by a certain sequence – you need to come off the throttle (1500-2000) and go straight to reverse without pausing at all, but then to go into reverse you have to return to neutral zone for a bit and then reverse again. The tiny scrap of paper included wiht my $10 ESC described its various modes and reverse/breaking features surprsingly well.

      2. solenerotech Post author

        Hi Danny. Thank yuo for this info. I never hear about this option. Can you tell us the esc model? Do you need a special motor also? One comment about the pi pwm: i’ m using a python library callef rpio and so i can customiz any io pin. Teorically i could have all pwm (apart from pin dedicated to the power and ground)

      3. Danny O'Neill

        Hi, I see someone asked last year about the reversing and if a special motor was necessary – apologies for only just seeing them. No, no special motor needed, just a normal brushless, the difference was in the ESC driving it. The reversing by ESC & software probably only really feasible for land-loving craft as the ESC was very bulky and heavy compared to ESCs available for flying vehicles, not sure if just the gigantic capacitors added the weight or if the heatsink strapped to it was the culprit.

  2. shashank simha

    Thanks a lot for this explanation. Had been looking for something like this for days. I appreciate the great help you have done by uploading the raspberry pi code. Please do keep updating stuff and keep up the great work.

  3. Billy

    Thanks so much for the explanation here. I have a question on the max motor speed. Why is 2 ms the max motor speed? I thought for a 50 Hz, 2 ms is only 10% of one cycle?

    1. solenerotech Post author

      2ms is not the motor speed but how often the motor can receive a command to change its speed.
      Consider that now the whole controller cycle is around 8/12 ms. So I can change the motor speed according to this timing.

  4. JR

    Congrats with the project! It has become very nice. At what frequency do you operate you esc’s? Working smooth? What library do you use to access your GPIO? WiringPi?


    1. Ankur Choraywal

      You can buy it from ebay. Search for “ESC BLDC” and categorize it as lowest to highest price. Hope it helps you.

  5. Danny O'Neill

    Hi there jimbo, I’d entirely forgotten I’d done this. I’m afraid I have no idea what the model of ESC was anymore. It was a ‘car’ esc, meaning it had things like reverse and hall-effect breaking. The $ sign I used was probably an attempt to mean euros by the way. I see now that the PWM chip and i2C fun I had last year would no longer be necessary as the Pi now has libraries to put out reliable PWM signals on lots of pins.


    I dont know .how the ESC connected with BLDC motor
    What is ESC
    Terminal description
    Plz help me

    1. solenerotech Post author

      I would say a big one…
      Well magdy, I’m not an expert on hardware. I just concentrated on my hw and tried to make it move.

      I rememeber to have read somewhere that esc must to be bigger (in terms of Ampere) respect the Max Ampere of yuor battery. But you neeed to double check in some other forum.

  7. Lawrence

    I can run on rpi 1 fine, but when I run on rpi 3, there’s no beep when I plug the battery on esc. Any help?


Leave a Reply to solenerotech Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s