Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 54
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
All today's birthdays', congrats!
Capper (60)
cereus (73)
Mcanderson (43)


Next birthdays
11/06 dan (37)
11/06 rchydro (64)
11/06 CapRack (30)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: General Science and Electronics
« Previous topic | Next topic »   

PIC16F628+ULN2003A+unipolar stepper motor with a 400 ohm winding.

Move Thread LAN_403
tarakan2
Sat May 28 2011, 01:40AM Print
tarakan2 Registered Member #3859 Joined: Sun May 01 2011, 03:47PM
Location:
Posts: 179
I made a circuit on a breadboard for a project:

A PIC controller with a specific program that does blink the LEDs right, is supposed to step the unipolar stepper motor through a ULN2003A.

So I wired a microcontroller with a 5V supply, connected it to the array and powered the array with the 12V and the connected the motor in sink mode.

The ULN is an inversive array so I wrote my program to hold pins up for the motors windings to be off.

When I connect the stepper motor, the indicator LED, connected to one of the output pins, stops blinking. The motor doesn't turn or it vibrates, depending on the step frequency I program in to my PIC.

What is going wrong with this circuit?
The input resistance of the ULN2003A is 470K or something similar. There can't be an overcurrent. Is it the 12 volts comming into the PIC vs PIC sourcing 5V.

I tried stepping the motor by rubbing a wire with 5V against the pins of the ULN in a sequence and it did move.

Not sure why PIC can't do the same thing. ULN doesn't want to work with 5V.

Thank you.
V.T.


Back to top
Electroholic
Sat May 28 2011, 02:10AM
Electroholic Registered Member #191 Joined: Fri Feb 17 2006, 02:01AM
Location: Esbjerg Denmark
Posts: 720
you have probably exceeded the maximum step rate of your stepper motor. Try running it at half your current step rate. also, try having a 5-10step ramp up stage. if you just pulse a stationary rotor at full speed without ramp up, sometimes it will just slip.

to get fast response and rpm, real stepper drivers feed the motor with PWM at some 10s of volts, not 12V square waves.
Back to top
Conundrum
Sat May 28 2011, 04:55PM
Conundrum Registered Member #96 Joined: Thu Feb 09 2006, 05:37PM
Location: CI, Earth
Posts: 4061
Heh, never knew that.

I suppose that even a stepper motor is subject to torque and inertia, which explains why a lot of printers start moving paper slowly at first.

-A
Back to top
tarakan2
Sun May 29 2011, 05:22AM
tarakan2 Registered Member #3859 Joined: Sun May 01 2011, 03:47PM
Location:
Posts: 179
in the era of parallel ports, the steppers were stepped with square waves

Why an LED connected to the same pin of the microcontroller as the input for the array stops blinking as I connect the stepper to the output pins of the array?

The stepper may be skipping. But I changed the program so it steps really slowly.

I think the problem is in how the pic sinks/sources the ULN2003A. Not sure, where.
Back to top
Wolfram
Sun May 29 2011, 01:16PM
Wolfram Registered Member #33 Joined: Sat Feb 04 2006, 01:31PM
Location: Norway
Posts: 971
The ULN is inverting logically, but since the stepper is wired with positive common, you need to pull the ULN inputs high to power the respective stepper winding. Only one ULN input should be high at a time, in other words (unless you're doing microstepping).
Back to top
Steve Conner
Sun May 29 2011, 01:21PM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
The inductive kick from the stepper windings on turn-off may be crashing your PIC. Do you have some sort of snubber network to absorb it? I don't know what is usually used for this, but there must be something.
Back to top
Dr. Slack
Sun May 29 2011, 09:41PM
Dr. Slack Registered Member #72 Joined: Thu Feb 09 2006, 08:29AM
Location: UK St. Albans
Posts: 1659
Do you have some sort of snubber network to absorb it? I don't know what is usually used for this, but there must be something.

The ULN device has a diode from each output, all paralleled to to a clamp pin, for diverting inductive kickback. IIRC, the darlington outputs are rated to 55v, so the clamp rail can go to anything below this. A sufficnetly large electrolytic and a 50v zener in parallel to ground for instance. With its input resistors, inductive clamps, and assuming the PIC and load share ground only, with sensible avoidance of ground loops (!!), the ULN device makes quite a good interface between sensitive stuff and coils.
Back to top
tarakan2
Mon Jun 06 2011, 02:10PM
tarakan2 Registered Member #3859 Joined: Sun May 01 2011, 03:47PM
Location:
Posts: 179
Now I got it to work fine. Thanks for all the help.
Back to top

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.