1
$\begingroup$

Working on developing efficient code for driving a BLDC 3-phase motor with BEMF feedback using Atmega328pb,

The code is based (as a starting point) on this tutorial: Link

The basic understanding is to increase the speed we need to increase the duty of the PWM's

However, the code I currently have works fine BUT is not efficient, (the motor uses much more current than other off the shelf controllers for the same speed)

Note: For this specific project, the main goal is to get a high speed (as the motor is used for an air pump or blower)

The code is simple, It uses a 6-step commutation to rotate the motor, It triggers a comparator interrupt to go from one step to the next step, (for every step the interrupt is different, see the code in the above link)

See the link https://www.digikey.com/en/articles/controlling-sensorless-bldc-motors-via-back-emf that explains how it works, and for this project, we use this configuration below: cam.png

Important text from the Digikey tutorial from the link above: Note that there is a phase difference between an individual Hall sensor changing output in a conventional BLDC motor, and the back EMF zero crossing point for an individual coil in a sensorless unit of 30 degrees. Consequently, in a sensorless motor control circuit, after the zero-crossing point is detected, a 30-degree phase lag is built into the firmware before the next action in the energizing sequence is activated

The question is: How can we know exactly when to move to the next step, (maybe we can use timers)

In the tutorial code, it implements some form of delay in the ISR code that works somehow, but is very not efficient,

$\endgroup$

0

Your Answer

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

Browse other questions tagged or ask your own question.