• No results found

L239D DC Motor Driver

N/A
N/A
Protected

Academic year: 2021

Share "L239D DC Motor Driver"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

L239D DC Motor Driver & Pin Configuration

L239D DC Motor Driver & Pin Configuration

Although I’ve only used 1 motor, it is possible to use 2 motors on a single L293D chip,

Although I’ve only used 1 motor, it is possible to use 2 motors on a single L293D chip, of courseof course you then have to compensate on the current accordingly to ensure enough juice for both motors you then have to compensate on the current accordingly to ensure enough juice for both motors under peak load. Remember that if you use 2 motors, the power source will be the same voltage under peak load. Remember that if you use 2 motors, the power source will be the same voltage but the current needed will be doubled

but the current needed will be doubled  –  –  a good start is by altering how your batteries area good start is by altering how your batteries are connected in series or parallel.

connected in series or parallel.

“The L293D is a monolithic integrated, high voltage, high current, 4

“The L293D is a monolithic integrated, high voltage, high current, 4--channel driver.” Basicallychannel driver.” Basically this means using this chip you can use DC motors and power supplies of up to 36 Volts, thats this means using this chip you can use DC motors and power supplies of up to 36 Volts, thats some pretty big motors and the chip can supply a maximum current of 600mA per channel, the some pretty big motors and the chip can supply a maximum current of 600mA per channel, the L293D chip is also what’s known as a type of H

L293D chip is also what’s known as a type of H-Bridge. The H-Bridge is typically an electrical-Bridge. The H-Bridge is typically an electrical circuit that enables a voltage to be applied across a load in either direction to an output, e.g. circuit that enables a voltage to be applied across a load in either direction to an output, e.g. motor.

motor.

This means you can essentially reverse the direction of current and thus reverse the direction of  This means you can essentially reverse the direction of current and thus reverse the direction of  the motor. It works by having 4 elements in the circuit commonly known as corners: high side the motor. It works by having 4 elements in the circuit commonly known as corners: high side left, high side right, low side right, and low side left. By using combinations of these you are able left, high side right, low side right, and low side left. By using combinations of these you are able to start, stop and reverse the current. You could make this circuit out of relays but its easier to to start, stop and reverse the current. You could make this circuit out of relays but its easier to use an IC

use an IC –  – The L293D chip is pretty The L293D chip is pretty much 2 H-Bridge circuits, much 2 H-Bridge circuits, 1 per side of 1 per side of the chip or 1 perthe chip or 1 per motor.

motor.

The bit we really care about in all of this is the 2 input pins per motor that do this logic and these, The bit we really care about in all of this is the 2 input pins per motor that do this logic and these, more importantly for our needs, can be controlled from the Arduino board.

more importantly for our needs, can be controlled from the Arduino board. You also don’t have to worry about voltage regulation so m

You also don’t have to worry about voltage regulation so much because it allows for 2 poweruch because it allows for 2 power sources

sources –  – 1 direct source, upto 36V for the motors and the other, 5V, to control the IC which can1 direct source, upto 36V for the motors and the other, 5V, to control the IC which can  be

 be supplied supplied from from the the Arduino Arduino power power supply supply or or since since my my motor motor power power supply supply is is only only 6V 6V I’mI’m going to use this (if the motor supply was higher I would consider using a transistor or voltage going to use this (if the motor supply was higher I would consider using a transistor or voltage regulator). The only thing to remember is that the grounding connection must be shared/  regulator). The only thing to remember is that the grounding connection must be shared/  common for both supplies. Below you can see the pin layout for the chip and the truth table common for both supplies. Below you can see the pin layout for the chip and the truth table showing the output logic.

(2)

Pin 1 Pin 2 Pin 7 Function

High Low High Turn clockwise

High High Low Turn anti-clockwise

High Low Low Stop

High High High Stop

Low Not applicable Not applicable Stop

Generally speaking most DC motors require a lot more current than the Arduino board can  provide for instance the motor that I’m using needs around 5 to 6 Volts. Now I could use a 12

Volt power source for the Arduino, but then its going to drain quickly when it has to power everything, especially if I was to add in another motor and a couple of servos, so instead my Arduino runs off of my 9 Volt power supply I made. (here)

You’ll need a few capacitors in this circuit to smooth out the power load to the motors as much as possible to help avoid any spikes and stabalise the current. I’m using a 50 Volt 10 uF capacitor on the power supply  – I suggest you do this as the bare minimum. You could also add in a capacitor for each motor that you use  – something like a 220nF multilayer ceramic capacitor should be OK for the small motors.

(3)

10K Ohm resistor (Brown, Black, Orange, Gold) 50V 10uF Capacitor

6V DC motor

L293D motor controller/ driver chip (IC) A switch (push, toggle etc..)

Arduino Deumilanove w/ ATMEGA328 Breadboard / Prototyping board

Jumper/ Connector wires 4x AA battery holder 4x AA batteries

Optional 220nF multilayer ceramic capacitor (Y5V)

Optional 9V DC power supply or use the USB power for the Arduino

Building the L293D motor driver circuit

First lets start with the 16 pins on the L293D chip and what we need to wire these to. You’ll see that its basically got 2 sides, 1 for each motor.

(4)

1. Enables and disables the motor whether it is on or off (high or low) comes from the Arduino digital PWM pin 9

2. Logic pin for the motor (input is either high or low) goes to Arduino digital pin 4 3. Is for one of the motor terminals can be either

+/-4. Ground 5. Ground

6. Is for the other motor terminal

7. Logic pin for our motor (input is either high or low) goes to Arduino digital PWM pin 3 8. Power supply for the motor, this should be given the rated voltage of your motor, so mine

is from a 6V supply

9. Enables and disables the 2nd motor on or off (high or low) 10. Logic pin for the 2nd motor (input is either high or low) 11. Is for one of the 2nd motor terminals can be either +/-12. Ground

13. Ground

14. Is for the 2nd motors other terminal

15. Logic pin for the 2nd motor (input is either high or low) 16. Connected to +5V, in this case the power from motor supply

You can see from my photos how I’ve placed the L293D and wired it according to the above pins. Next I have my switch on Arduino digital pin 2 and I have the GND pin from Arduino connected to the GND rail on my breadboard. I also add the capacitor in between the power supply  –  making sure that the negative and positive terminals are correctly aligned. Finally I complete the circuit by adding in wires to carry the current from one side of the breadboard to the other and I add in the motor and its power supply.

(5)

References

Related documents

The objective of this study was to develop a simple questionnaire to measure equity in utilization of EmOC at Wolisso Hospital, Ethiopia and compare the wealth status of EmOC users

While these successfully allow the modeling of objects with internet interfaces, the main advantages of orthogonal persistence stem from the seamless semantic model

Dettaglio top/fianco finale serie Xeno Manager e Sedici÷noni S1 lux / S2 lux. Xeno Manager and Sedici÷noni S1 lux / S2 lux top/side

If an anomaly is detected in the data for a given host, the cluster_check subroutine builds a configuration file for that specific host for that specific event and, one minute

Phone controls: *6 – Mute line *7 – Unmute line Step 2: Online (internet) Login:.. Participant login -- insert the access code 5695600 and press the

We evaluated IS and secretion using indices derived from fasting (homeostasis model assessment of insulin resistance [HOMA-IR], quantitativeinsulin sensitivity check index [QUICKI]

Prognostic factors, clinical course, and hospital outcome of patients with chronic obstructive pulmonary disease admitted to an intensive care unit for acute

by the brake devices having the proposed consitutive models de- fined by Cazzani-LPR Brake Model and Dhakal-LPR Brake Model and integrated separately into the R-LPR, when subjected