Sensored brushless DC (BLDC) motor control with PIC16F877A microcontroller




Sensored BLDC motor control using PIC16F877A – CCS PIC C compiler

This topic shows an easy way to drive a Cd-Rom sensored brushless DC motor (BLDC motor) using PIC16F877A microcontroller with CCS PIC C code.Sensored brushless DC (BLDC) motor control with PIC16F877A microcontroller

This motor is three phase motor, it has three stator phases that are excited two at a time to create arotating electric field. This method is fairly easy to implement, but to prevent the permanent magnet rotor from getting locked with the stator, the excitation on the stator must be sequenced in a specific manner while knowing the exact position of the rotor magnets.
The sensored BLDC motor has 3 hall effect sensors (Sensor A, Sensor B and Sensor C), this sensors sense the rotor position. Each sensor outputs a digital high for 180 electrical degrees and outputs a digital low for the other 180 electrical degrees. The following figure shows the relationship between the sensors outputs and the required motor drive voltages for phases A, B and C.

A three phase bridge is used to energize the BLDC motor windings.A three phase bridge is used to energize the BLDC motor windings.

Each phase driver requires 2 pins one for the high side and the other one for the low side which means a total of 6 pins are required to drive the three phase bridge. In this project 6 pins of PORTD will be used.
The 3 hall effect sensors needs 3 pins and for that RB4, RB5 and RB6 are used.

CD-ROM sensored brushless DC (BLDC) motor speed control with PIC16F877A microcontroller:
The following image shows project circuit schematic diagram.CD-ROM sensored brushless DC (BLDC) motor speed control with PIC16F877A microcontroller

LM339 consists of four independent precision voltage comparators. 3 camparators are needed for the 3 hall effect sensors as shown in the circuit schematic above. A +5V is needed for the LM339 chip as shown below:

 

For more detail: Sensored brushless DC (BLDC) motor control with PIC16F877A microcontroller




Leave a Comment

*
= 5 + 9

Read previous post:
6V LEAD ACID BATTERY CHARGER USING BQ24450

6V Lead acid (SLA) battery charger project is based on BQ24450 IC from Texas instruments. This charger project takes all...

Close
Scroll to top