Dc Motor Driver Circuit Using Uln2003

Comments

Dc Motor Driver Circuit Using Uln2003
  • When you need to be able to reverse the DC motor then the complexity of a H-bridge is needed. When all you need to do is control the motor or even PWM it then there's this wonderful 3-pin IC called a 'MOSFET'. Yeah, and what's more, they are usually rated to handle many 10's of amps so that motor stall should never be a problem. You can even drive them from 3.3V with only a single I/O.
    Ok, sounds over the top maybe? But it's true and it is exactly what I would use. Why use a space pen when a pencil will do?

  • Thank you all
    Here is the article.
    https://electrosome.com/dc-motor-l293d-pic-microcontroller/
    You just replace that micro with a Stamp (BS1 to BS2p40) or Propeller.
    The article is the level of this forum.
    So. That is how to connect Parallax micro to DC motor.
    There may still be a Parallax article or Nuts and Volts or Application Note out there somewhere like it.
    Happy holiday! 14 days til Christmas!
  • So you are not really interested in finding out how to do it then?
    How hard is it to connect the 2 wires of a DC motor?
    I've not seen you follow through on any of your 'problems'.
    Maybe you just like creating a stir?
    I could be wrong but moderators please take note.
    Happy holiday!
  • edited 2018-12-10 - 04:34:41
    'When you need to be able to reverse the DC motor then the complexity of a H-bridge is needed'
    Thank you for that.
    Will connect up some of this stuff.
    Using a 4.5 volt 3 AA battery box to power motor.
    It's a motor on a Tamiya wheel ratio kit. Turns some different diameter wheels with rubber bands for belts.
    No 'belts' on it.
    Happy holidays!
  • For those of you wandering through this thread looking for suggestions and examples of DC motor control using a Basic Stamp or Propeller, do have a look at the Nuts and Volts columns, particularly Vol 1, #23. This is a long-running series of columns in Nuts and Volts magazine most by JonnyMac on a variety of topics, complete with easy to understand discussions and explanations and practical examples.
  • microcontrolleruser,
    I thought you wanted to know how to connect 2 motors to an L293D and I have seen much better tutorials than the one you linked to.
    https://itp.nyu.edu/physcomp/labs/motors-and-transistors/dc-motor-control-using-an-h-bridge/
    Mike,
    That's a good article and it even has something for Erco (controlling 2 motors with relays through a ULN2003).

  • Thank you Mike
    There we go a Nuts and Volts article on it. Suspected there was one out there.
    Probably an application note too.
    Thank you Genetix
    'I thought you wanted to know how to connect 2 motors to an L293D'
    Not me. That would be like saying I wanted to hook up four because I looked at ULN2003 first.
    Nope. Just one motor.
    I do not think there is an IC for just one motor.
    The L293D just throws in a circuit for extra motor. That was a common sense thing to do.
    Happy holidays!

  • Here is the L293D in a nutshell.
    Control Signals and Motor Status
    RB0/IN1 RB2/IN2 Motor Status
    LOW LOW Stops
    LOW HIGH Anti-Clockwise
    HIGH LOW Clockwise
    HIGH HIGH Stops
Motor
  • Information about the 28BYJ-48 stepper motor and ULN2003 driver board. The 28BYJ-48 is one of the cheapest stepper motors you can find.Although it is not super accurate or powerful, it is a great motor to use for smaller projects or if you just want to learn about stepper motors.
  • These are the two most common ULN2003A driver boards. You can use these boards to drive DC motors or unipolar stepper motors. The advantage of the below board is that all 7 inputs (IN1.7) and all 7 outputs (A.G) of the ULN2003A are accessible. The 28BYJ-48 stepper motor plugs straight into the connector.

Description

Unipolar stepper motors have 5, 6 or 8 wires. They do not require a dual H-bridge to drive them. Instead, you can use a transistor for each phase and a flyback diode to prevent voltage spikes when the power to the coil is turned off and the stepper motor acts like a generator briefly (back-emf).

Uln2003

There are integrated circuits (chips) we can use that have all the required components on board. This example uses an ULN2003A chip to drive a unipolar 5,6 or 8 wire stepper motor.

ULN2003A

The ULN2003A is an array of seven NPN Darlington transistors capable of 500mA, 50V output. It features common-cathode flyback diodes for switching inductive loads.

