Driving DC Motor with EAB PDF

Brigosha Technologies
Application Notes
Driving DC Motor with EAB
Introduction
A 12V DC geared motor can be used for
The H-Bridge Circuit is connected with
robotics and other related applications.
an external 7V-12V supply. This external
This motor is very easy to use and
power supply is used for powering the
available in standard size. It comes with
DC Motor. The rotation of DC Motor in
nut and threads on shaft and internal
clockwise or anti-clockwise direction is
threaded shaft for easily connecting it to
regulated
the chassis’s clamp and wheel. The EAB
programming. The H-Bridge Circuit
(Embedded Application Board) can be
powers the DC Motor based on user
used to drive such DC Motor with the
requirement, which can be done with
help of a H-Bridge Circuit.
firmware control.
by
EAB
through
Components
The Components required for DC Motor
Control with EAB…
EAB
DC Motor
Motor Driver(containing L293D)
Power Adapter
Wires and Jumpers
Email: [email protected], Website: www.brigosha.com
Copyright: Brigosha reserves all rights in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third
parties. Brigosha is the registered trademark of Brigosha Technologies Pvt. Ltd. Specifications within this document are preliminary and subject to change
without notification. Document is not intended for publication.
Application Notes
Motor Driver Board
The motor driver board consists of IC
we have to use this Driver to increase
L293D. It has 4 inputs and 4 outputs.
the current by which we can drive the
Since, the current from the EAB is not
DC Motors.
sufficient enough to drive the motors, so
Block Diagram
Block level representation of the different blocks of the DC Motor Control is shown
bellow...
EAB
Motor
Driver
Motor
Schematic Diagram
The Schematic diagram illustrates the circuit connections for designing the application.
EAB
RC0 RC5 GND
IN1
IN2 GND
M1
Motor Driver
Copyright: Brigosha reserves all rights in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third
parties. Brigosha is the registered trademark of Brigosha Technologies Pvt. Ltd. Specifications within this document are preliminary and subject to change
without notification. Document is not intended for publication.
Application Notes
Connection Description
The RC0 and RC5 pin of EAB is
DC Adapter is Connected to the 7-12V
connected to the IN1 and IN2 pin of
power supply. Jumpers wires are used
Motor driver circuit i.e. H-Bridge Circuit.
to connect the one end of the Adapter
Based on RC0 and RC5 pin status, the
and 12V pin and Ground pin of H-Bridge
DC Motor will rotate. The two terminals
Circuit. The EAB is also connected with
of the motor are connected to the O/P1
Ground pin for a common ground in the
and O/P2 pin of H-Bridge circuit. The
entire circuit connection.
Note: Any GPIO pin can be used for driving a motor. Set the particular GPIO pin to
output and provide a high/low signal to the pin.
Copyright: Brigosha reserves all rights in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third
parties. Brigosha is the registered trademark of Brigosha Technologies Pvt. Ltd. Specifications within this document are preliminary and subject to change
without notification. Document is not intended for publication.
Application Notes
Code Flow Chart
Start
Main Function()
1. Define System Clock
2. Initialize library function
Set Oscillator Frequency
While(1)
Configure IO pins
(RC0,RC5)
Rotate Motor in Clockwise
Direction (RC0=1;RC5=0)
Delay (5s)
Stop the Motor
(RC0=0;RC5=0)
Delay (2s)
Rotate Motor in Anti-Clockwise
Direction (RC0=0;RC5=1)
Delay (5s)
Stop the Motor
(RC0=0;RC5=0)
Delay (2s)
Copyright: Brigosha reserves all rights in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third
parties. Brigosha is the registered trademark of Brigosha Technologies Pvt. Ltd. Specifications within this document are preliminary and subject to change
without notification. Document is not intended for publication.
Application Notes
Source Code
The Source code shown below is the
Refer to the EAB User Guide and the
firmware
EAB Programming Guide for more
to
microcontroller
be
of
flashed
the
in
the
Embedded
details
on
how
Application Board. The Source code is
program(Source
commented for better understanding of
microcontroller
the user.
Application Board.
to
Code)
of
Flash(burn)
in
the
Embedded
Copyright: Brigosha reserves all rights in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third
parties. Brigosha is the registered trademark of Brigosha Technologies Pvt. Ltd. Specifications within this document are preliminary and subject to change
without notification. Document is not intended for publication.
Application Notes
Output
Applications
The Source Code is written to rotate the
The controlled rotation of DC Motor
motor in clockwise and anti-clockwise
has
direction. As soon as you switched ON the
controlled rotation can be used to:
various
applications.
system, the motor will start rotating in
Control Robotic Motion
clockwise direction, for 5sec. Then it will
Security Gate Systems
stop for 2sec and start rotating in anti-
Industrial Applications
This
clockwise direction. Then again stops for
2sec. This process will continue till the
system is switched ON.
Copyright: Brigosha reserves all rights in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third
parties. Brigosha is the registered trademark of Brigosha Technologies Pvt. Ltd. Specifications within this document are preliminary and subject to change
without notification. Document is not intended for publication.