For the rotation of DC motor it requires current of about 11amps
under load, 1.25amps under no load. This high current cannot be supplied by the
microcontroller we use (ports of microcontroller deals with micro currents).
How do we arrange for that much of current? Well the obvious
answer to this is to use transistors.
Control of the directions,break and coast of Dc-motor:
We can control the direction of rotation by using classical
H-bridge circuit it is depicted below
- Q1, Q2: These are NPN transistors. They connect the motor to ground (negative terminal of the battery).
- Q3, Q4: These are PNP transistors. They connect the motor to +12V.
- R1-R4: These resistors prevent too much current from passing through the base (labeled B) control pin of the transistor. A higher resistance would waste more power, and might cause the motor to receive less power. A lower resistance would waste less power, but wouldn’t likely provide better performance for motors running on consumer batteries.
- D1-D4: Schottky diodes are used to prevent the transistors from dying due to high reverse flow of current through the it. This high current is generated by the back emf of the motor, while changing the direction or slowing the speed.
The below table gives the control command :
A B DIR
0 0 stop
0 1 ccw
1 0 cw
1 1 stop
If you feel this as pain in the butt. A simpler way of coming up with the driver circuit is to use ics.
I'm going to give a tutorial of using a well known quadruple half H-bridge ic "L293D" .With it we can control the directions as above itself.
plz send me the hex and c code of this microcontroller plz on
ReplyDeletenadeem.samin@gmial.com