Shop OBEX P1 Docs P2 Docs Learn Events
Newbie with Stepper Motor... — Parallax Forums

Newbie with Stepper Motor...

StinkyStinky Posts: 8
edited 2006-12-22 15:15 in BASIC Stamp
So, heres my story.

I built a robot (object avoiding vehicle) for my engineering class last semester and it worked great.· Simple, BS2, Board of education, 2 stepper motors, and the PING sonar.·

Now I am building another robot with the BS2px and the board of education.· I'm trying to get the stepper motors working and I can't do it.· In my robot last year, we used code that looked much like:

high a
low b
low c
high d

etc.

Now I'm trying the code that is downloadable from parallax's website at http://www.parallax.com/detail.asp?product_id=27964·(I downloaded the one for Basic Stamp example programs) and ran it.· All my motor does is twitch?· This program doesn't use the motor controllers, does it?

All I want my motors to do for this new project is have them go forward and backward at the highest torque, nothing more than that.· Please help me figure it out!

Thankyou, Stinky

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-21 07:38
    You need a high current driver like the ULN2003 and you have to wire the motor as described in the application note on the Parallax website page for the motor. If you didn't buy the motor from Parallax, you'll need to make sure you've got your motor wired up the same as the Parallax product. If the motor's twitching, the windings are probably wired up wrong.
  • StinkyStinky Posts: 8
    edited 2006-12-21 08:08
    I bought the motor from paralax and have the wires set up correctly.· What is the ULN2003 high current driver you speak of?· I don't know what that is?· Would my motor work without that?

    Thanks
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2006-12-21 13:06
    You could do it with passive components but make sure you protect the Basic Stamp with diodes.

    See a DataSheet of the ULN 2003 at this link for a guide.....

    http://www.xdesignlabs.com/chips/uln2003a.pdf
  • BeanBean Posts: 8,129
    edited 2006-12-21 13:19
    Stinky,
    How do you have the stepper motor connected ? Do you have the motor wires directly connected to the stamp pins ?

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1

    "USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
  • StinkyStinky Posts: 8
    edited 2006-12-21 20:15
    Bean,
    No, I do not have the wries from the motor connect directly to the stamp. I have the board of education and I am using the P0-P15 pins to connect my motor.

    Stinky
  • StinkyStinky Posts: 8
    edited 2006-12-21 20:19
    Hey Bean,
    So is the ULN2003 a group of diodes that prevent current from flowing back into my chip?
  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-21 21:03
    Stinky,
    Read this Nuts and Volts article. It explains the whole thing: www.parallax.com/dl/docs/cols/nv/vol1/col/nv6.pdf.
  • StinkyStinky Posts: 8
    edited 2006-12-21 21:41
    Mike,

    Thanks for the help, I think I got it now. I just have to find one of these ULN2003's; can I find one at my local radio shack?
  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-21 21:59
    You could use an NPN transistor the way the article describes. Radio Shack has the transistors, resistors, and diodes (for back EMF protection).
    Parallax has the ULN2003's
  • StinkyStinky Posts: 8
    edited 2006-12-21 22:02
    Mike

    Sweet, thanks a lot
  • RDL2004RDL2004 Posts: 2,554
    edited 2006-12-21 22:07
    I doubt you will find a ULN2003 at Radio Shack, but that Nuts and Volts article also shows how to use regular transistors to switch higher power loads. You can probably find suitable transistors at Radio Shack. You may need some resistors and diodes also.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • StinkyStinky Posts: 8
    edited 2006-12-22 01:21
    I picked up some darlington transistors and some MOSFET transistors, and some various resistors. Would I still be better off getting the ULN2003 from Parallax?

    -Stinky
  • StinkyStinky Posts: 8
    edited 2006-12-22 01:47
    Oh yeah!! Step motor is working perfectly, thanks a lot guys!!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-22 15:15
    Stinky,
    ·
    ·· You could use the ULN2803 if you want a reduced part count and your voltage/current levels are within the ratings, especially if using all 8 outputs.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.