Stepper Motor Controller Driver Board

To control one or two DC motors is quite easy with the L298N H-bridge module. First connect each motor to the A and B connections on the L298N module.

Peter Norberg Consulting, Inc. StepperBoard Products. (step rates are board model and firmware dependent: Currently, the six axis BC6D20, BC6D25 and SD6DX controllers are by far our 'fastest' products). AR-BC2D20ERS232 series RS232 Dual 0.15 to 2 Amp Current Regulating Stepper Motor Controller. May 5, 2014 - Stepper motors require a stepper controller to energize the phases in a. These boards feature constant-current 'chopper' drivers that can be.

If you’re using two motors for a robot (etc) ensure that the polarity of the motors is the same on both inputs. Otherwise you may need to swap them over when you set both motors to forward and one goes backwards!

Next, connect your power supply – the positive to pin 4 on the module and negative/GND to pin 5. If you supply is up to 12V you can leave in the 12V jumper (point 3 in the image above) and 5V will be available from pin 6 on the module.

This can be fed to your Arduino’s 5V pin to power it from the motors’ power supply. Don’t forget to connect Arduino GND to pin 5 on the module as well to complete the circuit. Now you will need six digital output pins on your Arduino, two of which need to be PWM (pulse-width modulation) pins.

PWM pins are denoted by the tilde (“~”) next to the pin number, for example in the image of the Arduino Uno's digital pins.

Stepper Motor Speed Pulse Controller And Driver Board

Finally, connect the Arduino digital output pins to the driver module. In our example we have two DC motors, so digital pins D9, D8, D7 and D6 will be connected to pins IN1, IN2, IN3 and IN4 respectively. Then connect D10 to module pin 7 (remove the jumper first) and D5 to module pin 12 (again, remove the jumper).

The motor direction is controlled by sending a HIGH or LOW signal to the drive for each motor (or channel). For example for motor one, a HIGH to IN1 and a LOW to IN2 will cause it to turn in one direction, and a LOW and HIGH will cause it to turn in the other direction.

However the motors will not turn until a HIGH is set to the enable pin (7 for motor one, 12 for motor two). And they can be turned off with a LOW to the same pin(s). However if you need to control the speed of the motors, the PWM signal from the digital pin connected to the enable pin can take care of it.

Stepper

This is what we’ve done with the DC motor demonstration sketch. Two DC motors and an Arduino Uno are connected as described above, along with an external power supply. Then enter and upload the following sketch:

So what’s happening in that sketch? In the function demoOne() we turn the motors on and run them at a PWM value of 200. This is not a speed value, instead power is applied for 200/255 of an amount of time at once.


Then after a moment the motors operate in the reverse direction (see how we changed the HIGHs and LOWs in thedigitalWrite() functions?). To get an idea of the range of speed possible of your hardware, we run through the entire PWM range in the function demoTwo() which turns the motors on and them runs through PWM values zero to 255 and back to zero with the two for loops.

Finally this is demonstrated in the video on this page – using our well-worn tank chassis with two DC motors.

Stepper Motor Controller Driver Board Manual

This is a follow up to the Easy to Build Desk Top 3 Axis CNC Milling Machine Once you get the machine all put together its time to make it go.
So it's time to drive the motors. And here I've put together a circuit that I think is the absolute cheapest and easiest way to control stepper motors with step and direction signals. It works with many of the free or low cost softwares that produce step and direction signals through the parallel printer port. I'll explain how it works but for those of you who just want to get on with it... The_Next_Step
But I would suggest for those of you who are unfamiliar with circuits to do it on a bread board (see pictures). This way you can easly correct any mistakes and try different things.
This schematic is just to control one motor so for the milling machine you need 3 of these circuits and 3 motors.
From Left to right and top to bottom. I try to draw schematics so that positive voltages are toward the top and ground or negative volge is toward the bottom. Inputs are to the left and outputs to the right. Fist off the voltage that you are going to use to run the motor needs to be stepped down and regulated for the logic chips. I used a 6.2 volt Zener to do this because it's low enought for the logic chips to receive the signals from your printer port and high enough for the outputs to drive many of the standard power FETs, so you may not have to use logic FETs like the schematic shows. So the resistor R1 drops the voltage, the Zener diode regulates it to 6.2 volts and the capacitor C1 filters out any noise from the motor, and this voltage powers the two IC's.
The first IC (CD4516) is called an up/down counter. One signal from the printer port will tell the counter if it will count up or down and the other signal, called step, will increment or decrement the counter by one count. Now were only going to use two outputs from the counter Q1 and Q2. With this binary counting method there are only 4 combinations of output from the counter: 00, 01, 10, and 11. These lines are fed to the A and B inputs of the other IC (CD4028) which decodes these combinations to 4 seprate outputs.
I did a trick here using the C input to work as an Enable input. If the Enable(optional) is connected to the parallel port and the computor tells it to shut off all of the outputs to the FETs will go low(Off). So the four outputs of the decoder drive the FET transistors and the FETs drive the four poles of the motor.
Now everybody wants to know what the light bulb is for. Its not so much whether you use a bulb or a resistor, its that a bulb comes with a socket. You can get these wedge base light bulbs from 1 watt to 20 watts. Start with may be a 4 watt bulb and if you find you need a little more beef you just pull it out and put in a 10 watt bulb. It's really handy. And I found it's good to have some voltage drop there as kind of a ballast for the motor windings. The diodes catch some of the current that comes out of the motor each time the FET transistors turn off. The diode feeds this current back to the supply.
When you get the circuit up and running find a power supply that puts out more voltage than you really need and then change out light bulbs till you get it running smoothly. Some of my stepper motors are 5 or 6 volt and some are 12 volt but it all works out.