0% found this document useful (0 votes)
19 views

Lab 910

This document discusses interfacing a DC motor with a PIC microcontroller. It aims to teach how DC motors work, how to control motor direction, and the concept of an H-bridge motor driver. It explains that DC motors require more current than microcontrollers can provide, so a separate motor driver chip is needed. The L293D dual H-bridge driver IC can be used to control two DC motors bidirectionally using a PIC microcontroller. The inputs to the L293D determine the motor's direction of rotation or if it stops.

Uploaded by

Malak Al-Ashi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Lab 910

This document discusses interfacing a DC motor with a PIC microcontroller. It aims to teach how DC motors work, how to control motor direction, and the concept of an H-bridge motor driver. It explains that DC motors require more current than microcontrollers can provide, so a separate motor driver chip is needed. The L293D dual H-bridge driver IC can be used to control two DC motors bidirectionally using a PIC microcontroller. The inputs to the L293D determine the motor's direction of rotation or if it stops.

Uploaded by

Malak Al-Ashi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

The Islamic University of Gaza

Electrical Engineering & Smart Systems Department


Microcontroller Systems Design Laboratory (EELE 4103)

LAB 9&10
DC motor Interfacing with PIC
Microcontroller
By:
Eng. Malak E. Al-Ashi

10/4/2021
Objectives

• To know how the Dc motor works.


• To learn how to control the direction of Dc motor.
• To learn the concept of H-bridge.
• To know how to use Motor driver chips like L293D.
DC Motor

• DC motors are low cost electrical to mechanical converters used in


applications. They are preferred over other motors including stepper motors
because of their low cost and speed.
DC Motor

Electrical DC Mechanical

Motor
DC Motor Interfacing with PIC Microcontroller

• DC motors need much more current than a microcontroller can provide, so it


needs separate drivers.
• Microcontrollers usually operates at +5 or +3.3V supply and it I/O pin can
provide only up to 25mA current. Commonly used DC Motors requires 12V
supply and 300mA current, moreover interfacing DC Motors directly with
Microcontrollers may affect the working of Microcontroller due to the Back
EMF of the DC Motor.
DC Motor Interfacing with PIC Microcontroller
• Following things should be taken into account
while designing the driver circuit:
• It should be able to handle high current, normally
more than 250mA.
• Filter back emf for coil safety.
• We can select a power transistor for handling
high current and a diode across the motor for
solving back EMF problem. The diode will
prevent current in reverse direction thus
blocking back EMF.
DC Motor Interfacing with PIC Microcontroller

• In this case, 12V is the Motor voltage, the


power transistor can drive the motor with
this specifications. This circuit will drive the
Motor in one direction only and can be used
to vary the speed using PWM.
DC Motor Interfacing with PIC Microcontroller
H-Bridge

• In order to solve the inability to rotate in both


directions, we use H drive. The name H bridge
comes from the structure of the circuit. The
shape of the circuit is like the letter H from
English alphabets.
• To rotate the motor, we need to close either S1
with S4 or S2 with S3. These will result in the
rotation in two directions.
H-Bridge

• Here is an actual circuit used for H bridge.


H-Bridge

• Here is an actual circuit used for H bridge.


Control the Direction of the motor using
2-relays
Driver IC L293D
• This IC can be used for rotating in either direction.
• It is a dual H-bridge motor driver, ie by using one IC we can control two DC
Motors in both clock wise and counter clockwise directions.
• The L293D can provide bidirectional drive currents of up to 600-mA at
voltages from 4.5 V to 36 V.
• This IC is designed to drive inductive loads such as dc motors, bipolar
stepping motors, relays and solenoids as well as other high-current or high-
voltage loads in positive-supply applications.
• All inputs of these ICs are TTL compatible and output clamp diodes for
inductive transient suppression are also provided internally. These diodes
protect our circuit from the Back EMF of DC Motor.
Driver IC L293D
Driver IC L293D

IN1 IN2 Motor Status

LOW LOW Stops

LOW HIGH Anti-Clockwise

HIGH LOW Clockwise

HIGH HIGH Stops


Good Luck

You might also like