Showing posts with label electronics. Show all posts
Showing posts with label electronics. Show all posts

Friday, 13 August 2010

Lets Talk About H-bridge 3

Mosfet H bridge, is made up of 2 P Mosfets and 2 N MOsfets.

This is a P Mosfet

Low at the gate will turn it On; High will turn the P Mosfet off.

Next here is a N Mosfet

Low at the gate will turn N Mosfet on; low will turn it off.

Below shows a basic Mosfet H-bridge.

Turning on the pair Q1 Q4 or Q2 Q3 will rotate the motor.

Q1 and Q3 on, the motor will be on a High brake

Q2 Q4 on, the motor will be low brake

Short circuit will occur if the pair Q1 Q2 or Q3 Q4 are turn on.

Mosfets are controlled by voltage present at their gate, it will be uncontrolled if the gate is disconnected. Hence it will be wise to set a default value to the Mosfet gate.

Below shows a diagram with all Mosfet gates connected to the ground by the pull down resistor. Here P Mosfet are ON (Q1 Q3), while N Mosfet are OFF (Q2 Q4) making the default state High Braking. Of course, we can make all MOsfet off as the default state, by using pull-up resistors for P Mosfet and pull down resistors for N MOsfet.

How to interface the Mosfet H bridge

First, we can use a 4427 which is a driver to interface the H bridge with the microcontroller. I01 and IO3 are the inputs, IO4 IO5 outputs and IO2 ground. IO1 controls IO4,IO3 controls IO5.

Below is the truth table for the H bridge operation

IO1

IO3

output

0

0

Hi brake

0

1

Q1Q4 ON

1

0

Q2Q3 ON

1

1

Low brake

Next we will use a 4428 ( also a driver ) to interface the H bridge with the microcontroller. I01 and IO3 are the inputs, IO4 IO5 outputs and IO2 ground. IO1 controls IO4, IO3 controls IO5. 4428 IO4 is an inventing output.

Below is the truth table for the H bridge operation

IO1

IO3

output

0

0

Q2Q3 ON

0

1

Low brake

1

0

Hi brake

1

1

Q1Q4 ON

The advantages of these 2 designs are

  1. Only 2 inputs to control the H bridge
  2. Simple and easy to interface
  3. Eliminates short circuit combination

However, the design has a flaw, that is shoot-through will occur. The driver drives the same side of the H bridge and when driver output changes states, it will turn on both P Mosfet and N Mosfet for a brief moment, creating a short circuit path! The effect will be more serious if the motor changes states often, for example during PWM.

The 2 circuits below shows that by using 2 driver chip of each H-bridge we can eliminate shoot-through

Using 2 4427 drivers, we can control each Mosfets individually. A delay can be added through software so that the shoot-through condition will not occur.

Disadvantages of this circuit iare

  1. Need 4 outputs to control 1 H bridge
  2. More expensive
  3. Short circuit might occur, and must be prevented through software.

Next a dual 4428 H-bridge.

Below is the truth table for the H bridge operation

IO1

IO3

output

0

0

coast

0

1

Q2 Q3 ON

1

0

Q1 Q4 ON

1

1

Short circuit

Disadvantages of this circuit are

  1. No braking available
  2. More expensive
  3. Short circuit might occur, and must be prevented through software

There are so many types of H-bridge design and which one to use? It is all up to us to choose.

Friday, 11 September 2009

I must admit...

that I screwed up!!!

I've decided not to work this semester break, and spend time doing some electronic stuff!

Got my Atmega168 on Wednesday after waiting for about 1 week, Inserted it into the breadboard, turned on the power and " Eh whats that burning smell ?!?", touched the microcontroller, " Ouch, it's HOT!!!"

There my friend, is how you burn Money in less then 5 minutes! I just fried my mircocontroller! ARHHHHHHHHHHHHHHHHHHH.............i

Ok damage done, no use regretting.
The 1st law of electronics is proven!! Whats the 1st law of electronics? " 1st time is always a failure"

As a matter of fact, I've ordered another new chip and this time I'll use a smaller 8 pin chip, instead of a 28 pin, to reduce the risk and the pain in my heart IF something goes wrong!

I anyone want to make me feel better, u can make a donation for the lost of the burned chip to my bank account.

Sunday, 6 September 2009

blinking LED

Photobucket


outcome of the previous project .

Special thanks to my sis for the animation.

Friday, 28 August 2009

01 Flashing Bicolor LED

This is how I drive a bicolor LED with a common cathode. This circuit allows the bicolor LED to flash in intervals RED-GREEN-RED-GREEN.... assuming the LED is a red green bicolor LED.

1. A 555 timer was used to provide the pulse and timing for the intervals.
2. The LED on the left is connected directly to the output Pin 3, while the LED on the right is connected to a simple resistor-transistor logic NOT GATE.
3. Left LED will light when the output is HIGH; Right LED will light when output is LOW.
4. Assuming the 555 timer can source up to 200mA, a maximum 10, 20mA LED can be connected in parallel.

reference:
NOT gate/ inverter
http://www.play-hookey.com/digital/experiments/rtl_inverter.html

email:
shlim90@gmail.com