Hardware Reference
In-Depth Information
Infrared Control of a Digital Camera
This example uses an infrared LED and
an Arduino to control a digital camera. It's
about the simplest IR control project you
can do.
MATERIALS
» 1 Arduino module
» 1 infrared LED
» 1 pushbutton
» 1 220-ohm resistor
» 1 10-kilohm resistor
» 1 solderless breadboard or prototyping shield
Most digital SLR cameras on the market today can be
controlled remotely via infrared. Each brand uses a slightly
different protocol, but they all tend to have the same basic
commands: trigger the shutter, trigger after a delay, and
auto-focus. Sebastian Setz has written an Arduino library
that can send the signals for most common cameras. It's
been tested with Canon, Nikon, Olympus, Pentax, and
Sony. If you have an SLR from any of these brands, you
should be able to control it with this library.
AREF
GND
D13
D12
D11/PWM
D10/PWM
D9/PWM
D8
Reset
+3.3V
The circuit for this project is simple. Connect the push-
button to pin 4 of the microcontoller (with a 10-kilohm
pulldown resistor), and connect the infrared LED to pin 3
of the microcontroller, as shown in Figure 6-6.
+5V
Gnd
Gnd
Vin
Arduino
Module
Download the Multi Camera IR Control library from http://
sebastian.setz.name/arduino/my-libraries/multi-camera-
ir-control and copy it to the libraries directory of your
Arduino sketch directory. If you've never installed a library
before, you'll need to create this directory. One it's there,
restart the Arduino application, and you should see a new
library in the Sketch menu's Import Library submenu
called MultiCameraIrControl . Now you're ready to get
going.
X
+5V
D7
D6/PWM
D5/PWM
D4
D3/PWM
D2
Digital1/TX
Digital0/RX
pushbutton
Analog0
A1
A2
A3
A4
A5
220 Ω
10k Ω
IR LED
Figure 6-6
The microcontroller with an IR LED and pushbutton attached.
MADE
IN I TALY
DIGITAL (PWM ~ )
- +
1
5
10
15
20
25
30
L
UNO
A
B
C
D
E
TX
RX
ON
ARDUINO
RESET
ICSP
F
G
H
I
J
1
5
10
15
20
25
30
POWER
ANALOG IN
Search WWH ::




Custom Search