L293D motor control shield

Similar documents
Arduino Motor Shield (L298) Manual

Arduino Lesson 16. Stepper Motors

Pololu DRV8835 Dual Motor Driver Shield for Arduino

revolution Contents: Introduction Power 28-pin Project Board with input/output cables

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

Arduino Lesson 13. DC Motors. Created by Simon Monk

1 of 5 12/31/ :51 AM

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

PolyBot Board. User's Guide V1.11 9/20/08

Talon and Talon SR User Manual

Basic Pulse Width Modulation

Modern Robotics, Inc Core Device Discovery Utility. Modern Robotics Inc, 2015

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

XS-3525/8S-3. Preliminary DataSheet Version 2.02

SYSTEM 4C. C R H Electronics Design

RB-See-211. Seeedstudio Grove 6-15V, 2A Dual I2C Motor Driver. Grove - I2C Motor Driver. Introduction

ARDUINO SEVERINO SERIAL SINGLE SIDED VERSION 3 S3v3 (REVISION 2) USER MANUAL

CAUTION! THE 7I29 USES VOLTAGE AND POWER LEVELS THAT REPRESENT A HAZARD TO LIFE AND LIMB.

Table 1 Comparison of DC, Uni-Polar and Bi-polar Stepper Motors

DMX-K-DRV. Integrated Step Motor Driver + (Basic Controller) Manual

Analog Servo Drive 25A8

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

Arduino Lesson 1. Blink

SYSTEM 45. C R H Electronics Design

Arduino Lesson 14. Servo Motors

Selecting and Implementing H-Bridges in DC Motor Control. Daniel Phan A

Electronic Brick of Current Sensor

The $25 Son of a cheap timer This is not suitable for a beginner. You must have soldering skills in order to build this kit.

Bob Rathbone Computer Consultancy

DC Motor Driver 24V 20A [RKI-1340]

Arduino Shield Manual

Whale 3. User Manual and Installation Guide. DC Servo drive. Contents. 1. Safety, policy and warranty Safety notes Policy Warranty.

L297 STEPPER MOTOR CONTROLLERS

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

MANUAL FOR RX700 LR and NR

Arduino DUE + DAC MCP4922 (SPI)

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

SUBJECT: How to wire a motor starter Number: AN-MC-004 Date Issued: 2/08/2005 Revision: Original

Basic DC Motor Circuits. Living with the Lab Gerald Recktenwald Portland State University

H-Bridge Motor Control

Basic DC Motor Circuits

MIDECO 64-outputs MIDI note decoder USER MANUAL. Roman Sowa 2012

MOTION COORDINATOR MC206X Quick Connection Guide

ETEC Digital Controls PIC Lab 10 Pulse Width Modulation

Drive circuit basics + V. τ e. Industrial Circuits Application Note. Winding resistance and inductance

.OPERATING SUPPLY VOLTAGE UP TO 46 V

Lecture 7: Programming for the Arduino

GLOLAB Two Wire Stepper Motor Positioner

DATASHEET. ADAM Arduino Display Adaptor Module. Arduino Compatible Shield P/N: 4Display-Shield-FT843 For the 4D Systems 4DLCD-FT843 Display

Arduino Lesson 4. Eight LEDs and a Shift Register

CHAPTER 11: Flip Flops

DISCONTINUED PRODUCT. For Reference Only. Use A3959 for new design FULL-BRIDGE PWM MOTOR DRIVER A3952SB

GM862 Arduino Shield

Four/Five Axis TB6560 CNC Driver Users Manual

Electronic Rotary Table Divider V2.1 Construction

WORKING WITH STEPPER MOTORS

Arduino Shield Manual

7 OUT1 8 OUT2 9 OUT3 10 OUT4 11 OUT5 12 OUT6 13 OUT7 14 OUT8 15 OUT9 16 OUT10 17 OUT11 18 OUT12 19 OUT13 20 OUT14 21 OUT15 22 OUT16 OUT17 23 OUT18

