Libelium Waspmote Quick start guide

Video Camera
Technical Guide

-2-
v4.3
Index
Document version: v4.3 - 10/2015
© Libelium Comunicaciones Distribuidas S.L.
INDEX
1. General ................................................................................................................................................. 4
1.1. General and safety information..............................................................................................................................................4
1.2. Conditions of use .........................................................................................................................................................................4
2. Hardware.............................................................................................................................................. 5
2.1. Introduction...................................................................................................................................................................................5
2.2. General Description ....................................................................................................................................................................5
2.3. Specications ................................................................................................................................................................................6
2.4. Electrical Characteristics............................................................................................................................................................6
2.5. Assembling.....................................................................................................................................................................................7
3. Sensors ................................................................................................................................................. 9
3.1. Camera Sensor ..............................................................................................................................................................................9
3.1.1. Specications.................................................................................................................................................................9
3.1.2. Measurement Process.................................................................................................................................................9
3.2. Luminosity sensor........................................................................................................................................................................9
3.2.1. Specications.................................................................................................................................................................9
3.2.2. Usage................................................................................................................................................................................9
3.2.3. Measurement process ................................................................................................................................................9
3.2.4. Socket.............................................................................................................................................................................10
3.3. IR sensor .......................................................................................................................................................................................10
3.3.1. Specications...............................................................................................................................................................10
3.3.2. Usage..............................................................................................................................................................................11
3.3.3. Measurement process ..............................................................................................................................................11
3.3.4. Socket.............................................................................................................................................................................11
3.4. Presence sensor (PIR)...............................................................................................................................................................11
3.4.1. Specications...............................................................................................................................................................11
3.4.2. Usage..............................................................................................................................................................................12
3.4.3. Measurement process ..............................................................................................................................................12
3.4.4. Socket.............................................................................................................................................................................13
4. Night Vision........................................................................................................................................ 14
4.1. IR lighting.....................................................................................................................................................................................15
4.1.1. Description ..................................................................................................................................................................15
4.1.2. Specications...............................................................................................................................................................15
4.2. IR cut lter.................................................................................................................................................................................... 17
4.2.1. Description ...................................................................................................................................................................17
4.2.2. Specications...............................................................................................................................................................17

-3-
v4.3
5. Board conguration and programming .......................................................................................... 18
5.1. Focusing the lens with microSD card ................................................................................................................................18
5.2. Focusing the lens via videocall ............................................................................................................................................19
5.3. Focusing the lens with calibration program (only for Windows)............................................................................. 20
5.4. Battery...........................................................................................................................................................................................22
5.5. API...................................................................................................................................................................................................22
5.5.1. Starting the camera...................................................................................................................................................22
5.5.2. Stopping the camera ................................................................................................................................................22
5.5.3. Conguring the resolution .....................................................................................................................................23
5.5.4. Conguring the brightness ....................................................................................................................................23
5.5.5. Congurig the rotation............................................................................................................................................24
5.5.6. Conguring the FPS ..................................................................................................................................................24
5.5.7. Conguring the picture name...............................................................................................................................25
5.5.8. Adding time stamp on pictures ............................................................................................................................25
5.5.9. Taking pictures ............................................................................................................................................................25
5.5.10. Recording videos .....................................................................................................................................................26
5.5.11. Making videocalls....................................................................................................................................................26
5.5.12. Setting the video quality ......................................................................................................................................27
5.5.13. Sending DMTF tones .............................................................................................................................................27
5.5.14. Managing IR LEDs....................................................................................................................................................28
5.5.15. Managing IR cut lter.............................................................................................................................................28
5.5.16. Managing interrupts...............................................................................................................................................28
5.6. Example code.............................................................................................................................................................................29
6. Sending the photos and videos........................................................................................................ 32
6.1. Sending photos and videos by 3G/GPRS .........................................................................................................................34
6.2. Sending photos and videos by WiFi................................................................................................................................... 35
6.3. Sending times ............................................................................................................................................................................ 35
6.4. API...................................................................................................................................................................................................36
6.4.1. Sending pictures or videos to an FTP server with WiFi.................................................................................36
6.4.2. Sending pictures or videos to an FTP server with 3G/GPRS Board ..........................................................36
6.4.3. Sending a picture as attachment of an email with 3G/GPRS Board ........................................................38
7. Consumption ..................................................................................................................................... 39
8. API changelog.................................................................................................................................... 40
9. Documentation changelog............................................................................................................... 41
10. Maintenance .................................................................................................................................... 42
11. Disposal and recycling .................................................................................................................... 43
Index