The ULN2003 is known for its high-current, high-voltage capacity. The drivers can be paralleled for even higher current output. Even further, stacking one chip on top of another, both electrically and physically, has been done.

The ULN2003 Stepper Motor Driver Module is small size & ease to use electronic module, it used ULN2003 Chip to amplify the signal from the micro controller, Input voltage max 15v Logic Control Voltage: 3 to 5.5v. This project is an extension to two-phase Unipolar Stepper motor interfacing with AT89C51. In the previous project, transistor switches were used to interface the stepper motor with the microcontroller. Here the transistors have been replaced by using a ULN2003 IC to drive the stepper with 8051 microcontroller. Stepper motor is a variable reluctance DC motor.

Main specifications:

  • 500 mA rated collector current (single output)
  • 50 V output (there is a version that supports 100 V output)
  • Includes output flyback diodes
  • Inputs compatible with TTL and 5V CMOS logic

Hardware Required

  • Arduino board
  • Arduino ULN2003A based stepper driver board
  • 5, 6 (or 8) wire stepper motor (i.e. “28BYJ-48”)

28BYJ-48 unipolar stepper motor

The 28YBJ-48 stepper motor operates on 5Vdc and has built-in reduction gears. It has good torque for its size, but has relatively slow motion. It is ideal for use with Arduino boards as the stepper motor can be powered from the Arduino and the connector fits straight into ULN2003A driver boards.

28BYJ-48 specifications

  • 4 Phase 5 Wire.
  • Voltage : 5V DC
  • Current : 160 mA per winding (320 mA in 4-step mode) Measured: 250mA stopped, 200 mA running fast.
    If powered directly from an Arduino output pin, the current provided will be far less.
  • Resistance : 30 Ω per coil winding from Red wire to any coil.
  • Step Angle 8-Step sequence (Internal Motor without reduction gears): 5.625° (64 steps per revolution)
  • Step Angle 4-Step sequence (Internal Motor without reduction gears): 11.25° (32 steps per revolution)
  • Gear Reduction ratio: 1 / 64:
    • 64*64 = 4096 steps per output shaft revolution in 8-step sequence.
    • 32*64 = 2048 steps per output shaft revolution in 4-step sequence.
    • Note: The Arduino “Stepper Library” runs in 4-step mode
  • No-Load Pull-Out Frequency : 800pps
  • No-Load Pull-In Frequency : 500pps
  • Pull-In Torque : ≥ 78.4mN.m
  • Wiring Instruction : A (Blue), B (Pink), C (Yellow), D (Orange), E (Red, Mid-Point)
  • Weight : 30g

Wiring diagram for this model unipolar 5 wire stepper motor:

Dc Motor Driver Circuit Using Uln2003
  • Coil 1 = Blue / Pink wire
  • Coil 2 = Yellow / Orange wire
  • Red = Common (center tap)

ULN2003A driver boards

These are the two most common ULN2003A driver boards. You can use these boards to drive DC motors or unipolar stepper motors.

Uln2003 Stepper Driver

The advantage of the below board is that all 7 inputs (IN1..7) and all 7 outputs (A..G) of the ULN2003A are accessible.

Circuit

The 28BYJ-48 stepper motor plugs straight into the connector.

If you use a different stepper motor requiring an external power source you may need to wire differently like in the picture below. If the stepper motor vibrates instead of rotates, you may need to change the wiring sequence.

Code

Example 1

Example 2

Connect a >10k Ohm potentiometer between +5V and GND with the slider connected to pin A0. This will be used to change the speed of the stepper motor.

Example 3

Using the Arduino stepper library.

4 Step Sequence: AB-BC-CD-DA
This is what the Arduino STEPPER Library uses.

The 8-step sequence uses only 1 coil on, then 2, then 1… etc.
8 Step Sequence: A – AB – B – BC – C – CD – D – DA – A

Dc Motor Driver Circuit Using Uln2003 Usb

DRIVER
LED
LETTER
MOTOR WIREMOTOR WIRE COLORstepstepstepstepstepstepstepstep
4-STEPSEQUENCE1234
8-STEPSEQUENCE12345678
5red++++++++
D4orange00000111
C3yellow00011100
B2pink01110000
A1blue11000001

Example 4

Uln2003

Uln2003 Driver Board Datasheet

Using the AccelStepper library we can accelerate and decelerate stepper motors.