Sinusoidal driving of 3-phase sensored BLDC, use PWM

Hi to all forum.

This is my first post. I want sinusoidal driving a BLDC motor and i find this application wich suit me, but with a small change, speed reference not be analog (0-2.56V ) for speed control, but PWM (0%-100% ) 5V. Any person here can to help me? or anybody which have doit that but with arduino? Thanks

AVR449 application (ATiny261/461/861)

code its here: http://www.microchip.com//wwwAppNotes/AppNotes.aspx?appnote=en591744

The way to get sinusoidal PWM is have three phase-correct PWM outputs running in lock-step, then modulate each about the 50% level using sine signals each 130 degrees apart.

With the Uno this means setting up two timers to run in lockstep by using exactly the same settings and setting the counts to zero together.

With the Mega many counters already have 3 output pins they control, so this is easier.

BTW how are you estimating/measuring rotor position and anticipating doing the PID loops?

If you only have hall sensor information (not encoder accuracy), then trapezoidal drive is much
simpler.

You can run a rotor angle estimator from the hall sensor data, and synchronize the sinusoidal phase
from this - typically an estimator would track speed (and even acceleration) from a few past hall
transitions, and thus estimate current rotor angle until the next transition comes in.

Hi MarkT I will use hall sensor, i dont want any PID loop, speed control will be from PWM instead of analog port. In that application use hall sensors and have options, close loop or open loop. Take a look on AVR449 Thanks.

yiannis_panais: code its here: http://www.microchip.com//wwwAppNotes/AppNotes.aspx?appnote=en591744

I do not see it there. Can you post the source code here, using code tags?