[simpits-tech] Stepper Controller V2.1

Ross Hutton simpits-tech@simpits.org
Tue, 19 Feb 2002 10:04:49 +1100 (EST)


 --- Gene Buckle <geneb@deltasoft.com> wrote: > > 
> When you start looking at PDL or FPGA, you begin
> hunting rabbits with
> rocket launchers.  If you use a PIC, you can
> redesign using a few
> parts.  You'd only need the PIC (typically a 16 pin
> DIP) and the ULN
> chip.  A current limiting resistor or two and a
> voltage regulator.  You'd
> talk to this with *two* wires.  Data in and clock.
> 
> You'd write software for the PIC that would move the
> stepper depending on
> what came over the SPI link.  Simple stuff. :)

I tend to agree with Gene about using tiny PIC's (or
AVR's) for this sort of thing, not because programming
GAL's or FPGA's is particularly hard but because
microcontrollers are more flexible. 
The big advantage of programmable logic is speed, but
this sort of speed is not really needed in cockpit
type projects. If you want to delve into programmable
logic for other reasons here's a program for a GAL to
drive a stepper. You just pulse L (left) or R (right)
and the stepper goes left or right. I've used this
program with steppers out of floppy drives. You'll
still need to use a driver chip.


CHIP step2 GAL16V8
; Stepper motor controller for 2phase motor with
double coils
' as shown page 604 Electric Machines, Sarma
 
;Inputs
L=2 ;left
R=3 ;right
 
;Outputs
A=19 
AN=18 
B=17 
BN=16 
 
EQUATIONS
A.D=A*/L*/R + B*/L*R + /B*L*/R
B.D=B*/L*/R + A*/R*L + /A*R*/L
AN=/A
BN=/B                                                 
                         


=====
--
Ross

http://movies.yahoo.com.au - Yahoo! Movies
- Vote for your nominees in our online Oscars pool.