-4-
v4.3
General
1. General
1.1. General and safety information
• In this section, the term “Waspmote” encompasses both the Waspmote device itself and its modules and sensor boards.
• Read through the document “General Conditions of Libelium Sale and Use”.
• Do not allow contact of metallic objects with the electronic part to avoid injuries and burns.
• NEVER submerge the device in any liquid.
• Keep the device in a dry place and away from any liquid which may spill.
• Waspmote consists of highly sensitive electronics which is accessible to the exterior, handle with great care and avoid
bangs or hard brushing against surfaces.
• Check the product specications section for the maximum allowed power voltage and amperage range and consequently
always use a current transformer and a battery which works within that range. Libelium is only responsible for the correct
operation of the device with the batteries, power supplies and chargers which it supplies.
• Keep the device within the specied range of temperatures in the specications section.
• Do not connect or power the device with damaged cables or batteries.
• Place the device in a place only accessible to maintenance personnel (a restricted area).
• Keep children away from the device in all circumstances.
• If there is an electrical failure, disconnect the main switch immediately and disconnect that battery or any other power
supply that is being used.
• If using a car lighter as a power supply, be sure to respect the voltage and current data specied in the “Power Supplies”
section.
• If using a battery in combination or not with a solar panel as a power supply, be sure to use the voltage and current data
specied in the “Power supplies” section.
• If a software or hardware failure occurs, consult the Libelium Web Development section.
• Check that the frequency and power of the communication radio modules together with the integrated antennas are
allowed in the area where you want to use the device.
• Waspmote is a device to be integrated in a casing so that it is protected from environmental conditions such as light, dust,
humidity or sudden changes in temperature. The board supplied “as is” is not recommended for a nal installation as the
electronic components are open to the air and may be damaged.
1.2. Conditions of use
• Read the “General and Safety Information” section carefully and keep the manual for future consultation.
• Use Waspmote in accordance with the electrical specications and the environment described in the “Electrical Data”
section of this manual.
• Waspmote and its components and modules are supplied as electronic boards to be integrated within a nal product. This
product must contain an enclosure to protect it from dust, humidity and other environmental interactions. In the event of
outside use, this enclosure must be rated at least IP-65.
• Do not place Waspmote in contact with metallic surfaces; they could cause short-circuits which will permanently damage it.
Further information you may need can be found at: http://www.libelium.com/development/waspmote
The “General Conditions of Libelium Sale and Use”document can be found at:
http://www.libelium.com/development/waspmote/technical_service

-5-
v4.3
Hardware
2. Hardware
2.1. Introduction
The new Video Camera Sensor board in conjunction with the 3G module for Waspmote allows to take photos (VGA - 640x480)
and record videos (QVGA - 320x240) and send them to the Cloud by using high speed WCDMA and HSPA cellular networks in the
same way as Smartphones do. This makes possible sensor nodes send not only discrete sensor information such as temperature
or humidity (which can be encoded using just a single number) but also complex streams of information such as photos and
videos. This new feature allows developers the creation of new Smart Security applications.
The 3G module oers speed rates of 7.2Mbps in download mode and 5.5Mbps when uploading to the Cloud photos and videos
taken by the Video Camera Sensor board, which makes possible to create a distributed photo/video network where hundreds
of small sensor nodes send at the same time the information captured.
The new Video Camera Sensor board includes 22 high power infrared (IR) LED’s to implement the night vision mode - allowing
Waspmote take pictures and record videos in total darkness-. This mode is activated automatically changing the IR lter under
the lens by using the luminosity information given by two sensors integrated on the board, a LDR sensor to capture the visible
light (400-600nm) and an infrared sensor to measure the IR levels (600-1000nm).
Each Waspmote sensor node may integrate at the same time a medium/long range radio such as 802.15.4 / ZigBee / 868MHz
/ 900MHz / Sigfox/ Bluetooth / WiFi / LoRa/ and one long range 3G radio. This way we can minimize costs by using the mobile
network just when really needed.
The 3G module comes with an internal SD Card of 2GB (extended up to 32GB) which is used to store the photos and videos
taken by the Video Camera Sensor Board without the need of being handled by the node MCU. This ensures we get real speed
ranges (7.2Mbps download and 5.5Mbps upload) as the communication is direct between the SD and the 3G module.
The 3G module counts also with an internal GPS that enables the location of the device outdoors and indoors combining
standard NMEA frames with mobile cell ID triangulation using both assisted-mobile (A-GPS) and mobile-based (S-GPS) modes.
By using the information given by the GPS we can add meta information to the multimedia les setting the geolocation of
where the pictures and videos are taken.
2.2. General Description
The Video Camera Sensor Board allows to Waspmote to take pictures and record video along with the Waspmote 3G/GPRS
board. The board includes 22 IR LEDs, divided in two blocks controlled each one by transistors, to give extra illumination and
record with few light or in the night. To eliminate the IR distortion when the board is used with natural light, the board has a
lter exchanger with a IR light lter.
The board has two sockets for a LDR and a IR photodiode. With the information of these sensors the users can select the proper
lter and, if is necessary, to use the IR LEDs.
The Video Camera Sensor Board also includes a presence sensor (PIR), to generate an interruption on Waspmote and take a
picture or record a video when a person passes by, this feature is specially designed for security and surveillance applications.