Your Multimeter. The Arduino Uno 10/1/2012. Using Your Arduino, Breadboard and Multimeter. EAS 199A Fall Work in teams of two!

Discontinued Product For Reference Only

Servo Info and Centering

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

Special Lecture. Basic Stamp 2 Programming. (Presented on popular demand)

The self-starting solar-powered Stirling engine

Easy Step 1000 Stepper Driver Module

Three Axis TB6560 CNC Driver Users Manual

Stepper motor I/O. Application Note DK Motion Control. A General information on stepper motors

DUAL FULL-BRIDGE PWM MOTOR DRIVER

Yun Shield Quick Start Guide VERSION: 1.0 Version Description Date 1.0 Release 2014-Jul-08 Yun Shield Quick Start Guide 1 / 14

RC Camera Control. User Guide v /20/2012

Rectifier filter stage post filtering sense

A Practical Guide to Free Energy Devices

Green House Monitoring and Controlling Using Android Mobile Application

BUILDING INSTRUCTIONS

Three Arduino Challenges to Connect the Logical World with the Physical One. ISTE Philadelphia

UIM2901-5A MACH3 breakout board

Advanced LED Controller (LED Chaser)

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence :

How To Control A Car With A Thermostat

Snap-It. This is an accessory (switch machine) decoder

Micro-Step Driving for Stepper Motors: A Case Study

Electric Landing Gear controllers and sequencer LGC12 / LGC 13C

Android Controlled Based Interface

Electrical Engineering Department College of Engineering California State University, Long Beach Long Beach, California, 90840

MC433 Stepper Motor Controller

Pmod peripheral modules are powered by the host via the interface s power and ground pins.

Technical Note Series

B Robo Claw 2 Channel 5A Motor Controller Data Sheet

Microcontroller Programming Beginning with Arduino. Charlie Mooney

Work with Arduino Hardware

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / 22.

1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows:

[F/T] [5] [KHz] [AMP] [3] [V] 4 ) To set DC offset to -2.5V press the following keys [OFS] [+/-] [2] [.] [5] [V]

Electronic Control Devices The European Product Catalogue 2007

New XUY roller sensors

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

DS1307 Real Time Clock Breakout Board Kit

IAdea GPIO Extender Application Note

Mobile Device Power Monitor Battery Connection Quick Start Guide

Transcription:

L293D motor control shield L293D is a monolithic integrated, high voltage, high current, 4-channel driver. Basically this means using this chip you can drive DC motors with power supplier up to 36 Volts, and the chip can supply a maximum current of 600mA per channel. L293D chip is also known as a type of H-Bridge. The H-Bridge is typically an electrical circuit that enables a voltage to be applied across a load in either direction to an output, e.g. motor. Features: 2 connections for 5V 'hobby' servos connected to the Arduino's high-resolution dedicated timer - no jitter! Up to 4 bi-directional DC motors with individual 8-bit speed selection (so, about 0.5% resolution) Up to 2 stepper motors (unipolar or bipolar) with single coil, double coil, interleaved or micro-stepping. 4 H-Bridges: L293D chipset provides 0.6A per bridge (1.2A peak) with thermal shutdown protection, 4.5V to12v Pull down resistors keep motors disabled during power-up Big terminal block connectors to easily hook up wires (10-22AWG) and power Arduino reset button brought up top 2-pin terminal block to connect external power, for separate logic/motor supplies Tested compatible with Mega, UNO& Duemilanove Dimensions: 69mm x 53mm x 14.3mm (2.7in x 2.1in x 0.6in)

Operation: Arduino controller: 1pcs L293D: 1pcs DC motor: 4 pcs Power supplier 9V: 1pcs Please connect the devices according to the following drawing: Drawing

