View Single Post
Old Oct 17, 2012, 07:54 AM
juuuut is online now
Find More Posts by juuuut
Registered User
Joined Dec 2010
426 Posts
Quote:
Originally Posted by snakescb View Post
Hi again,

Ok, attached you can find my simple implementation for scilabs controllers. Not perfect yet, still working on, but I already made a lot of flights using this FW with some turnigy plush 12 esc's. I am developing the code in Ride7 and it is compiled using the RKit-51 on a hobbyist license.

Some ideas how to make motor startup smoother?

looking forward to receive some feedback
Hi,

im not good with assembly .. but i also build a ESC atm. ..

the startup works smooth with about 25% PWM (depending on input voltage) i dont did anything special. so here is generally how i do it:

Code:
rotorState = 0

startup(){
  if(rotorState == 0){
     commutateStep_0;
     setADCsForBackEMF_1;
     rotorState = 1;
  }else if(rotorState == 1){
     commutateStep1;
     setADCsForBackEMF_2;
     rotorState = 2;
  } .. so on
}
to get rid of some ADC interrupt noise i do some edge verification in startup phase. delayed by arround 5us atm. 3 times.

so:

Code:
compInterrupt(){ // backEMF interrupt
  if(startup){
    if(edge != exepted edge) return;
    delay 5us;
    if(edge != exepted edge) return;
    delay 5us;
    if(edge != exepted edge) return;

  }
  ...
}
i use 40 goodies (successful backEMF interrupts in a row)

here is a video .. active freewheel works also .. as you can see on the voltage display :P (the power supply dont likes it)

CIMG4088 (0 min 0 sec)



regards felix
juuuut is online now Find More Posts by juuuut
Last edited by juuuut; Oct 17, 2012 at 10:38 AM.
Reply With Quote