I didn't know where else to put this post.
It is basically just a circuit that allows users to cheaply convert a two input (Step/Dir) Stepper Driver signal to a 4 input TTL/CMOS compatible signal.
Purpose of the circuit : There are many advantages to being able to use software available on the web and in the AccelStepper Library that generates a Step /Dir signal. The Stepper Library generates the four signals necessary to use the L293 and L298 motor drive modules but the Accelstepper Library does not. Many people would like to use the Accelstepper library with the L293 and L298 but need some way to convert the step/dir signals to the four IN1,IN2,IN3,& IN4 signals used by those modules. Those people only have stepper drivers that accept the INA, INB, INC, IND or IN1,IN2,IN3, IN4 signals. The LM293 and LM298 are just a couple of examples. People who use these motor drivers cannot use any software that generates only the STEP & DIR signals. It's true that there is this circuit on the web but I tried this circuit and it only worked for slow speeds. It locked up at higher speeds. I settled on a solution that uses a cheap RAMPS A4988 Stepstick and a CD4050BE CMOS to TTL converter IC. The RAMPS A4988 requires a 5V VDD and a 12V VMM but will work with a VMM as low as 6.5V. It will not work with a VMM of 5V. The Ramps output is designed to drive a stepper motor directly and of course can be used this way but for this application, it serves only to convert the STEP/DIR signals to the common IN1,1N2,IN3,IN4 signals accepted by the L298. The Ramps A4988 cannot be used by itself to do this because the outputs are not TTL (5V logic), they are +12V signals. The CD405BE is used to convert these to 5V logic TTL compatible signals that can be used to drive the L293 and L298. If you have either of these and do not need a 15 or 20 A stepper driver then you can ignore the right half of the schematic and use only the part up to the outputs from the CD4050BE. If you look at the outputs of the A4988 which are the CD405BE INPUTS, the CD4050BE OUTPUTS are the L293/Ll298 INPUTS which are commonly referred to as IN1,IN2,IN3,IN4.
(SEE BELOW)
Anyone who wants to use this circuit to use either the L293 or L298 with STEP/DIR signals, does not need anything on the schematic beyond the CD4050 OUTPUTS. That part of the schematic is for people who need a stepper driver with more muscle. (15a to 20A , depending on heatsinking and cooling)
CD4050 inputs CD4050 OUTPUTS/L293/L298 INPUTS
OUT 1A ==> IN1
OUT_1B ==> IN2
OUT_2A ==> IN3
OUT_2B ==> IN4
I designed this circuit because I have an H-bridge that can handle up to about 15 or 20A (which the A4988 cannot) but I want to be able to use the Accelstepper Library that generates STEP/DIR signals. The 12V output of the Ramps A4988 provides the four signals needed as inputs for the CD4050BE which is powered from +5V. This chip is designed to convert 12V CMOS logic signals to 5V TTL signals and vice versa. (it can only be configured for one or the other. It cannot do both). The 5V output of the CD4050BE provides the four TTL signals I need for my TC4427 mosfet driver chips or for an L298 or
an L293s used as stepper driver
The power mosfets are :
N-Channel: FQP30N06
P-Channel: FQP27P06
The circuit was tested with the attached Accelstepper Library Example sketch at a speed of 9600 sps
(3 rps @ 16 microsteps) with no problems.
NOTE: Rather than use a block diagram for the RAMPS A4988, I copied the schematic from here
If you have one of the modules shown in the link, you can ignore all the discrete support components
and use only the information you need :
1-VDD (+5v)
2-VMM (+12v)
3-STEP
4-DIR
5- GND
6- ENABLE-BAR ("-BAR" means ACTIVE LOW)
7- RESET-BAR ("-BAR" means ACTIVE LOW)
8- MS1
9 MS2
10 -MS3
11-SLEEP-BAR ("-BAR" means ACTIVE LOW)
12- OUT_1A
13- OUT_1B
14- OUT_2A
15- OUT_2B
one_stepper_example.ino (1014 Bytes)
