Maker Pro
Maker Pro

A three phase H-bridge

Konstantin Metodiev

Jul 17, 2015
3
Joined
Jul 17, 2015
Messages
3
Hello! I am newbie in electronics which is why probably, I am going to ask a simple question. I am trying to design an H-bridge to drive a three phase brushless DC motor within Proteus environment. The circuit is shown in the attached image. The microcontroller is PIC18F2550 and the driver is IR2101.
Both the ucontroller and the driver do whatever they are expected. The MCU switches two pins of PORTB in a row according to the attached source code. The IR2101 in turn amplifies the signal within 0...12V DC. The MOSFETs' gates are switched ON and OFF accordingly so that each time two phases are connected obeying the current commutation step:
1) Phase U -> Phase W
2) Phase U -> Phase V
3) Phase W -> Phase V
4) Phase W -> Phase U
5) Phase V- > Phase U
6) Phase V -> Phase W
The Hall sensor isn't considered here.
Needless to say, the simulation stops after few sconds. Each phase suffers from severe ripples which are visible in the oscilloscope windows. Please note, the ripples appear if the current phase is not connected by the MOSFETs. For instance, whenever Phase U and Phase W are connected (step 1) the Phase V voltage oscillates significantly.
I can't deal with that issue. Could anybody help me?
Thank you in advance!


void InitMain(void) {

CMCON = 0x07; // Disables comparators
ADCON1 = 0x0F; // All digital

TRISB.F0 = 0; // Sets up an output
TRISB.F1 = 0; // Sets up an output
TRISB.F2 = 0; // Sets up an output
TRISB.F3 = 0; // Sets up an output
TRISB.F4 = 0; // Sets up an output
TRISB.F5 = 0; // Sets up an output

return;
}

const unsigned char delay = 100;

void main() {

InitMain();

PORTB = 0b00000000;

while(1) {
/* UH UL VH VL WH WL */
PORTB.F0 = 1; PORTB.F1 = 0; PORTB.F2 = 0; PORTB.F3 = 0; PORTB.F4 = 0; PORTB.F5 = 1; Delay_ms(delay);
PORTB.F0 = 1; PORTB.F1 = 0; PORTB.F2 = 0; PORTB.F3 = 1; PORTB.F4 = 0; PORTB.F5 = 0; Delay_ms(delay);
PORTB.F0 = 0; PORTB.F1 = 0; PORTB.F2 = 0; PORTB.F3 = 1; PORTB.F4 = 1; PORTB.F5 = 0; Delay_ms(delay);
PORTB.F0 = 0; PORTB.F1 = 1; PORTB.F2 = 0; PORTB.F3 = 0; PORTB.F4 = 1; PORTB.F5 = 0; Delay_ms(delay);
PORTB.F0 = 0; PORTB.F1 = 1; PORTB.F2 = 1; PORTB.F3 = 0; PORTB.F4 = 0; PORTB.F5 = 0; Delay_ms(delay);
PORTB.F0 = 0; PORTB.F1 = 0; PORTB.F2 = 1; PORTB.F3 = 0; PORTB.F4 = 0; PORTB.F5 = 1; Delay_ms(delay);
}//while

return;
}

circuit3.png
 

Arouse1973

Adam
Dec 18, 2013
5,177
Joined
Dec 18, 2013
Messages
5,177
Hello
Why have you not followed the data sheet for the drivers? You drive two N-Channel MOSFETs straight from the drivers and not through BJTs.
Adam
 

Konstantin Metodiev

Jul 17, 2015
3
Joined
Jul 17, 2015
Messages
3
Now I understand that there is an error in the circuit. The bipolar transistors act like switches. They switch the gate ON and OFF thus let the current flow through the drain. For instance, if the NPN transistor at UH is OFF (no signal to the base) the gate voltage is HIGH and the p-channel MOSFET is OFF. The PNP transistors at the lower half of the schematics do the same following an opposite logic.
Another inportant reason to use the bipolar transistors is protecting the microcontroller ports. The MOSFETS are supplied with 12V DC which is too high for the chip.
Here is the redundancy. The IR2101 does exactly the same thing. The IR2101 appear to be an interface between the ucontroller and the MOSFETS. I removed the bipolar transistors yet the situation didn't get better. The ripples persist.
Thank you for your interest in the project!
Konstantin
 

Arouse1973

Adam
Dec 18, 2013
5,177
Joined
Dec 18, 2013
Messages
5,177
The MOSFET drivers are the interface to the micro. You don't need the BJTs if you drive the circuit how the data sheet tells you. How much delay do you have in your software between turning one MOSFET on and the other off?

Edit: I am pretty sure the waveforms are showing shoot through which is why I asked what delay you had in your software.

Adam
 
Last edited:
Top