The L293D is a dedicated module to fit in Arduino UNO R3 Board, and Arduino MEGA, It is actually a motor driver shield that has full featured Arduino Shield can be used to drive 2 to 6 DC motor and 4 wire Stepper motor and it has 2 set of pins to drive a SERVO.
L203D is a monolithic integrated that has a feature to adopt high voltage, high current at four channel motor driver designed to accept load such as relays solenoids, DC Motors and Stepper Motors and switching power transistor. To simplify to use as two bridges on each pair of channels and equipped with an enable input. A separate supply input is provided for the logic, allowing operation at a lower voltage and internal clamp diodes are included.
The device is suitable for use in switching applications at frequencies up to 5kHz. The L293D is assembled in a 16 lead plastic package which has 4 center pins connected together and used for heat sinking. The L293DD is assembled in a 20 lead surface mount which has 8 center pins connected together and used for heat shrinking.
L294D Shield Feature:
• Control up to 4 DC motors.
• Control 2 Servos.
• Logic Control Voltage VSS: 4.5 ~ 5.5 V
• Motor Supply Voltage VSS: 15v
• Drive operating current IO: 1.2A
• 8 Stage Serial Shift Registers
Wiring a Stepper Motor
What is a stepper motor?
A digital electric motor that moves one step at a time and each step is defined by a step angle. The stepper motor moves is distinct steps during its rotation. Each steps is defined by a step angle. In the example below you may notice that there are 4 distinct steps for the rotor to make a complete 360 degree rotation. As defines in step angle at 90 degrees. Since the stepper motor does move in discreet movement, we can say that a stepper motor is actually a digital motor. This characteristic makes it very suitable for digital interfaces integrates with a microcontroller. if you want to learn more about Stepper Motor download the reference below.
In this example we will going to use the 14HM Series 2 Phase Hybrid Stepper Motor
Wiring diagram
Stepper motors are great for (semi-)precise control, perfect for many robot and CNC projects. This motor shield supports up to 2 stepper motors. The library works identically for bi-polar and uni-polar motors
Stepper Motors are perfect for semi-precise control, adaptable to robots and CNC projects. The L293D Arduino shield supports up to 2 stepper motors. The MOTOR library works identically for BI-POLAR and UNI-POLAR Stepper Motor.
For Uni-Polar motors you need to connect up the stepper firstly you need to find out which pins connected coil, and which pins are the center tap in this demonstration we will going to test the 4 wire stepper motor. If its a five wire motor then there will be 1 center tap for both coil. The center taps should both be connected together to the GND terminal on the motor shield output block, the coil 1 should connect to 1 motor port let say M1 or M3 and coil 2 should connect to M2 or M4.
For BI-POLAR motor its just like UNI-POLAR motors except there is not fifth wire to connect to the ground.
check the previous article how to import the MOTOR library
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
/* If your going to turn the 2 motor step one once you need to change the code same below void doublestep (int steps, int direction, int style) { while (steps--) { motor1.step(1, Motor direction, Turn Style); motor2.step(1, MOtor direction, Turn Style); } } */ #include <Motor.h> AF_Stepper motor(48, 2); void setup() { Serial.begin(9600); // Open up the serial communica at 9600 baud rate Serial.println("Stepper Turning Test"); motor.setSpeed(10); // Stepper Motor Step Speeed at 10 motor.step(100, FORWARD, SINGLE); // Motor Step forward single motor.release(); delay(1000); // Delay at 1 second } void loop() { motor.step(100, FORWARD, SINGLE); // Motor turn forward 100 single step motor.step(100, BACKWARD, SINGLE); // Motor turn backward 100 single step motor.step(100, FORWARD, DOUBLE); // Motor turn forward 100 double step motor.step(100, BACKWARD, DOUBLE); // Motor turn backward 100 double step motor.step(100, FORWARD, INTERLEAVE); // Motor Turn forward interleave motor.step(100, BACKWARD, INTERLEAVE); // Motor Turn backward interleave motor.step(100, FORWARD, MICROSTEP); // Motor Turn forward micro step motor.step(100, BACKWARD, MICROSTEP); // Motor Turn backward micro step } |
Download the motor library here | ZIP
Download the L293D datasheet here | PDF
Download the schematic here | PDF
Download the 74HC595 Datasheet here | PDF
Good guidance. Now pls guide me on what power supply do I need to run arduino mega + L293 D for 2D plotter
Will be uploaded soon..