-6-
v4.3
Hardware
2.3. Specications
Weight (with sensors): 43gr
Dimensions: 73 x 53 x 1.3 mm
Dimensions Waspmote + 3G module + Videocamera: 73 x 62 x 48 mm
Temperature Range: [-25ºC, 70ºC]
Figure : Video Camera Sensor Board
2.4. Electrical Characteristics
IR LED power voltages: 3,6V – 4,2V (from battery)
IR cut lter exchanger power voltages: 3,6V - 4,2V (from battery)
Image Sensor Analog Voltage: 3,3V
Image Sensor Digital I/O Voltage: 2,8V (from Waspmote 3G/GPRS board)
LDR and IR photodiode Sensor Voltage: 3,3V
PIR Sensor Voltage: 3,3V
Maximum admitted current (continuous) for sensors: 200mA
IR LED maximum current (continuous) for block 1: 1A
IR LED maximum current (continuous) for block 2: 1A

-7-
v4.3
Hardware
2.5. Assembling
The board needs to be assembled along with the 3G/GPRS board as the photos and video are handled and stored by it. Once
they are stored in the internal SD of the 3G module, they can be sent using the 3G radio or passed to the Waspmote MCU and
then sent by other radios such as the WiFi. Read more about this in the section “Sending photos and videos”.
Follow the next steps to assemble correctly the boards:
• Connect the battery to Waspmote.
• Insert the microSD card and the SIM card (if necessary).
Figure : Inserts microSD card
• Connect the FPC to the Waspmote Video Camera Sensor board. To do this, rst pull carefully out the sides of the connector,
inserts the FPC with metallic contacts facing up and, at the nal step, push in the laterals of the connector to close it.
123
Figure : Connecting FPC bus to Video Camera Sensor Board

-8-
v4.3
Hardware
• Follow the same steps to connect the FPC to the Waspmote 3G/GPRS board.
• Connect the Waspmote 3G/GPRS board in the socket 1 on Waspmote.
Figure : Mounting 3G/GPRS board in Waspmote
• Insert the Video Camera Sensor board on Waspmote. Beware, the last two pins of the 2x12 connector (the nearest of the
corner) must be empty.
Figure : Mounting Video Camera Sensor Board in Waspmote
• Insert the PIR sensor, the luminosity sensor and the IR sensor. The IR sensor has polarity. Please, refer to chapter “IR sensor”
for more information.
Figure : Connecting sensors

-9-
v4.3
Sensors
3. Sensors
3.1. Camera Sensor
3.1.1. Specications
Width(min.): 24mm
Height: 24mm
Length: 17mm
Max resolution: 640x480 for pictures, 320x240 for video
Image Sensor Analog Voltage: 3,3V
Image Sensor Digital I/O Voltage: 2,8V (from Waspmote 3G/GPRS board)
Temperature range:
operating: -30°C to 70°C junction temperature
stable image: 0°C to 50°C junction temperature
Consumption (active): 48 mA
Angle of view: 70º
3.1.2. Measurement Process
The image sensor is fully managed by Waspmote 3G/GPRS board. Please, refer to API chapter for more information.
3.2. Luminosity sensor
3.2.1. Specications
Resistance in darkness: 20MΩ
Resistance in light (10lux): 5 ~ 20kΩ
Spectral range: 400 ~ 700nm
Operating Temperature: -30ºC ~ +75ºC
Minimum consumption: 0uA approximately
3.2.2. Usage
With this sensor we can know the level of visible light and we can decide if switch on or switch o the blocks of IR LED.
3.2.3. Measurement process
This is a resistive sensor whose conductivity varies depending on the intensity of light received on its photosensitive part. The
measurement of the sensor is carried out through the analog-to-digital converter of the microcontroller, reading the resulting
voltage out of a voltage divider formed by the sensor itself and the load resistor of 10kΩ.
The measurable spectral range (400nm – 700nm) coincides with the human visible spectrum so it can be used to detect light/
darkness in the same way that a human eye would detect it.
The sensor value can be read with the next function:
{
LDR_value = readAnalog(SENS_LDR);
}
Figure : Camera sensor with IR
cut lter and lens
Figure : Light sensor LDR

