I've been trying to get this working for a day or two now :'(, mostly want to explore steppers and general control in a quest for knowledge on a potential bigger project. I have a little background in discrete electronics, this is really my first venture into ICs, and I have done a fair amount of programming in Basic (TI Calculators) and some C++ but that was a while ago. Here's my issue...
I'm trying to use an MC3479 stepper controller to control a small stepper, which as far as I can tell may be a little too much voltage for the motor, but otherwise meets the requirements. I've setup Figure 12 (See next post) following the calculations for pin 6 as best I understood them. I have pins 6,7,8,9,10,11 of the MC3479 connected to digital pins on the Arduino with the following code:
int set = 8; //Bias and set pin
int clock = 10; //Clock pin
int OIC = 9; //no idea
int Full = 2; //half or full step
int cwccw = 3; //direction
int Phase = 4; //location?
int ledPin = 13; //used for testing
void setup () {
pinMode(set, OUTPUT); //set pin types
pinMode(clock, OUTPUT);
pinMode(OIC, OUTPUT);
pinMode(Full, OUTPUT);
pinMode(cwccw, OUTPUT);
pinMode(Phase, INPUT);
digitalWrite(set, LOW); //set low voltage on the bias pin
delay(10);
digitalWrite(set, HIGH); //set high voltage to initiate "set" command
delay(10);
digitalWrite(set, LOW); //return to low for normal operation
digitalWrite(Full, LOW); //Full step not half
digitalWrite(cwccw, HIGH); //Rotate counterclockwise
digitalWrite(clock, HIGH); //step pin
}
void loop()
{
digitalWrite(clock, LOW); //switch voltage to low on clock pin
delay(100);
digitalWrite(clock, HIGH); //switch voltage to high on clock pin
delay(100);
}
In this current configuration, I can hit the reset button with on the arduino and the motor will make a single step in the direction following my "cwccw" setting or make half steps per the "Full" setting then return to the starting point and not move after that. This happens about 1 second after pressing reset, so I don't think it is caused by the reset itself.
I've tried changing delays, "set" voltage starting at high and changing to low only, 2 different motors (both do the same thing), and countless variations of polarity (however given the successful twitch control I have, I'm fairly positive that is correct), and I've verified that the two poles of the motor are properly connected to their own output pairs per the schematic. I have one coil connecting to pins 2 and 3 and the other connecting to pins 14 and 15. Currently the Arduino gets it's power via USB on my computer, and the circuit has an external 7.5V source.
Per another post, I attempted connecting ground from Arduino to ground on the circuit but just made the motor make a high pitch noise without twitching at reset. If I can just get this motor to spin on direction while being controlled from the arduino I'll be happy. I've found others using this MC3479 chip with a Pic, but I was overwhelmed with their code as it was doing other things additionally. Should this code work, or have I wired something incorrectly?
Thanks in advance for any help I can get, my friend said I would never be able to get it to work and I wanna prove him wrong! ;D
Edit-
Here are the datasheets:
onsemi Product Portfolio (figure 12 is on page 10)
http://www.portescap.com/product-113-15M020.html