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.
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.
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.
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.
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).
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.
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.
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.