-10-
v4.3
Sensors
3.2.4. Socket
Figure : Socket for luminosity sensor
3.3. IR sensor
3.3.1. Specications
Peak sensitivity wavelength: 860nm
Collector dark current (Ee=1mW/cm2): 100nA
Operating Temperature: -25ºC ~ +85ºC
Figure : Photo Current vs. Irradiance taken from the Premier Farnell Group sensor data sheet
Figure : IR sensor

-11-
v4.3
Sensors
3.3.2. Usage
With this sensor we can know the level of IR light and we can decide if enable the IR cut lter ltering the IR light or disable the
IR cut lter allowing the pass to all light.
3.3.3. Measurement process
This is a transistor in wich the current of this base varies depending on the intensity of the light received on its photoelectric
part. The current generated in base allows the conduction of current througt collector-emitter. The current produces a voltage
in a resistance connected between the emitter of the phototransistor and ground. The voltage of the resistance can be read
through the analog-to-digital converter of the microcontroller.
The sensor value can be read with the next function:
{
IR_value = readAnalog(SENS_IR);
}
3.3.4. Socket
Figure : Socket for IR sensor
3.4. Presence sensor (PIR)
3.4.1. Specications
Height: 25.4mm
Width: 24.3mm
Length: 28.0mm
Consumption: 100μA
Range of detection: 6 ~ 7m
Spectral range: ~ 10μm
Figure : PIR presence sensor

-12-
v4.3
Sensors
3.4.2. Usage
This sensor allows to the Video Camera Sensor Board generate an interrupt in Waspmote when the presence sensor detects, for
example, a person or an animal.
3.4.3. Measurement process
The PIR sensor (Passive Infra-Red) is a pyroelectric sensor mainly consisting of an infra-red receiver and a focusing lens that bases
its operation on the monitoring of the variations in the levels of reception of detected infra-reds, reecting this movement by
setting its output signal high.
The 10μm spectrum corresponds to the radiation of heat from the majority of mammals as they emit temperatures around 36°C.
The maximum detection direction goes perpendicular to the Video Camera Sensor Board.
Figure : PIR maximun detection range
Figure : Maximun range jumper conguration

-13-
v4.3
Sensors
The connection between Waspmote and the PIR sensor has been designed to generate an interruption. When the PIR detects
a change of state, it changes his output from ‘0’ to ‘1’. This change generates an interruption in Waspmote by UART1. Before to
use the UART1, the monitoring pin (PIR_3G_PIN_MON) must be forced to ‘0’ to allow the connection with the Waspmote 3G/
GPRS board. This can be done with the function disablePIRInterrupt(). Please, refer to API chapter for more information.
3.4.4. Socket
The sensor must situated in the PIR socket (see gure below):
Figure : Socket for presence sensor

-14-
v4.3
Night Vision
4. Night Vision
The Video Camera Sensor Board has been developed to allow Waspmote to take pictures and record video with few light or
in total darkness. To use this feature the Video Camera Sensor Board has integrated 22 IR LEDs to illuminate the focused zone.
Also, to combine this feature with the use of the camera with daylight, the Video Camera Sensor Board includes a IR cut lter to
eliminate a pink distortion on the image.
Daylight photos
Indoor low light level comparative
Corridor
Figure : Photo daylight1 Figure : Photo daylight2
Figure : Photo without night vision Figure : Photo with night vision activated
Figure : Photo with light Figure : Photo without light and
with night vision deactivated
Figure : Photo without light and
with night vision activated

