BLDC Main
BLDC Main
BLDC Main
Group: 20
I. DESCRIPTION DESIGN
1. Specification
- Rated voltage: 24V.
- Rated power: 300W.
2. Functionality
1. Source
a. Buck 24V-12V, 24V-5V
-Description: buck converter to regulate high voltage to low level voltage; step-
down 24V to Vcc(5V) to supply for others components.
+ Input: 24VDC, output: 5VDC
+ Using LM2576:
. Switch mode step-down voltage regulator.
. Output Voltage for fixed voltage regulator: 3.3V, 5V, 12V or 15V.
. Output Current: 3A
. Maximum Input Voltage: 40V
- Choosing components
V Out =V REF 1+
( ) R2
R1
where V REF =1.23 V
¿> R 2=R1
( V Out
V REF )
−1 ; Select R1=3.6 k Ω
Capacitor out
V¿
C Out ≥ 13.3 =0.06 ( µF )
V Out . L
V reverse =5∗3.6=18(V )
Diode: 1N5824
-Description: buck converter to regulate high voltage to low level voltage; step-
down 24V to 12V to supply for mosfet driver.
+ Input: 24VDC, output: 12VDC
+ Using LM2576:
. Switch mode step-down voltage regulator.
. Output Voltage for fixed voltage regulator: 3.3V, 5V, 12V or 15V.
. Output Current: 3A
. Maximum Input Voltage: 40V
- Choosing components
V Out =V REF 1+
( ) R2
R1
where V REF =1.23 V
¿> R 2=R1
( V Out
V REF )
−1 ; Select R1=1.5 k Ω
So choose component:
Resistance: R1=1.5 k Ω , R2=13 k Ω
Input capacitor : C 1=¿100uF
Output capacitor : C 2=177uF
Inductor : L1=150uH
Diode : 1N5824
b. Buck 5V-3.3V
In order to supply for MCU, using LM1117 to converter 5V Vcc to 3.3V and
isolated by RSH2-3.33.3S/H3.
R 10
+ Vout= Vref (1+ R 9 ) + IADJ*R2, (IADJ small)
Where: Vref=1.25V;
=> Select R9=0.8kΩ (<1k);
Vout
=> R10= ( Vref −1)* R9
b. Reset button
- The LED is connected to MCU that is active for RESET mode. When
pushing the RESET button, the Led will be turned on.
3. Digital input
- Description: digital input for start, stop and choosing direction & control
mode for motor.
+ Input voltage:
. Logic low: 0 - 0.2V
. Logic high: 2 - 5V
+ Output voltage:
. Logic low: 2 – 3.3V
. Logic high: 0 – 0.8V
- Using PC817 to isolate and protect MCU
+ When Vin= 0 - 0.2V -> Vin < 0.7 -> Diode is at cut off region -> transistor
is at cut off region -> Vout =0.
+ When Vin= 2 - 5V:
Vin−0.7
I1= R1
3.3
I2= R 2
R1 R1
+ Vin = 2 => R 2 < 0.19; Vin= 5 => R 2 < 0.64. And MCU rating current is
5mA=> I1= 80% *5= 4mA
Choosing R1= 1 k Ω , R2= 10 k Ω
4. Analog input
- Describe: + Analog input: 0V – 10V
+ Output: 0V – 3.3V
- Voltage divider: choosing R3=10kΩ, R4= 40kΩ
R3 10 k Vin
=> V1= R 3+ R 4 * Vin = 10 k +40 k * Vin = 5
10
=> V+ = V1 = (0 ~ 5 ) = 0 ~ 2V
5. MCU STM32F101R6T6
a. Overview
- 12-bit synchronized ADC number of channels: 1-16 channel
- GPIOs: 51
- CPU frequency: 36 MHz
- Operating voltage: 2.0 to 3.6 V
- Operating temperature: ambient temp: -40 to 85Oc, junction tem: -40 to 105Oc
-Packages: LQFP64
2 PC15-OSC32_OUT OSC32_OUT 4
3 NRST RESET System 7
4 PCO ~ PC7 Led Data Bus 8 ~ 11,
24,25,37,38
5 PC10 Led Register 51
6 PC11 Led Enable 52
7 PB5 ~ PB12 Keyboard pins 57~59,
61,62,29,30,33
8 PA8 HIN1 (PWM) 41
9 PA9 HIN2 (PWM) 42
10 PA10 HIN3 (PWM) 43
11 PB13 LIN1 34
12 PB14 LIN2 35
13 PB15 LIN3 36
14 PC8 Encoder A 39
15 PC9 Encoder B 40
16 PA4 Current Feedback 20
17 PB0 Hall Sensor A 26
18 PB1 Hall Sensor B 27
19 PB2 Hall Sensor C 28
20 PA2 USART_TX 16
21 PA3 USART_RX 17
22 PA5,PA6,PA12,PA13 Start, Stop,Direction, 21,22,45,46
Mode
23 PA11 Analog input 44
24
25
4. Inverter circuit
- Purpose: inverter transfer source 24 VDC into AC source to supply for motor ->
using 6 mosfets IRF3205.
- The voltage source inverter contains six switches to drive 3-phase BLDC. The
designed order1 to 6 represents the sequence of switch operation in time. It
contains of 3 phase legs which operate in 120o apart. The three phase legs have a
phase shift at 120o among themselves that means phase leg (3-6) switches 120o
after phase leg (1-4) and phase leg (5-2) switches 120o after (3-6). Switch 1 and 4
get turned ON to give the voltage at one phase i.e, Va.Switch 3 and 6 turned ON to
give voltage Vb. Switch 5 and 2 turned ON to give voltage Vc.
- Power’s Motor: P = 300W
- U= 24V -> I= 300/24= 12.5(A) -> The switches need to withstand the nomial
values of the motor -> It could be mosfet IRF3205
5. Driver circuit (IC IR2110)
- VCC: Low side fixed supply voltage from 10V to 20V -> using source 12VDC
- VDD: logic supply voltage from VSS+3 to VSS+20 (recommend VDD>=+4V) -
> using source VCC (5V)
- VSS: logic supply offset voltage – connected to ground
- COM: Low side return – connected to ground
- HIN: logic input for high side gate driver output (HO), in phase – connected to
MCU.
- LIN: logic input for low side gate driver output (LO), in phase – connected to
MCU.
- Electrolytic capacitor in paralled with ceramic capacitor (12V with C1, C2) is use
as boost trapping capacitor.
- Diode and resistance (R1, R2, D2,D3) are use for protection of from reversal of
supply from switches.
- C1= 22uF, C2=100nF; C3=22uF, C4= 100nF
- R1=R2=10; R3=R4= 1k.
R8 10 k
R10= Vout* Vout+−Vout−¿ ¿ = 3.3* 1.44 = 22.9k(Ohm)
7. Velocity Feedback
In order to feedback the motor’s velocity, for example using encoder HN3806-AB
Rotary Encoder and using opto PC817 is to isolate encoder and MCU.
8. Hall Sensor
9. Overheat Protection
- In order to protect the controller from overheat situation; using relay to open
circuit when it appears.
- Using the IC LM35 to detect the circuit’s temperature
-> Thus, Vout in range of (-55*10mV/C; 150*10mV/C )= (-0.55V;1.5V)
- After that; using voltage divider from source Vcc to pin V- of op-amp LM339.
Reference for V- is set 1.3V respect to 130oC:
Choosing R3= 10k
R4 R4
V- = Vcc* R 4+ R 3 => 1.3= 5* R 4+10 k => R4= 3.51k
-> If occurring overheat situation, V+ > V- means Vout is high logic. After that,
using transistor BC547 to control relay open circuit to isolate between source 24V
and inverter.
-Choosing IC MAX485
+ Quantity: 1 port
+ Protocol: Modbus
+ Communication Standard: RS485
+ 3-3.5V supply voltage
+ Transmission speed up to 20 Mbps
+ Isolation to MCU: 6N137A
* Normal
Normal operation: normal operating state; if the motor occurs any problems,
such as overcurrent, overheat, interruption,etc, it will convert to Emergency Stop
state.
- IDLE: stop and wait for Run signal/keypad signal and parameter setting,set
point, PWM calculation and duty cycle
- RUN: the motor is running normally (eventhough within warning)
+ If the operator mode is mode-1, the controller will work as speed control
+ If the operator mode is mode-2, the controller will work as torque control
- STOP: stop working and go back to the idle if needed
* Emergency Stop
Emergency Stop: if existing any emergency problems, the system will be
immediately stopped. -> Choosing Start again to start the motor after emergency
situation.
2. User interface
Where:
- Idle: the initial state, waiting for command.
- Master’s transmit: the controller received data from peripheral(such as
master’s MCU, PLC,…).
- Keypad’s transmit: send data command from user to controller
- Warning: response to system if there’re any problems(overheat, overcurrent,
incorrect syntax, error,etc).
User can directly control BLDC through keypad 4x4 unless any other’s master
command.
* Menu
The options displayed on the LCD screen menu is in ordered:
Value,Direction,Mode. In order to move to left or right through key * or #
respectively, then user choose one of them, return to menu options by ‘back’
+ Set value: user will insert speed/torque value by keypad’s number
+ Set direction: * respected to speed mode and ; # respected to torque mode
+ Set mode: ‘A’ stand for clockwise direction, ‘B’ stand for counter clock wise
Note: ‘C’ stand for back & ‘D’ stand for enter
* Peripheral’s request
- If there’s any request from peripheral, stop keypad’s command then supplied to
serve master.
Each actions will be displayed on LCD.