Arduino Shield Manual



Similar documents
Arduino Shield Manual

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

Arduino Motor Shield (L298) Manual

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

H-Bridge Motor Control

DFRobot Romeo All-in-one Microcontroller (ATMega 328) Product code : RB-Dfr-36. Manual. o o. o o o. o 6.2 Example use of Button 1-5. o o o o.

Lab 6 Introduction to Serial and Wireless Communication

Arduino Lesson 16. Stepper Motors

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

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

Arduino Wifi shield And reciever. 5V adapter. Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the shield:

Microcontroller Programming Beginning with Arduino. Charlie Mooney

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

Theory and Practice of Tangible User Interfaces. Thursday Week 2: Digital Input and Output. week. Digital Input and Output. RGB LEDs fade with PWM

Lab Experiment 1: The LPC 2148 Education Board

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

Electronic Brick of Current Sensor

Arduino Lesson 13. DC Motors. Created by Simon Monk

Board also Supports MicroBridge

ROVER. USER GUIDE Rev 2.4. This guide is only available in English. Ce manuel est seulement disponible uniquement en Anglais

EasyC. Programming Tips

Ultrasonic Distance Measurement Module

SYSTEM 45. C R H Electronics Design

SYSTEM 4C. C R H Electronics Design

CHAPTER 11: Flip Flops

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

CAN-Bus Shield Hookup Guide

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

ABB Drives. User s Manual HTL Encoder Interface FEN-31

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

Servo Motors (SensorDAQ only) Evaluation copy. Vernier Digital Control Unit (DCU) LabQuest or LabPro power supply

Home Security System for Automatic Doors

GM862 Arduino Shield

Basic Pulse Width Modulation

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL

Arduino Lesson 5. The Serial Monitor

Work with Arduino Hardware

Surveillance System Using Wireless Sensor Networks

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

Arduino Lesson 14. Servo Motors

Flight Controller. Mini Fun Fly

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

Pololu DRV8835 Dual Motor Driver Shield for Arduino

Electric Landing Gear controllers and sequencer LGC12 / LGC 13C

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

Lecture 7: Programming for the Arduino

IR Communication a learn.sparkfun.com tutorial

MeshBee Open Source ZigBee RF Module CookBook

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

MOTION COORDINATOR MC206X Quick Connection Guide

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

Android Controlled Based Interface

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

Arduino Lesson 1. Blink

KTA-223 Arduino Compatible Relay Controller

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

E-Blocks Easy Internet Bundle

INTRODUCTION TO SERIAL ARM

DEPARTMENT OF ELECTRONICS ENGINEERING

AN2680 Application note

3.2 inch QVGA TFT Color LCD User s Guide Version 1 & 2

Digital I/O: OUTPUT: Basic, Count, Count+, Smart+

MS830 / MS833 Barcode Reader v1.0 9-December-2014

Arduino DUE + DAC MCP4922 (SPI)

Six-servo Robot Arm. DAGU Hi-Tech Electronic Co., LTD Six-servo Robot Arm

Digital and Analog I/O

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

Arduino Internet Connectivity: Maintenance Manual Julian Ryan Draft No. 7 April 24, 2015

Computer Architectures

