Shop OBEX P1 Docs P2 Docs Learn Events
uln2003 — Parallax Forums

uln2003

RubyRuby Posts: 35
edited 2011-02-11 14:37 in BASIC Stamp
Hi everybody.
I am new in microcontrollers and stepper motors.
Can u tell me how many microcontrollers i need to run 3 step motors at least?
How can i wire them?
Thanx

Comments

  • ercoerco Posts: 20,256
    edited 2011-01-20 17:40
    It all depends on many factors.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-01-20 20:07
    These factors include:

    1) How fast does the stepper have to go in terms of steps per unit time?

    2) Do the steppers have to move at the same time?

    3) Is the stepper unipolar or bipolar and how many coils does it have?

    4) What voltage and current does the stepper need?

    There are stepper controller / driver devices that work well with the Stamp and ximplify the use of steppers. Here's one sold by Parallax. There are many similar devices available. Do a web search.
  • bsnutbsnut Posts: 521
    edited 2011-01-21 01:42
    I don't know why you picked "ULN2003" for a subject, but that is OK. A ULN2003 is a driver chip that is used to drive voltages 12 - 36vdc @ 125mA when all inputs are driven and you can use it to drive a stepper motor. But, this method uses alot of pins from to microcontroller. This will not leave you with many pin for anything else.

    They make a driver chip that controls and drives stepper motors. This chip receives pulses from the microcontroller, that controls speed and the direction of the stepper motor as well. The speed of the pulses from the microcontroller controls the speed of the stepper motor. The goal of using this chip is to save you I/O pins on the controller that you chose.

    To answer your big question, there is a book that covers this application and book is written by John Iovine called "Projects For Pic Microcontrollers" and you also can look on the internet under this name. You also find examples with schematics on the internet as well.

    I hope this points you in right direction and welcome to the forums.
  • davejamesdavejames Posts: 4,047
    edited 2011-01-21 09:02
    ...errrrr - lest anyone get the impression that a ULN2003 is an active driver, please note that it's no more than an array of open collector, darlington-pair transistors - aka, "low side switch". They "sink" only.

    See attached data sheet for details.
  • bsnutbsnut Posts: 521
    edited 2011-01-21 14:13
    Dave,

    I know about this datasheet and thank you posting it for the others. I also know that it sinks (to ground) it's outputs to ground, because I have this chip.
  • davejamesdavejames Posts: 4,047
    edited 2011-01-21 16:20
    ............:smile:
  • RubyRuby Posts: 35
    edited 2011-01-22 13:05
    thnx
    if i am not wrong i have only 8 pins right? ( i am going to use printer's pins. )
    if i want to control 2 motors in the same time what i need , which microcontroller?
    can i control the microcontroller or step motors without computer?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-01-22 13:19
    8 pins? Who knows? You haven't supplied the information about the motors.

    Controlling 2 motors at a time? A Stamp can't do it at high speed. A Propeller could do it. Both the Stamps and the Propeller would need some kind of driver transistors. Depending on the type of stepper motor, a ULN2003 could work. Some stepper motors would require an H-Bridge driver like the L293D.

    Both the Stamps and the Propeller could control the motors without a PC although a PC would be needed for programming. With some additional hardware (not much - an SD card, a PS/2 socket and PS/2 keyboard, an RCA jack and TV, and a few resistors), a Propeller could also be used without a PC for programming, but using a PC is easier.
  • bsnutbsnut Posts: 521
    edited 2011-01-23 02:34
    As, Mike states we need to know the motor information in order to point you in the right direction.
  • RubyRuby Posts: 35
    edited 2011-01-23 21:37
    hi
    i have lots of them from printers. 2,4 and most of them are 5 wires.
  • bsnutbsnut Posts: 521
    edited 2011-01-24 07:43
    What it sound like to me, you have stepper motors that you want to control. Is this correct?

    They are many types of stepper motors out there and here is the common ones.
    1. Bipolar stepper motors have four wires to them.
    2. Unipolar stepper motors have six wires to them.

    The motor with five wires to them my be a unipolar stepper motor.
  • RubyRuby Posts: 35
    edited 2011-02-05 07:18
    Hi everybody.
    I wrote a software in CVI and received uln2003
    I attached 2 videos
    1) First software that i wrote for single-step,half-step and high torque. You can see from leds.
    http://www.youtube.com/watch?v=wgjQedl68g4
    2) I am not sure from the motor but i guess it is bipolar. It has 5 wires ; white wire is +25 and the other 4 wires are -. The thing is i could run it only by using to wires; when i connected the other two wires it runs reverse. So, in the second software i could change the pulse time. I started with one second and than 0.5 , 0.25 and 0.1
    http://www.youtube.com/watch?v=eWTb0EynsDQ

    The problem is motor gets sooooo hot.
    Even after i closed the software.
    Waiting for your responses.....
  • LeonLeon Posts: 7,620
    edited 2011-02-05 12:33
    Schematic?
  • bsnutbsnut Posts: 521
    edited 2011-02-06 00:38
    Ruby,

    I think you have a unipolar stepper motor. This should answer one of the questions.

    Now, the motor is getting hot. This means the motor is drawing too much current. This could be a problem with the bearings on the motor to tight, which the motor is hard to turn.

    I would suggest you, to ohm out the motor with meter. This will tell you what is the ohm of the motor you are using, by using the meter to check the four leads to the positive lead. By doing this you can use Ohm's Laws to find the current of your motor.

    The ULN that you are using can handle 500mA through one output pin when one output is active. When you are activating all the outputs, the ULN can handle 170mA for each of the output pins.
  • RubyRuby Posts: 35
    edited 2011-02-10 06:49
    bsnut wrote: »
    Ruby,

    I think you have a unipolar stepper motor. This should answer one of the questions.

    Now, the motor is getting hot. This means the motor is drawing too much current. This could be a problem with the bearings on the motor to tight, which the motor is hard to turn.

    I would suggest you, to ohm out the motor with meter. This will tell you what is the ohm of the motor you are using, by using the meter to check the four leads to the positive lead. By doing this you can use Ohm's Laws to find the current of your motor.

    The ULN that you are using can handle 500mA through one output pin when one output is active. When you are activating all the outputs, the ULN can handle 170mA for each of the output pins.


    hi
    thank you for your response and sorry for my delay...
    tell me how can i know if i have bipolar or unipolar motor?
    Cause i have a motor with 5 wires ( it has to be unipolar ) but with 3 colors.
    White is +
    Red ( 2 ) is -
    Blue ( 2 ) is -

    I check the resistance between wires to understand which motor is it ; so the answer is bipolar!!!???:innocent:
    I can run the motor only with 2 wires ; one red and one blue.
    When i used the other pair motor simply run opposite!!!
    So what is it?

    And my second question is ; can i use uln2003 for bipolar motor?
    If i am not wrong it has to be like this:
    4 wires ( 2 pairs )
    I can find the pairs simply by checking the resistance between wires. Right?
    Than lets say 1A and 2A are pair with .... resistance and also 1B and 2B are pair.
    There shouldn't be resistance between 1A and 1B right?
    And last with sending pulses like above it has to run even if it is bipolar right?
    1A 1 0 0 0
    2A 0 0 1 0
    1B 0 1 0 0
    2B 0 0 0 1

    Thanx
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-02-11 14:37
    Here's a pic to see the windings, the unipolar is a bipolar with center taps. Use the ohmmeter's "lowest" setting, 200Ω.

    steppers_schema.jpg

    Nevermind the colors, there's no standard there.
Sign In or Register to comment.