Arduino Shield Manual
Arduino Shield Manual
Version 1.5
www.DFRobot.com
Table of Contents
Introduction ........................................................................................................................................ 4
Diagram ............................................................................................................................................... 4
Introduction ........................................................................................................................................ 5
Diagram ............................................................................................................................................... 5
Introduction ........................................................................................................................................ 8
Diagram ............................................................................................................................................... 8
Introduction ...................................................................................................................................... 13
Diagram ............................................................................................................................................. 13
Introduction ...................................................................................................................................... 18
Diagram ............................................................................................................................................. 18
-2-
Arduino Shields Manual 2010
Introduction ...................................................................................................................................... 21
Diagram ............................................................................................................................................. 21
-3-
Arduino Shields Manual 2010
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
-4-
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
-5-
Arduino Shields Manual 2010
Pin Allocation
Pin Function
Sample Code
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
-6-
Arduino Shields Manual 2010
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
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 Shields Manual 2010
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.
Diagram
Speed Control
Mode
4.8-35V DC
-8-
Arduino Shields Manual 2010
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:
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.
-9-
Arduino Shields Manual 2010
NOTE: When the motor shield is powered by external power source, make sure the external power
source and Arduino have the same GND.
E1 M1 E2 M2
Note:H is High level ;L is Low level ;PWM is Pulse Width Modulation signal; X is any voltage level
- 10 -
Arduino Shields Manual 2010
Pin Allocation
Pin Function
PWM Mode
Pin Function
PLL Mode
Sample Code
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 Shields Manual 2010
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 Shields Manual 2010
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
- 13 -
Arduino Shields Manual 2010
Pin Allocation
Pin Function
Button
Analog 0
(select, up, right, down and left)
Digital 4 DB4
Digital 5 DB5
Digital 6 DB6
Digital 7 DB7
Digital 9 Enable
- 14 -
Arduino Shields Manual 2010
Sample Code
#include <LCD4Bit_mod.h>
//Key message
int NUM_KEYS = 5;
int adc_key_in;
int key=-1;
int oldkey=-1;
void setup() {
lcd.init();
lcd.clear();
- 15 -
Arduino Shields Manual 2010
void loop()
digitalWrite(13, HIGH);
if (key != oldkey)
oldkey = key;
if (key >=0){
lcd.printIn(msgs[key]);
digitalWrite(13, LOW);
{ int k;
- 16 -
Arduino Shields Manual 2010
{ return k; }
if (k >= NUM_KEYS)
return k;
- 17 -
Arduino Shields Manual 2010
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 Function
Digital 3 Button B
Digital 4 Button C
Digital 5 Button A
Analog 0 Y axis
Analog 1 X axis
- 18 -
Arduino Shields Manual 2010
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)
else digitalWrite(LED,LOW);
- 19 -
Arduino Shields Manual 2010
val=analogRead(y);
else digitalWrite(LED,LOW);
else digitalWrite(LED,LOW);
else digitalWrite(LED,LOW);
else digitalWrite(LED,LOW);
- 20 -
Arduino Shields Manual 2010
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 -
Arduino Shields Manual 2010
Compatible Table
Stackable Table
IO Shield Yes
LCD&Keypad Shield No
Input Shield No
XBee Shield No
Nano IO Shield No
- 22 -
Arduino Shields Manual 2010
IO Shield None
Where to buy ?
Region Shop
USA/Canada http://www.robotshop.ca
UK http://www.yerobot.com
China http://www.dfrobot.com
Taiwan http://www.aroboto.com/
Thailand http://www.micro4you.com/
Australia http://www.littlebirdelectronics.com/
- 23 -
Arduino Shields Manual 2010
- 24 -