How To Program A Microcontroller Board (Eb064) With A Psp Microcontroller (B064-74) With An Ios 2.5V (Power) And A Ppt (Power Control) (Power Supply) (

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

Analog Devices Welcomes Hittite Microwave Corporation NO CONTENT ON THE ATTACHED DOCUMENT HAS CHANGED

1.8" TFT Display Breakout and Shield

Bluetooth to Serial Adapter

Adafruit's Raspberry Pi Lesson 9. Controlling a DC Motor

RGB for ZX Spectrum 128, +2, +2A, +3

Arduino project. Arduino board. Serial transmission

Web Site: Forums: forums.parallax.com Sales: Technical:

IRIS Touch 600 Range Dialler Installation Manual. Version 1.3

Points Position Indicator (PPI1) for Points Motors with Common Ground

MANUAL FOR RX700 LR and NR

Follow these steps to prepare the module and evaluation board for testing.

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

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

Setting Up the ZigBee Ethernet Gateway

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

RS232C < - > RS485 CONVERTER S MANUAL. Model: LD15U. Phone: / 97 / 98 (M)

Advanced Data Capture and Control Systems

How To Control A Car With A Thermostat

TCP/IP MODULE CA-ETHR-A INSTALLATION MANUAL

Options for ABB drives, converters and inverters. User s manual FDPI-02 diagnostics and panel interface

TUTORIAL FOR INITIALIZING BLUETOOTH COMMUNICATION BETWEEN ANDROID AND ARDUINO

Programming the Arduino

VirtualWire. Copyright (C) Mike McCauley. 1.0 Introduction. 2.0 Overview

Designing VM2 Application Boards

AN : Using Wago CANOpen IO

ALL-USB-RS422/485. User Manual. USB to Serial Converter RS422/485. ALLNET GmbH Computersysteme Alle Rechte vorbehalten

Hand Gestures Remote Controlled Robotic Arm

UniPi technical documentation REV 1.1

Transcription:

Arduino Shield Manual Version 1.5 www.dfrobot.com Copyright 2010 by DFRobot.com

Table of Contents Table of Contents... 2 Arduino I/O Expansion Shield... 4 Introduction... 4 Diagram... 4 Sample Code... 4 Arduino Motor Shield (L293)... 5 Introduction... 5 Diagram... 5 Pin Allocation... 6 Sample Code... 6 Arduino Motor Shield (L298N)... 8 Introduction... 8 Diagram... 8 Pin Allocation... 11 Sample Code... 11 Arduino LCD&KeyPad Shield... 13 Introduction... 13 Diagram... 13 Pin Allocation... 14 Sample Code... 15 Arduino Input Shield... 18 Introduction... 18 Diagram... 18 Pin Allocation... 18-2 -

Sample Code... 19 Arduino Nano IO Shield... 21 Introduction... 21 Diagram... 21 Sample Code... 21 Compatible Table... 22 Stackable Table... 22 Control Pin Table... 23 Where to buy?... 23-3 -

Arduino I/O Expansion Shield (SKU: DFR0014) Introduction The Arduino I/O Expansion Shield provides an easy way to connect sensors, servos and RS485 device to Arduino board. It expands Arduino s Digital I/O and Analog Input Pins with Power and GND. It also provides separate PWM Pins which are compatible with standard servo connector. Another unique feature is that the I/O shield has a build-in RS485 converter which allows Arduino communicating with RS485 devices. The communication socket provides an extremely easy way to plug a wireless module such as APC220 RF module and DF-Bluetooth module. It has an individual power input for Servos. A servo power jumper allows user to select using external power or internal power to drive the Servos. Diagram Sample Code Not available Figure 1 Arduino I/O Expansion Shield - 4 -

Arduino Motor Shield (L293) SKU: DRI0001 Arduino Shields Manual 2010 Introduction This motor shield allows Arduino to drive two channel DC motors. It uses a L293B chip which deliveries output current up to 1A (2A for L298P version) each channel. The speed control is achieved through conventional PWM which can be obtained from Arduino s PWM output Pin 5 and 6. The enable/disable function of the motor control is signalled by Arduino Digital Pin 4 and 7. Roboduino Motor Shield uses PWM output Pin 6 and 9 and Digital Pin 7 and 8. The Motor shield is powered directly from Arduino. It is strongly advised that use external power supply to power the Arduino instead of the USB power supply. Diagram Figure 2 Motor Shield Diagram - 5 -

Pin Allocation Pin Digital 4 Digital 5 Digital 6 Digital 7 Function Motor 2 Direction control Motor 2 PWM control Motor 1 PWM control Motor 1 Direction control Sample Code //This motor shield use Pin 6,5,7,4 to control the motor // Simply connect your motors to M1+,M1-,M2+,M2- // Upload the code to Arduino/Roboduino // Through serial monitor, type 'a','s', 'w','d','x' to control the motor // www.dfrobot.com // Last modified on 24/12/2009 int EN1 = 6; int EN2 = 5; //Roboduino Motor shield uses Pin 9 int IN1 = 7; int IN2 = 4; //Latest version use pin 4 instead of pin 8 void Motor1(int pwm, boolean reverse) analogwrite(en1,pwm); //set pwm control, 0 for stop, and 255 for maximum speed if(reverse) digitalwrite(in1,high); else digitalwrite(in1,low); void Motor2(int pwm, boolean reverse) analogwrite(en2,pwm); if(reverse) digitalwrite(in2,high); else digitalwrite(in2,low); - 6 -

void setup() int i; // for(i=6;i<=9;i++) //For Roboduino Motor Shield // pinmode(i, OUTPUT); //set pin 6,7,8,9 to output mode for(i=5;i<=8;i++) //For Arduino Motor Shield pinmode(i, OUTPUT); //set pin 4,5,6,7 to output mode Serial.begin(9600); void loop() int x,delay_en; char val; while(1) val = Serial.read(); if(val!=-1) switch(val) case 'w'://move ahead Motor1(100,true); //You can change the speed, such as Motor(50,true) Motor2(100,true); break; case 'x'://move back Motor1(100,false); Motor2(100,false); break; case 'a'://turn left Motor1(100,false); Motor2(100,true); break; case 'd'://turn right Motor1(100,true); Motor2(100,false); break; case 's'://stop Motor1(0,false); Motor2(0,false); break; - 7 -

Arduino Motor Shield (L298N) SKU:DRI0009 Introduction This motor shield allows Arduino to drive two channel DC motors. It uses a L298N chip which deliveries output current up to 2A each channel. The speed control is achieved through conventional PWM which can be obtained from Arduino s PWM output Pin 5 and 6. The enable/disable function of the motor control is signalled by Arduino Digital Pin 4 and 7. The Motor shield can be powered directly from Arduino or from external power source. It is strongly encouraged to use external power supply to power the motor shield. Logic Control Voltage:5V (From Arduino) Motor Driven Voltage:4.8~35V (From Arduino or External Power Source) Logic supply current Iss: 36mA Motor Driven current Io: 2A Maximum power consumption:25w(t=75 ) PWM PLL Speed control mode Control signal level: High:2.3V Vin 5V Low:-0.3V Vin 1.5V Diagram Speed Control Mode M M 4.8-35V DC Power source selection jumpers Figure 3 Motor Shield Diagram - 8 -

Control Mode Selection Jumpers: The shield supports PWM and PLL(Phased Locked Loop) control Modes. The PWM mode uses E1 and E2 to generate PWM signal. The PLL mode uses M1 and M2 to generate phase control signal. Motor Terminal: Control Mode Selection Jumpers Two DC motors are connected to blue motor terminals. The male header behide the terminals are the same as the motor terminals. Motor terminal PWRIN: The motors can be powered by external power supply when the motor current exceeds the limits provided from the Arduino. The swith between external and Arduino power is implemented by two jumpers. PWRIN: External Power VIN: Arduino Power - 9 -

The motors are powered by external power supply Power Source Selection Jumpers NOTE: When the motor shield is powered by external power source, make sure the external power source and Arduino have the same GND. Control Signal Truth Table: E1 M1 E2 M2 L X Motor 1 Disabled L X Motor 2 Disabled H H Motor 1 Backward H H Motor 2 Backward H L Motor 1 Forward H L Motor 2 Forward PWM X PWM Speed control PWM X PWM Speed control Note:H is High level ;L is Low level ;PWM is Pulse Width Modulation signal; X is any voltage level - 10 -

Pin Allocation Pin Digital 4 Digital 5 Digital 6 Digital 7 Function Motor 2 Direction control Motor 2 PWM control Motor 1 PWM control Motor 1 Direction control PWM Mode Pin Digital 4 Digital 5 Digital 6 Digital 7 Function Motor 2 Enable control Motor 2 Direction control Motor 1 Direction control Motor 1 Enable control PLL Mode Sample Code Arduino PWM Speed Control: int E1 = 6; int M1 = 7; int E2 = 5; int M2 = 4; void setup() pinmode(m1, OUTPUT); pinmode(m2, OUTPUT); void loop() int value; for(value = 0 ; value <= 255; value+=5) digitalwrite(m1,high); digitalwrite(m2, HIGH); analogwrite(e1, value); //PWM Speed Control analogwrite(e2, value); //PWM Speed Control delay(30); - 11 -

Arduino PLL Speed Control: int E1 = 7; int M1 = 6; int E2 = 4; int M2 = 5; void setup() pinmode(m1, OUTPUT); pinmode(m2, OUTPUT); void loop() int value; for(value = 0 ; value <= 255; value+=5) digitalwrite(m1,high); digitalwrite(m2, HIGH); analogwrite(e1, value); //PLL Speed Control analogwrite(e2, value); //PLL Speed Control delay(30); - 12 -

Arduino LCD&KeyPad Shield (SKU: DFR0009) Introduction The LCD Keypad shield is developed for Arduino compatible boards, to provide a user-friendly interface that allows users to go through the menu, make selections etc. It consists of a 1602 white character blue backlight LCD. The keypad consists of 5 keys select, up, right, down and left. To save the digital IO pins, the keypad interface uses only one ADC channel. The key value is read through a 5 stage voltage divider. Diagram Figure 4 LCD&Keypad Shield Diagram - 13 -

Figure 5 Pin Out Diagram Pin Allocation Pin Analog 0 Digital 4 Digital 5 Digital 6 Digital 7 Digital 8 Digital 9 Digital 10 Function Button (select, up, right, down and left) DB4 DB5 DB6 DB7 RS (Data or Signal Display Selection) Enable Backlit Control - 14 -

Sample Code //example use of LCD4Bit_mod library #include <LCD4Bit_mod.h> //create object to control an LCD. //number of lines in display=1 LCD4Bit_mod lcd = LCD4Bit_mod(2); //Key message char msgs[5][15] = "Right Key OK ", "Up Key OK ", "Down Key OK ", "Left Key OK ", "Select Key OK" ; int adc_key_val[5] =30, 150, 360, 535, 760 ; int NUM_KEYS = 5; int adc_key_in; int key=-1; int oldkey=-1; void setup() pinmode(13, OUTPUT); //we'll use the debug LED to output a heartbeat lcd.init(); //optionally, now set up our application-specific display settings, overriding whatever the lcd did in lcd.init() //lcd.commandwrite(0x0f);//cursor on, display on, blink on. (nasty!) lcd.clear(); lcd.printin("keypad testing... pressing"); - 15 -

void loop() adc_key_in = analogread(0); // read the value from the sensor digitalwrite(13, HIGH); key = get_key(adc_key_in); if (key!= oldkey) // convert into key press // if keypress is detected delay(50); // wait for debounce time adc_key_in = analogread(0); key = get_key(adc_key_in); // read the value from the sensor // convert into key press if (key!= oldkey) oldkey = key; if (key >=0) lcd.cursorto(2, 0); //line=2, x=0 lcd.printin(msgs[key]); digitalwrite(13, LOW); // Convert ADC value to key number int get_key(unsigned int input) int k; for (k = 0; k < NUM_KEYS; k++) - 16 -

if (input < adc_key_val[k]) return k; if (k >= NUM_KEYS) k = -1; // No valid key pressed return k; - 17 -

Arduino Input Shield (SKU: DRR0008) Introduction The Arduino Input Shield includes a two axis mini joystick (with moment switch) as well as two colored push buttons. The reserved APC220 module interface is to facilitate the realization of wireless rocker button controller. The shield can be easily stacked on top of your Arduino. Diagram Pin Allocation Pin Digital 3 Digital 4 Digital 5 Analog 0 Analog 1 Function Button B Button C Button A Y axis X axis - 18 -

Sample Code //This input shield use Digital Pin 3,4,5 (3 buttons) and Analog Pin 0,1 (JS) // // Upload the code to Arduino // www.dfrobot.com // Last modified on 24/12/2009 int x=1; int y=0; int button_a= 5; int button_b= 3; int button_c= 4; void setup() int i; for(i=3;i<=5;i++) pinmode(i, INPUT); pinmode(led,output); void loop() int val; while(1) val=analogread(x); //Read Analog input if(val>1000 val<20) digitalwrite(led, HIGH); else digitalwrite(led,low); - 19 -

val=analogread(y); if(val>1000 val<20) digitalwrite(led, HIGH); else digitalwrite(led,low); if(digitalread(button_a)==0) //Check Button A digitalwrite(led, HIGH); // Set LED on else digitalwrite(led,low); if(digitalread(button_b)==0) //Check Button B digitalwrite(led, HIGH); // Set LED Off else digitalwrite(led,low); if(digitalread(button_c)==0) //Check Button C digitalwrite(led, HIGH); // Set LED off else digitalwrite(led,low); - 20 -

Arduino Nano IO Shield (SKU: DRR0012) Introduction The Nano IO Shield extends the Digital I/O with Power and GND Pins. A communication module socket provides an easy way to integrate APC220 RF module and DF-Bluetooth module which brings a wireless solution. A separate set of I2C pins make the I2C device connection Diagram Sample Code Not available - 21 -

Compatible Table Diecimila Duemilanove Mega Nano Romeo IO Shield Yes Yes Yes No No Motor Shield Yes Yes Yes No No Ethernet Shield No Yes No No Yes LCD&Keypad Shield Yes Yes Yes No No Input Shield Yes Yes Yes No Yes XBee Shield Yes Yes Yes No Yes Nano IO Shield No No No Yes No Stackable Table Shield Name IO Shield Motor Shield Ethernet Shield LCD&Keypad Shield Input Shield XBee Shield Nano IO Shield Stackable Yes Yes Yes No No No No - 22 -

Control Pin Table Shield Name IO Shield Control Pin None Motor Shield 6,7,8(5),9(4) Ethernet Shield 10,11,12,13 LCD&Keypad Shield Input Shield Digital Pin: 4,5,6,7,8,9,10 Analog Pin: 0 Digital Pin:3,4,5 Analog Pin: 0,1 XBee Shield 0,1 Nano IO Shield None Where to buy? Region USA/Canada UK China Taiwan Thailand Australia Shop http://www.robotshop.ca http://www.yerobot.com http://www.dfrobot.com http://www.aroboto.com/ http://www.micro4you.com/ http://www.littlebirdelectronics.com/ If you cannot find local shop? Please contact us at service@dfrobot.com if you are interesting in to be one of our distributors, please contact us at distributor@dfrobot.com - 23 -

Revision Date Comments 1.0 20 August 2009 First Release 1.1 2 nd September 2009 Add LCD pin out Diagram 1.2 14 th November 2009 Modify Motor shield Pin allocation 1.3 24 th December 2009 Modify Motor shield code 1.4 28 th December 2009 Add Input Shield Code 1.41 7 th April 2010 Add motor power supply information 1.5 25 th May 2010 Add motor shield L298N - 24 -