Blueroomelectronics,
I'm new to all this motor stuff. I took basic AC/DC/digital/semiconductor classes in high school (geez that's going on 5 years ago... lol) but we never covered any stepper motors. This entire project has been a learning experience! It was kinda funny, because I programed the outputs to fire in a four wire order, but these particular motors are run off of just two wires per direction! So if you toggle wire 1&2 back and forth, it'll move one direction; toggle wire 3&4 it'll move the opposite. It wasn't hard to chage the code, but little things like that (such as CHECK THE MOTOR YOU'RE TRYING TO MAKE A CONTROLLER FOR BEFORE YOU MAKE IT!!!) I've enjoyed figuring out.
As far as the decoupling caps (or d.c.), I need to pass the 5V to the mosfet to turn it on. I thought a d.c. was only for a DC separation of different parts of a circuit (amplifier stages of an amplifier circuit for example)? So in this case, wouldn't a cap in series between the pic output stop the mosfet from turning on? (I wish I could try this out, but alas, after hours...) What would you recommend for a decoupling cap in this case?
Brevor, kjennejohn,
I initially had a resistor (a 1k as a matter of fact) from the gate to ground. But with this resistor there, I couldn't reliably open the mosfet; the voltage there referenced to ground was not enough to turn the fet 'on'. I'm not sure whether it's because the resistor was loading down the PIC (5V/25ma=200ohms I would think would be the maximum resistor value before loading happens... it didn't occur to me to lessen that resistor down to 200ohms) or what, but I took it out, and it worked fine. Well, until the Motor Controller stopped working... lol I'll give that a try tomorrow and see what happens.
Filter caps: Should they only go on the input and ouput pins of the 5V regulator, or on every output pin on the pics? What should their values be? Maybe this question would be better answered by a link explaining them and I can figure it out myself?
Kjennejohn,
When I first started working with pics, that RESET drove me nuts!!! I've finally figured out how to disable it in my code, and instead use that pin as a general I/0. And yes, the 16F628 has an internal 37KHz oscillator that I haven't found a reason not to use yet. I've only been working with pics for a few months now (this is really my first project I've used them in) so I'm not used to having to supply an external clock frequency.
Much thanks for the help guys! I'm often glad there are people in the world much smarter than I am!