Interfacing PIC to logic circuits
Interfacing PIC to logic circuits
(OP)
I am using a PIC18F452 to run program controlling a stepper motor and i need to interface a driver circuit to supply the power needed to move the motor. The program works fine and the logic output from the PIC is good. My problems come at the power stage. I have tried the ULN2804A witch is a hex driver that can operate at 50v max and 500 mA max but i cant get any output from it. Then i tried to use the discret components approch. My goal was to inverts the logic signals from the PIC using a DM74LS04N and use it to controls tansistors but the inverter behavied weerdly (some of the pin had 0.88v, other were at 2.8v, other at 4.1). Could a PIC be unable to drive some type of inverter? I am developping on a breadboard, could the signal from the crystal cause noise on the circuit?





RE: Interfacing PIC to logic circuits
You should be able to use normal NPN type transistors (depends on load) on each output of the PIC to drive the load (with appropriate resistors in the base).
RE: Interfacing PIC to logic circuits
Are you sure that you are working with the right type of stepper for your logic? Unipolar vs bipolar coils?
Inverting the logic? Since you have a PIC you can just invert the outputs from your program.
Too many things that you don't seem to master. It sounds like a school project...
RE: Interfacing PIC to logic circuits
0101
0110
1010
1001
(repeat)
Thanks for the help
RE: Interfacing PIC to logic circuits
Google for ""hook up stepper motors"" and things like it.
There are a huge number of sites that show schematics and explain EVERYthing about these buggers. Here's just one of them from the Embedded Systems Programming an excellant engineering magazine. Note: Figure 8.
http://www.embedded.com/story/OEG20030410S0057
The main thing you need to do is puzzle out what kind of stepper motor you've stumbled across otherwise you will let the smoke out of it and have a lot of frustration.
RE: Interfacing PIC to logic circuits
RE: Interfacing PIC to logic circuits
For a bipolar stepper with the "defunct printer" stepper motor
class, you might wander over to the fine site:
http://www.cs.uiowa.edu/~jones/step/
For a bipolar design, you have to have an H bridge circuit.
By going to that link you can find both a circuit and
more importantly the theroy behind it. For the stepper
that I implemented, I used good old 2N2222's and 2K
resistors. Ran it off 12 Volts and drove the logic with
a 16F648A PIC. Runs just fine.
Fun project.
BTW, I'm not affiliated with the univ. of Iowa, nor
professor Jones. He just has a great site for stepper
motors.
Oh, and noise from the crystal will NOT be a problem
with this.
Hope this helps!
Cheers,
Rich S.
RE: Interfacing PIC to logic circuits
RE: Interfacing PIC to logic circuits