Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
LinkBack Thread Tools Display Modes
Old 1st May 2007, 02:31 AM   (permalink)
Question PIC to ULN2803 to Stepper Motor Interface

Hi,
I connected a PIC16F84 to a ULN2803 5volt driver to a 5volt 6-wire stepper motor. The motor was running for about 20 seconds, then stopped and it will not start again. Even if I turn off power and turn it back on.
Here is my code to control / pulse the stepper motor.
Attached is my schematic. Any idea why it would quit and then not work again?
Jen


start

movlw 0x00
tris PORTA

loop
movlw b'00000101'
movwf PORTA
call DELAY_20
movlw b'00001001'
movwf PORTA
call DELAY_20
movlw b'00001010'
movwf PORTA
call DELAY_20
movlw b'00000110'
movwf PORTA
call DELAY_20
goto loop
Attached Images
File Type: jpg stepper.JPG (35.4 KB, 49 views)
jenny1985 is offline  
Old 1st May 2007, 03:28 AM   (permalink)
Default

The ULN2803 continuous collector current is 500ma - so you most likely didnt burn the transistors out..

The code looks fine, although im do not know which digital sequence is used to drive unipolar stepper.

Although I highly doubt it - could the stepper be out of range of the magnets (though i didnt even think this is possible)

If it made a full rotation then the above problem should not be consider^

I wish I could give some better insight.. im sure a more expierenced member will post soon.

Goodluck
__________________
"Stick around" - Arnold Schwarzenegger in The Predator after impaling a soldier to a wood post

9vDC Guitar Pedal PSU

PIC16F84a Game Module
Peter_wadley is offline  
Old 1st May 2007, 03:30 AM   (permalink)
Default

Forgot to mention to try with the other 4 transistors of the ULN array.. if they motor moves like normal immediately turn the power off so you dont kill the transistors..!

Then use power transistors or MOSFETS.
__________________
"Stick around" - Arnold Schwarzenegger in The Predator after impaling a soldier to a wood post

9vDC Guitar Pedal PSU

PIC16F84a Game Module
Peter_wadley is offline  
Old 1st May 2007, 03:43 AM   (permalink)
Default

You don't have current limiting resistors at the input to the ULN. The PIC can output 20mA minimum, the max is not specified. Perhaps the base-emitter junction is fried, use your diode checker to see if the ULN input still looks like a diode.
__________________
see my website: www.geocities.com/russlk
Russlk is offline  
Old 1st May 2007, 05:12 AM   (permalink)
Default

Quote:
You don't have current limiting resistors at the input to the ULN. The PIC can output 20mA minimum, the max is not specified. Perhaps the base-emitter junction is fried, use your diode checker to see if the ULN input still looks like a diode.
the ULN2803A has a 2.7kW input resistor for 5V TTL and CMOS.
__________________
"Stick around" - Arnold Schwarzenegger in The Predator after impaling a soldier to a wood post

9vDC Guitar Pedal PSU

PIC16F84a Game Module
Peter_wadley is offline  
Old 1st May 2007, 08:10 AM   (permalink)
Default

You don't have the ULN2803 grounded In your schematic.

Have a look at this.
http://www.voti.nl/stepbots/
Stepbots

Hope this helps.
House0Fwax is offline  
Old 1st May 2007, 01:42 PM   (permalink)
Lightbulb

Sorry... Actually, yes I do have it grounded. I just neglected to put in the gnds on the schematic to speed things up for posting the picture. Yes, it was very weird, it worked for a while then stopped, I reprogrammed the PIC with some updated code and tried it again and it worked for about 20-30 seconds then stopped and didn't go again.
Any other ideas?
Jen

Last edited by jenny1985; 1st May 2007 at 03:22 PM.
jenny1985 is offline  
Old 1st May 2007, 04:02 PM   (permalink)
Default

Quote:
Originally Posted by jenny1985
Any other ideas?
Try monitoring the outputs of the pic with LEDs ( with series resistors ) and see what happens.

What are you using to power the circuit ?
House0Fwax is offline  
Old 1st May 2007, 08:30 PM   (permalink)
Default

try using a simpler step sequence like this:

1000, 0100, 0010, 0001

also make sure your leads are in the correct order ... you may also want to slow down the pace of your steps a little, try increasing the delay between each step.
__________________
If you don't have a planet, what good are gold bars?

want to contact me directly? gmail gordonthree
check out my project website: http://projects.dimension-x.net
Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
justDIY is offline  
Old 1st May 2007, 10:02 PM   (permalink)
Default

Yeah, if your steps start to fast, its not going anywhere.. been there before
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline  
Old 2nd May 2007, 12:33 AM   (permalink)
Default

Is MCLR tied high? A floating pin will cause that problem.
__________________
see my website: www.geocities.com/russlk
Russlk is offline  
Old 2nd May 2007, 01:09 AM   (permalink)
Default

Quote:
Originally Posted by Russlk
Is MCLR tied high? A floating pin will cause that problem.
That could definately be the problem right there.
__________________
"Stick around" - Arnold Schwarzenegger in The Predator after impaling a soldier to a wood post

9vDC Guitar Pedal PSU

PIC16F84a Game Module
Peter_wadley is offline  
Old 4th May 2007, 12:45 AM   (permalink)
Smile

Got it!
MCLR needed to be tied high via 100 ohm resistor... and I had to lower my delay - it was a little too quick.

Thanks for all the help guys! You have proved to be a valuable resource!
jenny1985 is offline  
Old 4th May 2007, 03:59 AM   (permalink)
Default

Quote:
Originally Posted by jenny1985
Got it!
MCLR needed to be tied high via 100 ohm resistor... and I had to lower my delay - it was a little too quick.

Thanks for all the help guys! You have proved to be a valuable resource!
Glad to hear!!
__________________
"Stick around" - Arnold Schwarzenegger in The Predator after impaling a soldier to a wood post

9vDC Guitar Pedal PSU

PIC16F84a Game Module
Peter_wadley is offline  
Old 4th May 2007, 05:30 AM   (permalink)
Default

Quote:
Originally Posted by jenny1985
Got it!
MCLR needed to be tied high via 100 ohm resistor... and I had to lower my delay - it was a little too quick.

Thanks for all the help guys! You have proved to be a valuable resource!
woot, nice work
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
ULTRA clean 9VDC Power Supply Project Peter_wadley Electronic Projects 48 17th December 2008 09:49 PM
ULN2803 Stepper Motor Circuit Help godatguitar Micro Controllers 17 1st December 2008 09:20 PM
Newcomers, please read! (PIC regarded) Upd. 0xD Jay.slovak Micro Controllers 0 17th April 2005 02:05 PM
Stepper code for PIC raitl Micro Controllers 6 15th February 2005 02:45 PM
stepper motor jim bro Electronic Projects Design/Ideas/Reviews 0 26th May 2003 09:54 PM



All times are GMT. The time now is 07:06 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker