MC3479 connections.

Arduino Interface MC3479 Stepper Motor Controller

by Lewis Loflin

Note: the MC3479 is an obsolete part and hard to get. Use Easy Driver to do the same thing. See How to Connect Easy Driver Micro-Stepper Controller to Arduino

The MC3479 is designed to drive a two-phase (bipolar) stepper motor. The circuit (see above) consists of four input sections, a logic decoding/sequencing section, two driver-stages for the motor coils. Here we will look at using the advanced features of the Mc3479 while over coming its limitations. The basic specs are as follows:

On the plus side the inputs can be standard TTL (5-volt logic) or CMOS, while the power supply must be at least 7-volts or the inputs won't operate correctly. Thus it's the power supply requirements that won't allow the use of 5-volt stepper motors. The 350 mA drive coil current is on the low side. That current can be controlled by the resistor Rb from a calculation in the spec sheet. The logic control circuits in the IC are powerful and work very well. The part is getting hard to find.

My goal here is to overcome these problems while using the power logic features of the Mc3479. By the use of opto-couplers we can get beyond the voltage and current limitations of this component while utilizing its advanced features. This includes operating both unipolar and bipolar stepper motors, which use the same switching codes anyway.

MC3479 universal stepper motor control diagram.
MC3479 universal stepper motor control diagram.

Opto coupler connections MC3479 to unipolar stepper motor

Opto coupler connections Mc3479 to unipolar stepper motor. If being used with a L298 module as shown in video connect each opto-coupler emitter to ground through a 1000 ohm resistor.

MC3479 package and electrical connections.
MC3479 package and electrical connections.

In the program below SW0 SW1 SW7 are simply connected through Arduino to the Mc3479 pins. A clock pulse is produced to whose speed is based on the values of a potentiometer connected to Analog pin 0.

/* Mc3479 Demo */

#define SW0 3 // input sw0
#define SW1 4 // Sw1 input
#define SW7 8 // Sw7 input

#define MC3479_clk 10
// connect to MC3479 pin 7
#define MC3479_HF_step 12
// connect to MC3479 pin 9
#define MC3479_dir 11
// connect to MC3479 pin 10
#define MC3479_enable 9
int temp;

void setup() {
pinMode(SW0, INPUT);
pinMode(SW1, INPUT);
pinMode(SW7, INPUT);

pinMode(MC3479_clk, OUTPUT);
pinMode(MC3479_HF_step, OUTPUT);
pinMode(MC3479_dir, OUTPUT);
pinMode(MC3479_enable, OUTPUT);

digitalWrite(MC3479_clk, LOW);
digitalWrite(MC3479_HF_step, LOW);
digitalWrite(MC3479_dir, LOW);
digitalWrite(MC3479_enable, LOW);


void loop() {

temp = analogRead(0) / 2;
// read switch transfer to output
digitalWrite(MC3479_HF_step, digitalRead(SW0));
digitalWrite(MC3479_dir, digitalRead(SW1));
digitalWrite(MC3479_enable, digitalRead(SW7));
// steps(5000);

void steps(int j) {

for (int i = 0; i < j; i++) {
digitalWrite(MC3479_clk, 1);
digitalWrite(MC3479_clk, 0);
delay(analogRead(0) / 2);
} // end for
} // end steps

void toggle(int pinNum) {

int pinState = digitalRead(pinNum);
pinState = !pinState;
digitalWrite(pinNum, pinState);

Stepper Motors

Serial LCD Display and assorted Sensors

Web site Copyright Lewis Loflin, All rights reserved.
If using this material on another site, please provide a link back to my site.