PDA

View Full Version : Can I borrow some minds



trust issues
- 7th November 2004, 14:58
A little problem thats been bothering me for a day or so. I am trying to get a PIC (18F252) to control a stepper motor. Theres no way (that I know) that a PIC could provide the current to drive a stepper motor so I've tried to use MOSFETS to interface the two. One problem, a big one problem. The way that stepper motors work is, Only one input at a time is given voltage to move it and the other 3 inputs have to be connected to 0V. I am at a loss as to how to keep the other 3 inputs connected to 0V. I mean when another input is given voltage the other three need to be connected to 0V. I thought I'd try putting pull down resistors to hold all of the stepper motor inputs at 0V-didn't work. I figure some how I need to get a system that creates two possible outputs-a connection to 0V and completly empty connection. Hope someone can follow this. I'll add the a small crappy diagram of what I trying to use at the moment bellow.
Thanks, Trust.
http://img.photobucket.com/albums/v46/trustytrust/CIRCUIT.jpg

Melanie
- 7th November 2004, 17:37
1. There are stepper driver IC's.

2. You use transistors of MOSFETS... but you have to connect each stepper wire between two MOSFETs. One will drive that wire HIGH to V+ and the other drives the wire LOW to 0v.

The clever bit is that ONLY ONE can be switched on at a time. If you happen to switch both on, you'll get a dead-short across your supply, and your PSU or your MOSFETs will complain (usually loudly with accompanying smoke).

trust issues
- 7th November 2004, 17:51
Ah ok, I like the the sound of the stepper driver IC. Can you (or anyone) give me a few specific chip Numbers for me to look at? Also if possible, if I get my hands on a few more mosfets how would I rig up a circuit like you suggested to get one step to set +v, and the other set to supply 0V.
Thanks again, trust

Melanie
- 7th November 2004, 18:55
Go look at ST's L293 and L297, or JRC's NJM3777E3 or... there's heaps... everybody does them... wait long enough and they'll fall out of your morning Corn Flake box. A search on the net with "Stepper Motor Driver IC" produces only fractionally less hits than "Sex".

trust issues
- 7th November 2004, 19:38
lol, Yes there were a lot of search results. Christ those driver IC's are expensive. Think I'm settled on that L293, not sure on the diff between the L293E and the L293D. And dammint, sods law that I just ordered from rapid elec the other day. Trust maplin to not have what I'm after also! Thanks

mslaney
- 4th February 2005, 13:22
Melanie,
What driver/darlington array did you use with your stepper motor program? I just ordered L298s and L6221s to have on hand for other projects as well.
Do I need an H-Bridge to reverse directions or could I just reverse the order in which the coils are energized -
dd,dc,cc,cb,bb,ba,aa?


Thanks,
Mike Slaney

barkerben
- 4th February 2005, 13:55
I'm currently using the UCN5804B

Can cope with up to 1.5A per coil
Unipolar motors
Half or full step mode
Step trigger pin
Direction pin

See:

http://www.alltronics.com/download/5804.pdf

I'm controlling this via a computer, via a PIC, and sing a couple of stepper motors from active robots (UK online shop)

http://www.active-robots.com/products/accessories/stepper.shtml

They seem to work very well...
The IC has all the drive circuits and sequences internal, so nothing else needed (except a few caps)

Cheers,


Ben

Acetronics2
- 4th February 2005, 14:20
Originally posted by Melanie
A search on the net with "Stepper Motor Driver IC" produces only fractionally less hits than "Sex".

Hi, Mel

We all were thinking your quests were about PIC's tricks and Angel's Sex ...

What a surprise !!!

Alain

mslaney
- 4th February 2005, 15:13
Thanks,
I'm a bit confused then. Doesn't the pic act as the sequencing device?

barkerben
- 5th February 2005, 14:57
It can do - it depends how lazy you're feeling. The IC I mentioned above does everything onboard, which means you
can have a simpler PIC code, and can control the motor with a minimum of just one pin. (a couple more if you need to dynamically specify direction and step mode)

However, you can also generate the step sequene in the PIC and use the PIC to drive a drive ircuit. I used the above because it is simple, not too expensive (or wasn't when I bought it), and one less thing to go wrong!

Cheers,


Ben