Searching \ for 'PicBasic Pro (or in fact nothing to do with it...)' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/languages.htm?key=basic
Search entire site for: 'PicBasic Pro (or in fact nothing to do with it...)'.

Truncated match.
PICList Thread
'PicBasic Pro (or in fact nothing to do with it...)'
1999\02\03@054538 by paulb

flavicon
face
Harley L. Miller wrote:

> I want to start experimenting in driving stepper motors with a 16f84.
> I have an old stepper from a junk disk drive and understand (roughly)
> how to make it step.  My question is, can it be driven directly from
> the PIC or do I need to go through something like a 4N26 (just got a
> batch from Mouser)?

 Fascinating question.  A 4N26 is an optocoupler, quite unrelated in
any way, shape or form to anything used to drive a stepper motor.

 An optocoupler is a device you use iff (if, and *only* if) you wish to
control one circuit from another and the two circuits use *totally
separate* power supplies which *must not* be connected together.  An
excellent example of this is a modem, where you are required to
*guarantee* that the telephone line can under no circumstances become
connected to the local power mains in any way.

 I trust you will see that this has no relationship with stepper
motors.  The reason I get so excited about this is that I wish to dispel
the notion sometimes obtained from elementary texts that opto-couplers
are some magic means of avoiding interference problems (a common topic
on this list :o).  They *don't*, unless you go to all the trouble of
providing totally isolated power supplies to match *and* do the
essential work to design the whole layout in the first place to avoid
interference.

  We can assume that your interest in driving the stepper from
the PIC is purely for the educational value.  In this case, the answer
is to use common transistors or FETs controlled by the PIC to deliver
current to the stepper.  *I* won't bother to explain how, the FAQs are:

 Using steppers from recycled drives.  Just what you want!:
   http://www.doc.ic.ac.uk/~ih/doc/stepper/
 Connection diagrams:
   www.doc.ic.ac.uk/~ih/doc/stepper/control2/connect.html
 Another source:
   http://www.cs.uiowa.edu/~jones/step/index.html

 Of course transistor arrays like the ULN2003 mentioned by Dave VanHorn
contain the essential "kick-back" diodes and bias resistors and do make
things easy.  But if you wanted things to be easy, you would use the IC
designed for the job.  In fact, if your objective is to *use* a stepper
from a scrapped drive,rather than just play with it, then the important
and terribly clever thing is:  You always use the *whole* drive
electronics (less the turntable motor PCB).

 By doing so, you use the driver IC designed *just for that purpose*,
you have a simplified drive; enable, direction and step; you already
have a bus structure with bus receivers for the direction, step and four
separate enable lines, and it's all ready-built and compact; you even
have the power connector to mate to a standard power supply.  That
*really* makes it easy.
--
 Cheers,
       Paul B.

1999\02\04@162338 by Karl A. Uscroft

picon face
>spam_OUTKUscroftTakeThisOuTspamaol.com wrote:

>> The way we drive stepper motors at work is to take the output from a
>> PIC or other microprocessor and sent it into a 74LS374 then take the
>> output from the latch into a ULN2804.  The 74LS374 is used so that you
>> can shift out the 8 bits to be used (4 bits for one stepper, hence one
>> 74LS374 for two stepper motors + 2 ULN2804) via 2 pins from the PIC.


>OK, now you could use a 74HC164, which is designed as a shift
>register, instead of the 374.  And isn't a ULN2804 an octal buffer?  Why
>do you need two for two steppers?

No a ULN2804 is an Octal Darlington Driver array with an output (max) voltage
of 50V @ 500mA.  By tying two outputs together you get 1 Amp.  This means that
one array has four 50V 1A outputs, which can drive the steppers at work.  Also
in the IC are the common free wheeling diodes so no flyback problems.  By
using one 8 bit register ( ok a 74HC164 would do nicely ) and connecting them
to two ULN arrays you can control two steppers.

But as you say the above has nothing to do with what you were really pointing
out.  Sorry I can't help you on that one.

1999\02\04@172329 by paulb

flavicon
face
Hello Karl.

> No a ULN2804 is an Octal Darlington Driver array with an output (max)
> voltage of 50V @ 500mA.

 I think you mean "*Yes* a ULN2804 is an Octal Darlington Driver array
...

>  By tying two outputs together you get 1 Amp.

 I guessed this is what you were doing.  I had a good look around the
various permutations of these parts on the Web recently.  I think there
are some parts with 1A capability already, though you may run into
problems with total package current draw.

 I presume you are aware of the T-I TPIC6595 which integrates the shift
register and the current driver.  It is only rated 250mA continuous, but
I suspect there's a beefier version somewhere, possibly with 1A
capability.
--
 Cheers,
       Paul B.

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...