-15-
v4.3
Night Vision
4.1. IR lighting
4.1.1. Description
The Video Camera Sensor Board have 22 IR LEDs divided in two blocks controlled each one by transistors, to give extra
ilumination and record with few light or in the night. Block 1 can be controlled by pin DIGITAL6 (POWER_LED) and the block 2
by pin DIGITAL8 (POWER_LED2) or using the function powerIRLED(). Please, refer to API chapter for more information.
Figure : IR LED blocks
4.1.2. Specications
Block 1
Number of LEDs: 8
Total current consumption: 200mA at 3,7V; 270mA at 4,2V
Current for each LED: 50mA at 3,7V; 67,5mA at 4,2V
Block 2
Number of LEDs: 14
Total current consumption: 390mA at 3,7V;490mA at 4,2V
Current for each LED: 48,75mA at 3,7V; 61,25mA at 4,2V
LED description
Model: HIR7393C
Peak wavelength: λp=850nm
View Angle: 50º
Figure : IR LEDs activated

-16-
v4.3
Night Vision
Figure : Relative Intensity vs. Forward Current taken from the Everlight Electronics Co., Ltd.
Figure : Relative Radiant Intensity vs. Angular Displacement taken from the Everlight Electronics Co., Ltd. data sheet

-17-
v4.3
Night Vision
4.2. IR cut lter
4.2.1. Description
The Video Camera Sensor Board has got installed a IR cut lter. This light lter has two glasses inside. One glass allows take
images with day light without a pink hue in the image, it eliminates the light over 625nm. The other one allows to pass the light
spectrum between 400nm and 1100nm. This IR cut lter can work with Waspmote in all positions.
The lter are activated when the Waspmote uses the camera. The user can select the lter with the function selectFilter().
Please, refer to API chapter for more information.
4.2.2. Specications
Height: 25.6 mm
Width: 5.5mm
Length: 30.5mm
Current consumption: 65mA
AR Glass Specication:
• Glass shape: 8.4*7.6mm(t=0.40mm)
• Wave Length(nm): 400~1100nm
Figure : Light transmission vs. WaverLength for AR Glass taken from IR cut lter data sheet
Blue Glass Specication:
• Glass shape: 8.4*7.6mm(t=0.55mm)
• IR lter cut wave length(nm): 625±10nm
Figure : Light transmission vs. WaverLength for Blue Glass taken from IR cut lter data sheet

-18-
v4.3
Board conguration and programming
5. Board conguration and programming
5.1. Focusing the lens with microSD card
1º Load the code“Focusing the lens with microSD”in Waspmote. The code is in the examples section.
2º Open the serial monitor and wait for the picture
3º Check the picture in the microSD card and if it is necessary, loosen the xing screw of the lens and rotate the lens in little steps.
Figure : Loosing the xing screw
4º Insert the microSD in Waspmote 3G/GPRS board and repeat the step 3 until focus the lens.
5º Tighten the xing screw of the lens and power o Waspmote.
Figure : Tighten the xing screw

-19-
v4.3
Board conguration and programming
5.2. Focusing the lens via videocall
A fast method to calibrate the lens is to make a videocall with Waspmote assembled and in the installation place.
1º Open the code “Focusing the lens via videocall”, put your phone number in ‘phone_number’ variable and load the code in
Waspmote. The code is in the 3G examples section of Waspmote IDE
2º Wait the videocall in your phone.
3º Loosen the xing screw of the lens and rotate the lens until you can focus correctly.
Figure : Loosing the xing screw
4º Tighten the xing screw of the lens and hang the videocall in the phone.
Figure : Tighten the xing screw

-20-
v4.3
Board conguration and programming
5.3. Focusing the lens with calibration program (only for Windows)
1º Load the code“Focusing the lens with calibration program”in Waspmote from 3G examples of Waspmote IDE
2º Connect the Waspmote 3G/GPRS board to your computer with the miniUSB connector. Then power on Waspmote.
Figure : USB connector on Waspmote 3G/GPRS board
3º Open the CameraDemo.exe and select SIM5218
Figure : Select SIM5218 in CameraDemo program
Other manuals for Waspmote
4
Table of contents
Popular Camcorder manuals by other brands

Samsung
Samsung VP-D530 Owner's instruction book

Samsung
Samsung SC-X105(L) Owner's instruction book

Sony
Sony PMW-350 user manual

Panasonic
Panasonic HDC-HS250P operating instructions

Panasonic
Panasonic AG-DVX100A - Pro 3-CCD MiniDV Proline... operating instructions

Panasonic
Panasonic HDC-HS250P/PC user manual