Program source code is as follows: #include <Servo.h> #define MOTORLATCH 12 #define MOTORCLK 4 #define MOTORENABLE 7 #define MOTORDATA 8 #define MOTOR1_A 2 #define MOTOR1_B 3 #define MOTOR2_A 1 #define MOTOR2_B 4 #define MOTOR3_A 5 #define MOTOR3_B 7 #define MOTOR4_A 0 #define MOTOR4_B 6 #define MOTOR1_PWM 11 #define MOTOR2_PWM 3 #define MOTOR3_PWM 6 #define MOTOR4_PWM 5 #define SERVO1_PWM 10 #define SERVO2_PWM 9 #define FORWARD 1 #define BACKWARD 2 #define BRAKE 3 #define RELEASE 4 Servo servo_1; Servo servo_2; void setup() Serial.begin(9600); Serial.println("Simple Adafruit Motor Shield sketch"); servo_1.attach(servo1_pwm); servo_2.attach(servo2_pwm); void loop() motor(1, FORWARD, 255); motor(2, FORWARD, 255); motor(3, FORWARD, 255); motor(4, FORWARD, 255); delay(2000); // Be friendly to the motor: stop it before reverse. motor(1, RELEASE, 0); motor(2, RELEASE, 0);

motor(3, RELEASE, 0); motor(4, RELEASE, 0); delay(100); motor(1, BACKWARD, 128); motor(2, BACKWARD, 128); motor(3, BACKWARD, 128); motor(4, BACKWARD, 128); delay(2000); motor(1, RELEASE, 0); motor(2, RELEASE, 0); motor(3, RELEASE, 0); motor(4, RELEASE, 0); delay(100); void motor(int nmotor, int command, int speed) int motora, motorb; if (nmotor >= 1 && nmotor <= 4) switch (nmotor) case 1: motora = MOTOR1_A; motorb = MOTOR1_B; case 2: motora = MOTOR2_A; motorb = MOTOR2_B; case 3: motora = MOTOR3_A; motorb = MOTOR3_B; case 4: motora = MOTOR4_A; motorb = MOTOR4_B; default: switch (command) case FORWARD: motor_output (motora, HIGH, speed);

motor_output (motorb, LOW, -1); // -1: no PWM set case BACKWARD: motor_output (motora, LOW, speed); motor_output (motorb, HIGH, -1); // -1: no PWM set case BRAKE: motor_output (motora, LOW, 255); // 255: fully on. motor_output (motorb, LOW, -1); // -1: no PWM set case RELEASE: motor_output (motora, LOW, 0); // 0: output floating. motor_output (motorb, LOW, -1); // -1: no PWM set default: void motor_output (int output, int high_low, int speed) int motorpwm; switch (output) case MOTOR1_A: case MOTOR1_B: motorpwm = MOTOR1_PWM; case MOTOR2_A: case MOTOR2_B: motorpwm = MOTOR2_PWM; case MOTOR3_A: case MOTOR3_B: motorpwm = MOTOR3_PWM; case MOTOR4_A: case MOTOR4_B: motorpwm = MOTOR4_PWM; default: speed = -3333;

if (speed!= -3333) shiftwrite(output, high_low); // set PWM only if it is valid if (speed >= 0 && speed <= 255) analogwrite(motorpwm, speed); void shiftwrite(int output, int high_low) static int latch_copy; static int shift_register_initialized = false; // Do the initialization on the fly, // at the first time it is used. if (!shift_register_initialized) // Set pins for shift register to output pinmode(motorlatch, OUTPUT); pinmode(motorenable, OUTPUT); pinmode(motordata, OUTPUT); pinmode(motorclk, OUTPUT); // Set pins for shift register to default value (low); digitalwrite(motordata, LOW); digitalwrite(motorlatch, LOW); digitalwrite(motorclk, LOW); // Enable the shift register, set Enable pin Low. digitalwrite(motorenable, LOW); // start with all outputs (of the shift register) low latch_copy = 0; shift_register_initialized = true; // The defines HIGH and LOW are 1 and 0. // So this is valid. bitwrite(latch_copy, output, high_low); shiftout(motordata, MOTORCLK, MSBFIRST, latch_copy); delaymicroseconds(5); // For safety, not really needed. digitalwrite(motorlatch, HIGH); delaymicroseconds(5); // For safety, not really needed. digitalwrite(motorlatch, LOW);