Libelium Waspmote Technical Manual
Read Online
Read the Libelium Waspmote Technical Manual online using the built-in PDF viewer.
Text of the manual
Document version: v6.3 - 07/2016
© Libelium Comunicaciones Distribuidas S.L.
Index
INDEX
1. Waspmote Kit........................................................................................................................................ 6
1.1. General and safety information...............................................................................................................................................6
1.2. Conditions of use..........................................................................................................................................................................7
1.3. Assembly..........................................................................................................................................................................................9
2. Waspmote Plug & Sense! - Encapsulated Line.................................................................................. 14
2.1. Quick Overview..........................................................................................................................................................................14
2.1.1. Features..........................................................................................................................................................................14
2.1.2. Sensor Probes...............................................................................................................................................................14
2.1.3. Solar Powered...............................................................................................................................................................15
2.1.4. Programming the Nodes..........................................................................................................................................16
2.1.5. Radio Interfaces...........................................................................................................................................................17
2.1.6. Program in minutes....................................................................................................................................................18
2.1.7. Data to the Cloud........................................................................................................................................................18
2.1.8. Models.............................................................................................................................................................................19
2.1.8.1. Smart Environment....................................................................................................................................20
2.1.8.2. Smart Environment PRO...........................................................................................................................22
2.1.8.3. Smart Security..............................................................................................................................................24
2.1.8.4. Smart Water...................................................................................................................................................26
2.1.8.5. Smart Water Ions.........................................................................................................................................28
2.1.8.6. Smart Cities...................................................................................................................................................32
2.1.8.7. Smart Parking...............................................................................................................................................34
2.1.8.8. Smart Agriculture........................................................................................................................................35
2.1.8.9. Ambient Control..........................................................................................................................................37
2.1.8.10. Radiation Control......................................................................................................................................39
3. Hardware............................................................................................................................................. 40
3.1. Modular Architecture...............................................................................................................................................................40
3.2. Specifications..............................................................................................................................................................................40
3.3. Block Diagram.............................................................................................................................................................................41
3.4. Electrical Data..............................................................................................................................................................................42
3.5. I/O ...................................................................................................................................................................................................43
3.5.1. Analog.............................................................................................................................................................................44
3.5.2. Digital..............................................................................................................................................................................44
3.5.3. PWM.................................................................................................................................................................................44
3.5.4. UART................................................................................................................................................................................45
3.5.5. I2C.....................................................................................................................................................................................45
3.5.6. SPI.....................................................................................................................................................................................45
3.5.7. USB...................................................................................................................................................................................45
3.6. Real Time Clock - RTC................................................................................................................................................................45
3.7. LEDs................................................................................................................................................................................................47
4. Architecture and System.................................................................................................................... 48
4.1. Concepts.......................................................................................................................................................................................48
4.2. Timers.............................................................................................................................................................................................49
4.2.1. Watchdog.......................................................................................................................................................................49
4.2.2. RTC....................................................................................................................................................................................49
5. Interruptions....................................................................................................................................... 50
6. Energy System.................................................................................................................................... 52
6.1. Concepts.......................................................................................................................................................................................52
6.2. Sleep mode..................................................................................................................................................................................53
6.3. Deep Sleep mode......................................................................................................................................................................54
6.4. Hibernate mode.........................................................................................................................................................................54
7. Sensors................................................................................................................................................ 56
7.1. Sensors in Waspmote...............................................................................................................................................................56
7.1.1. Temperature..................................................................................................................................................................56
7.1.2. Accelerometer..............................................................................................................................................................57
7.2. Integration of new sensors.....................................................................................................................................................61
7.3. Sensor Boards..............................................................................................................................................................................62
7.4. Power..............................................................................................................................................................................................66
8. 802.15.4/ZigBee.................................................................................................................................. 67
8.1. XBee-802.15.4.............................................................................................................................................................................67
8.2. XBee - ZigBee..............................................................................................................................................................................70
8.3. XBee - 868.....................................................................................................................................................................................72
8.4. XBee - 900.....................................................................................................................................................................................74
8.5. XBee-DigiMesh...........................................................................................................................................................................75
9. LoRaWAN............................................................................................................................................. 77
10. LoRa................................................................................................................................................... 78
10.1. RSSI...............................................................................................................................................................................................80
11. Sigfox................................................................................................................................................. 81
12. WiFi.................................................................................................................................................... 82
12.1. WiFi Topologies.........................................................................................................................................................................82
12.1.1. Access Point................................................................................................................................................................82
12.1.2. When is recommended to use Meshlium instead a standard WiFi router?.........................................84
13. Bluetooth Pro.................................................................................................................................... 85
13.1. Technical specifications.........................................................................................................................................................85
13.2. Bluetooth module for device discovery..........................................................................................................................87
14. Bluetooth Low Energy...................................................................................................................... 89
14.1. Technical specifications: .......................................................................................................................................................89
15. GSM/GPRS......................................................................................................................................... 91
16. GPRS+GPS........................................................................................................................................ 93
17. 3G + GPRS.......................................................................................................................................... 95
18. RFID/NFC........................................................................................................................................... 97
19. Industrial Protocols.......................................................................................................................... 99
19.1. Introduction .............................................................................................................................................................................99
19.2. RS-485 / Modbus module...................................................................................................................................................100
19.3. RS-232 Serial / Modbus module.......................................................................................................................................101
19.4. CAN Bus module....................................................................................................................................................................102
19.5. Modbus.....................................................................................................................................................................................103
19.6. Operating with the modules.............................................................................................................................................103
20. Expansion Radio Board.................................................................................................................. 105
21. Over the Air Programming (OTA).................................................................................................. 106
21.1. Overview...................................................................................................................................................................................106
21.2. Benefits......................................................................................................................................................................................106
21.3. Concepts...................................................................................................................................................................................107
21.3.1. OTA with 802.15.4/ZigBee modules................................................................................................................107
21.3.2. OTA with 3G/GPRS/WiFi modules via FTP.....................................................................................................108
21.4. OTA with 802.15.4/ZigBee modules...............................................................................................................................109
21.4.1. OTA Step by Step...................................................................................................................................................109
21.4.2. OTA Shell...................................................................................................................................................................112
21.5. OTA with 3G/GPRS/WiFi modules via FTP.....................................................................................................................112
21.5.1. Procedure.................................................................................................................................................................112
21.5.2. Setting the FTP server configuration..............................................................................................................113
22. Encryption Libraries....................................................................................................................... 114
22.1. Transmission of sensor data...............................................................................................................................................114
23. SD Memory Card............................................................................................................................. 116
24. Energy Consumption..................................................................................................................... 118
24.1. Consumption tables.............................................................................................................................................................118
25. Power supplies................................................................................................................................ 120
25.1. Battery.......................................................................................................................................................................................120
25.2. Solar Panel................................................................................................................................................................................123
25.3. USB..............................................................................................................................................................................................125
26. Working environment.................................................................................................................... 127
26.1. First steps..................................................................................................................................................................................127
26.2. Compilation.............................................................................................................................................................................128
26.3. API...............................................................................................................................................................................................130
26.3.1. Cores folder..............................................................................................................................................................130
26.3.2. Libraries folder........................................................................................................................................................131
26.4. Updating the libraries..........................................................................................................................................................134
27. Interacting with Waspmote........................................................................................................... 135
27.1. Receiving XBee frames with Waspmote Gateway.....................................................................................................135
27.1.1. Waspmote Gateway..............................................................................................................................................135
27.1.2. Linux receiver..........................................................................................................................................................136
27.1.3. Windows receiver...................................................................................................................................................140
27.1.4. Mac-OS receiver.....................................................................................................................................................142
27.2. Meshlium..................................................................................................................................................................................143
27.2.1. What can I do with Meshlium?..........................................................................................................................143
27.2.2. How do they work together?.............................................................................................................................144
27.2.2.1. Meshlium Storage Options................................................................................................................144
27.2.2.2. Meshlium Connection Options........................................................................................................144
27.2.3. Capturing and storing sensor data in Meshlium from a Waspmote sensor network...................145
27.2.4. Capturer logs ..........................................................................................................................................................159
27.2.5. Sensors......................................................................................................................................................................160
27.2.6. Sending XBee frames from Meshlium to Waspmote................................................................................161
27.2.7. Interacting with 3rd party Cloud platforms.................................................................................................162
28. Documentation Changelog........................................................................................................... 163
29. Certifications................................................................................................................................... 166
29.1. CE.................................................................................................................................................................................................166
29.2. FCC..............................................................................................................................................................................................167
29.3. IC .................................................................................................................................................................................................168
29.4. Use of equipment characteristics....................................................................................................................................168
29.5. Limitations of use..................................................................................................................................................................168
30. Maintenance................................................................................................................................... 170
31. Disposal and recycling................................................................................................................... 171
1. Waspmote Kit
1.1. General and safety information
••
In this section, the term “Waspmote” encompasses both the Waspmote device itself and its modules and sensor boards.
••
Please read carefully through the document “General Conditions of Libelium Sale and Use”.
••
Do not let the electronic parts come into contact with any steel elements, to avoid injuries and burns.
••
NEVER submerge the device in any liquid.
••
Keep the device in a dry place and away from any liquids that might spill.
••
Waspmote contains electronic components that are highly sensitive and can be accessed from outside; handle the devi-
ce with great care and avoid hitting or scratching any of the surfaces.
••
Check the product specifications section for the maximum allowed power voltage and amperage range and always use
current transformers and batteries that work within that range. Libelium will not be responsible for any malfunctions
caused by using the device with any batteries, power supplies or chargers other than those supplied by Libelium.
••
Keep the device within the range of temperatures stated in the specifications section.
••
Do not connect or power the device with damaged cables or batteries.
••
Place the device in a location that can only be accessed by maintenance operatives (restricted area).
••
In any case, keep children away from the device at all times.
••
If there is an electrical failure, disconnect the main switch immediately and disconnect the 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 levels specified in the “Power Supplies”
section.
••
When using a battery as the power supply, whether in combination with a solar panel or not, be sure to use the voltage
and current levels specified in the “Power supplies” section.
••
If a software or hardware failure occurs, consult the Libelium Web Development section
••
Check that the frequencies and power levels of the radio communication modules and the integrated antennas are ap-
propriate for the location in which you intend to use the device.
••
The Waspmote device should be mounted in a protective enclosure, to protect it from environmental conditions such
as light, dust, humidity or sudden changes in temperature. The board should not be definitively installed “as is”, because
the electronic components would be left exposed to the open-air and could become damaged. For a ready-to-install
product, we advise our Plug & Sense! line.
DO NOT TRY TO RECHARGE THE NON-RECHARGEABLE BATTERY. IT MAY EXPLODE AND CAUSE INJURIES AND
DESTROY THE EQUIPMENT. DEVICES WITH NON-RECHARGEABLE BATTERIES MUST BE PROGRAMMED THROUGH
THE USB CABLE WITHOUT THE BATTERIES CONNECTED. PLEASE DOUBLE CHECK THIS CONDITION BEFORE
CONNECTING THE USB. DO NOT CONNECT EITHER UNDER ANY CIRCUMSTANCE THE SOLAR PANEL TO A DEVICE
WITH A NON-RECHARGEABLE BATTERY AS IT MAY EXPLODE AND CAUSE INJURIES AND DESTROY THE EQUIPMENT.
The document “General Conditions of Libelium Sale and Use” can be found at:
http://www.libelium.com/development/waspmote/technical_service
1.2. Conditions of use
General:
••
Read the “General and Safety Information” section carefully and keep the manual for future reference.
••
Read carefully the “General Conditions of Sale and Use of Libelium”. This document can be found at:
http://www.libelium.com/development/waspmote/technical_service. As specified in the Warranty document, the client
has 7 days from the day the order is received to detect any failure and report that to Libelium. Any other failure reported
after these 7 days may not be considered under warranty.
••
Use Waspmote in accordance with the electrical specifications and in the environments 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 final product.
This product must have an enclosure to protect it from dust, humidity and other environmental interactions. If the pro-
duct is to be used outside, the enclosure must have an IP-65 rating, at the minimum. For a ready-to-install product, we
advise our Plug & Sense! line.
••
Do not place Waspmote in contact with metallic surfaces; they could cause short-circuits which will permanently dama-
ge it.
Specific:
••
Reset and ON/OFF button: Handle with care, do not force activation or use tools (pliers, screwdrivers, etc) to handle it.
••
Battery: Only use the original lithium battery provided with Waspmote.
••
Mini USB connection: Only use mini USB, mod. B, compatible cables.
••
Solar panel connection: Only use the connector specified in the Power supplies section and always respect polarity.
••
Lithium battery connection: Only use the connector specified in the Battery section and always respect polarity.
••
Micro SD card connection: Only use 2GB maximum micro SD cards. HC cards are not compatible. There are many SD
card models; any of them has defective blocks, which are ignored when using the Waspmote’s SD library. However,
when using OTA, those SD blocks cannot be avoided, so that the execution could crash. Libelium implements a special
process to ensure the SD cards we provide will work fine with OTA. The only SD cards that Libelium can assure that
work correctly with Waspmote are the SD cards we distribute officially.
••
Micro SD card: Make sure Waspmote is switched off before inserting or removing the SD card. Otherwise, the SD card
could be damaged.
••
Micro SD card: Waspmote must not be switched off or reseted while there are ongoing read or write operations in the
SD card. Otherwise, the SD card could be damaged and data could be lost.
••
GSM/GPRS board connection: Only use the original Waspmote GSM/GPRS board.
••
3G/GPRS board connection: Only use the original Waspmote 3G/GPRS board.
••
XBee module connection: Waspmote allows the connection of any module from the XBee family, respect polarity when
connecting (see print).
••
Antenna connections: Each of the antennas that can be connected to Waspmote (or to its boards) must be connected
using the correct type of antenna and connector in each case, or using the correct adaptors.
••
USB voltage adaptors: To power and charge the Waspmote battery, use only the original accessories: 220V AC – USB
adaptor and 12V DC (car cigarette lighter) – USB adaptor
Usage and storage recommendations for the batteries:
The rechargeable, ion-lithium batteries, like the ones provided by Libelium (capacity of 6600 mAh), have certain characteristics
which must be taken into account:
••
Charge the batteries for 24 hours before a deployment. The aim is to have the charge of the batteries at 100% of their
capacity before a long period in which they must supply current, but it is not necessary to improve the performance.
••
It is not advised to let the charge of the batteries go below 20% of capacity, since they suffer stress. Thus, it is not advised
to wait for the battery to be at 0% to charge it.
••
Any battery self-discharges: connected to Waspmote or not, the battery loses charges by itself.
••
Maximum capacity loss: as the charge and discharge cycles happen, the maximum charge capacity is reduced.
••
Batteries work better in cool environments: their performance is better at 10 ºC than at 30 ºC.
••
At temperatures below 0 ºC, batteries can supply current (discharge), but the charge process cannot be done. In parti-
cular:
--
discharge range = [-10, 60] ºC
--
charge range = [0, 45] ºC
It is not reccommended to have the non-rechargeable batteries (13000, 26000, 52000 mA·h) connected to Waspmote when the
USB cable is conneted too. The reason is, Waspmote will try to inject current in them if the USB is connected. This is dangerous
for the good working of a non-rechargeable battery. It could be damaged or even damage Waspmote. That is to say, when you
need to upload code to Waspmote via USB, disconnect the battery if it is non-rechargeable. That applies to Waspmote OEM, but
not to the Plug & Sense! line, since its hardware is modified to avoid this.
Plug & Sense! line:
Libelium may provide the nodes with enclosures which are suitable to operate outdoors. The user, as final installer, must take
great care when handling the product. We advise to read the Plug & Sense! Technical Guide to enlarge the life of your devices.
Remember that inappropriate use or handling of Waspmote will immediately invalidate the warranty.
For further information, please visit http://www.libelium.com/development/waspmote
Connect the antenna to the wireless module
••
Place the wireless module in Waspmote
••
Place the wireless module in Waspmote Gateway
Connect the antenna in the GSM/GPRS module
••
Place the GSM/GPRS module in Waspmote
••
Place the SD card in Waspmote
Connect the battery in Waspmote
••
Connect the sensor board
••
Switch it on
Waspmote battery disconnection
Use the pick supplied by Libelium in order to disconnect Waspmote battery.
Insert the pick on the slot of the battery connector and pull straight out.
Do not pull the battery cables.
Battery handling instructions
In order to prevent from cable breaking, avoid leaving battery freely suspended.
Use a nylon clamp in order to attach battery to Waspmote.
Waspmote Plug & Sense! - Encapsulated Line
2. Waspmote Plug & Sense! - Encapsulated Line
Waspmote is the original line in which developers have a total control over the hardware device. You can physically access to the
board and connect new sensors or even embed it in your own products as an electronic sensor device.
The Waspmote Plug & Sense! line allows developers to forget about electronics and focus on services and applications. You can
deploy wireless sensor networks in an easy and scalable way ensuring minimum maintenance costs. The platform consists of
a robust waterproof enclosure with specific external sockets to connect the sensors, the solar panel, the antenna and even the
USB cable in order to reprogram the node. It has been specially designed to be scalable, easy to deploy and maintain.
Note: For a complete reference guide download the “Waspmote Plug & Sense! Technical Guide” in the Development section of the
Libelium website.
2.1. Quick Overview
2.1.1. Features
••
Robust waterproof IP65 enclosure
••
Add or change a sensor probe in seconds
••
Solar powered with internal and external panel options
••
Radios available: ZigBee, 802.15.4, WiFi, 868MHz, 900MHz, LoRaWAN, LoRa, Sigfox, 3G/GPRS and Bluetooth Low Energy
••
Over the air programming (OTAP) of multiple nodes at once
••
Special holders and brackets ready for installation in street lights and building fronts
••
Graphical and intuitive programming interface
••
External, contactless reset with magnet
••
External SIM connector for GPRS or 3G models
2.1.2. Sensor Probes
Sensor probes can be easily attached by just screwing them into the bottom sockets. This allows you to add new sensing
capabilities to existing networks just in minutes. In the same way, sensor probes may be easily replaced in order to ensure the
lowest maintenance cost of the sensor network.
Figure: Connecting a sensor probe to Waspmote Plug & Sense!
Waspmote Plug & Sense! - Encapsulated Line
2.1.3. Solar Powered
Battery can be recharged using the internal or external solar panel options.
The external solar panel is mounted on a 45º holder which ensures the maximum performance of each outdoor installation.
Figure: Waspmote Plug & Sense! powered by an external solar panel
For the internal option, the solar panel is embedded on the front of the enclosure, perfect for use where space is a major
challenge.
Figure: Internal solar panel
Waspmote Plug & Sense! - Encapsulated Line
Figure: Waspmote Plug & Sense! powered by an internal solar panel
2.1.4. Programming the Nodes
Waspmote Plug & Sense! can be reprogrammed in two ways:
The basic programming is done from the USB port. Just connect the USB to the specific external socket and then to the computer
to upload the new firmware.
Figure: Programming a node
Waspmote Plug & Sense! - Encapsulated Line
Over the Air Programming is also possible once the node has been installed. With this technique you can reprogram wirelessly
one or more Waspmote sensor nodes at the same time by using a laptop and the Waspmote Gateway.
Figure: Typical OTAP process
2.1.5. Radio Interfaces
Model
Protocol
Frequency
txPower
Sensitivity
Range *
XBee-802.15.4-Pro
802.15.4
2.4GHz
100mW
-100dBm
7000m
XBee-ZB-Pro
ZigBee-Pro
2.4GHz
50mW
-102dBm
7000m
XBee-868
RF
868MHz
315mW
-112dBm
12km
XBee-900
RF
900MHz
50mW
-100dBm
10Km
LoRaWAN
LoRaWAN
868, 900 and 433 MHz
bands
up to 18.5 dBm
-136dBm
- km - Typical
base station
range
LoRa
RF
868 and 900 MHz
14 dBm
-137dBm
21+Km
Sigfox
Sigfox
868MHz
14 dBm
-126dBm
- km - Typical
base station
range
WiFi
802.11b/g
2.4GHz
0dBm - 12dBm
-83dBm
50m-500m
GPRS Pro and GPRS+GPS
-
850MHz/900MHz/
1800MHz/1900MHz
2W(Class4) 850MHz/900MHz,
1W(Class1) 1800MHz/1900MHz
-109dBm
- Km - Typical
carrier range
3G/GPRS
-
Europe version: Dual-
band UMTS, tri-band
GSM/GPRS/EDGE
America/Australia
version: Dual-Band:
UMTS, quad-Band GSM/
GPRS/EDGE
UMTS 0.25 W,
GSM 2 W,
DCS/PCS 1 W
-106dBm
- Km - Typical
carrier range
Bluetooth Low Energy
Bluetooth v.4.0 /
Bluetooth Smart
2.4GHz
3dBm
-103dBm
100m
* Line of sight, Fresnel zone clearance and 5dBi dipole antenna.
Waspmote Plug & Sense! - Encapsulated Line
2.1.6. Program in minutes
In order to program the nodes an intuitive graphic interface has been developed. Developers just need to fill a web form in
order to obtain the complete source code for the sensor nodes. This means the complete program for an specific application
can be generated just in minutes. Check the Code Generator to see how easy it is at:
http://www.libelium.com/development/plug_&_sense/sdk_and_applications/code_generator
Figure: Code Generator
2.1.7. Data to the Cloud
The Sensor data gathered by the Waspmote Plug & Sense! nodes is sent to the Cloud by Meshlium, the Gateway router specially
designed to connect Waspmote sensor networks to the Internet via Ethernet, WiFi and 3G interfaces.
Thanks to Meshlium’s new feature, the Sensor Parser, now it is easier to receive any frame, parse it and store the data into a local
or external Data Base.
Figure: Meshlium
Waspmote Plug & Sense! - Encapsulated Line
2.1.8. Models
There are some defined configurations of Waspmote Plug & Sense! depending on which sensors are going to be used. Waspmote
Plug & Sense! configurations allows connecting up to six sensor probes at the same time.
Each model takes a different conditioning circuit to enable the sensor integration. For this reason each model allows to connect
just its specific sensors.
This section describes each model configuration in detail, showing the sensors which can be used in each case and how to
connect them to Waspmote. In many cases, the sensor sockets accept the connection of more than one sensor probe. See the
compatibility table for each model configuration to choose the best probe combination for the application.
It is very important to remark that each socket is designed only for one specific sensor, so they are not interchangeable.
Always be sure you connected probes in the right socket, otherwise they can be damaged.
Figure: Identification of sensor sockets
Waspmote Plug & Sense! - Encapsulated Line
2.1.8.1. Smart Environment
Smart Environment model is designed to monitor environmental parameters such as temperature, humidity, atmospheric
pressure and some types of gases. The main applications for this Waspmote Plug & Sense! configuration are city pollution
measurement, emissions from farms and hatcheries, control of chemical and industrial processes, forest fires, etc. Sensors are
calibrated for more accurate measurements. Go to the Applications section in the Libelium website for a complete list of services.
Figure: Smart Environment Waspmote Plug & Sense! model
Waspmote Plug & Sense! - Encapsulated Line
Sensor sockets are configured as shown in the figure below.
Sensor
Socket
Sensor probes allowed for each sensor socket
Parameter
Reference
A
Temperature
9203
Carbon monoxide - CO
9229
Methane - CH4
9232
Ammonia – NH3
9233
Liquefied Petroleum Gases: H2, CH4, ethanol, isobutene
9234
Air pollutants 1: C4H10, CH3CH2OH, H2, CO, CH4
9235
Air pollutants 2: C6H5CH3, H2S, CH3CH2OH, NH3, H2
9236
Alcohol derivates: CH3CH2OH, H2, C4H10, CO, CH4
9237
B
Humidity
9204
Atmospheric pressure
9250
C
Carbon dioxide - CO2
9230
D
Nitrogen dioxide - NO2
9238 , 9238 -B
E
Ozone - O3
9258 , 9258 -B
Hydrocarbons - VOC
9201 , 9201-B
Oxygen - O2
9231
F
Carbon monoxide - CO
9229
Methane - CH4
9232
Ammonia – NH3
9233
Liquefied Petroleum Gases: H2, CH4, ethanol, isobutene
9234
Air pollutants 1: C4H10, CH3CH2OH, H2, CO, CH4
9235
Air pollutants 2: C6H5CH3, H2S, CH3CH2OH, NH3, H2
9236
Alcohol derivates: CH3CH2OH, H2, C4H10, CO, CH4
9237
Figure: Sensor sockets configuration for Smart Environment model
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
Waspmote Plug & Sense! - Encapsulated Line
2.1.8.2. Smart Environment PRO
The Smart Environment PRO model has been created as an evolution of Smart Environment. It enables the user to implement
pollution, air quality, industrial, environmental or farming projects with high requirements in terms of high accuracy, reliability
and measurement range as the sensors come calibrated from factory.
Figure: Smart Environment PRO Waspmote Plug & Sense! model
Waspmote Plug & Sense! - Encapsulated Line
Sensor sockets are configured as shown in the figure below.
Sensor
Socket
Sensor probes allowed for each sensor socket
Parameter
Reference
A, B, C and F
Carbon Monoxide (CO) [Calibrated]
9371-P
Carbon Dioxide (CO2) [Calibrated]
9372-P
Oxygen (O2) [Calibrated]
9373-P
Ozone (O3) [Calibrated]
9374-P
Nitric Oxide (NO) [Calibrated]
9375-P
Nitric Dioxide (NO2) [Calibrated]
9376-P
Sulfur Dioxide (SO2) [Calibrated]
9377-P
Ammonia (NH3) [Calibrated]
9378-P
Methane (CH4) and Combustible Gas [Calibrated]
9379-P
Hydrogen (H2) [Calibrated]
9380-P
Hydrogen Sulfide (H2S) [Calibrated]
9381-P
Hydrogen Chloride (HCl) [Calibrated]
9382-P
Phosphine (PH3) [Calibrated]
9384-P
Ethylene (ETO) [Calibrated]
9385-P
Chlorine (Cl2) [Calibrated]
9386-P
D
Particle Matter (PM1 / PM2.5 / PM10) - Dust
9387-P
E
Temperature, Humidity and Pressure
9370-P
Figure: Sensor sockets configuration for Smart Environment PRO model
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
Waspmote Plug & Sense! - Encapsulated Line
2.1.8.3. Smart Security
The main applications for this Waspmote Plug & Sense! configuration are perimeter access control, liquid presence detection
and doors and windows openings.
Figure: Smart Security Waspmote Plug & Sense! model
Note: The probes attached in this photo could not match the final location. See next table for the correct configuration.
Waspmote Plug & Sense! - Encapsulated Line
Sensor
Socket
Sensor probes allowed for each sensor socket
Parameter
Reference
A
Temperature + Humidity (Sensirion)
9247
B
Liquid flow
9296, 9297, 9298
C
Presence - PIR
9212
D
Luminosity (LDR)
9205
Liquid level
9239, 9240, 9242
Liquid presence
9243, 9295
Hall effect
9207
E
Luminosity (LDR)
9205
Liquid level
9239, 9240, 9242
Liquid presence
9243
Hall effect
9207
F
Luminosity (LDR)
9205
Liquid level
9239, 9240, 9242
Liquid presence
9243
Hall effect
9207
Figure: Sensor sockets configuration for Smart Security model
As we see in the figure below, thanks to the directionable probe, the presence sensor probe (PIR) may be placed in different
positions. The sensor can be focused directly to the point we want.
Figure: Configurations of the Presence sensor probe (PIR)
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
Waspmote Plug & Sense! - Encapsulated Line
2.1.8.4. Smart Water
The Smart Water model has been conceived to facilitate the remote monitoring of the most relevant parameters related to
water quality. With this platform you can measure more than 6 parameters, including the most relevant for water control such
as dissolved oxygen, oxidation-reduction potential, pH, conductivity and temperature. An extremely accurate turbidity sensor
has been integrated as well.
The Smart Water Ions line is complementary for these kinds of projects, enabling the control of concentration of ions like
Ammonium (NH4
+), Bromide (Br-), Calcium (Ca2+), Chloride (Cl-), Cupric (Cu2+), Fluoride (F-), Iodide (I-), Lithium (Li+), Magnesium
(Mg2+), Nitrate (NO3
-), Nitrite (NO2
-), Perchlorate (ClO4
-), Potassium (K+), Silver (Ag+), Sodium (Na+) and pH. Take a look to the Smart
Water Ions line in the next section.
Refer to Libelium website for more information.
Figure: Smart Water Plug&Sense! model
Waspmote Plug & Sense! - Encapsulated Line
Sensor sockets are configured as shown in the figure below.
Sensor
Socket
Sensor probes allowed for each sensor socket
Parameter
Reference
B
pH
9328
Oxidation-Reduction Potential (ORP)
9329
C
pH
9328
Oxidation-Reduction Potential (ORP)
9329
D
Soil/Water Temperature
9255 (included by default)
E
Dissolved Oxygen (DO)
9327
F
Conductivity
9326
Turbidity
9353
Figure: Sensor sockets configuration for Smart Water model
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
Waspmote Plug & Sense! - Encapsulated Line
2.1.8.5. Smart Water Ions
The Smart Water Ions models specialize in the measurement of ions concentration for drinking water quality control, agriculture
water monitoring, swimming pools or waste water treatment.
The Smart Water line is complementary for these kinds of projects, enabling the control of parameters like turbidity, conductivity,
oxidation-reduction potential and dissolved oxygen. Take a look to the Smart Water line in the previous section. Refer to Libelium
website for more information.
There are 3 variants for Smart Water Ions: Single, Double and PRO. This is related to the type of ion sensor that each variant can
integrate. Next section describes each configuration in detail.
Figure: Smart Water Ions Waspmote Plug & Sense! model
Waspmote Plug & Sense! - Encapsulated Line
Single
This variant includes a Single Junction Reference Probe, so it can read all the single type ion sensors.
Sensor sockets are configured as shown in the table below.
Sensor
Socket
Sensor probes allowed for each sensor socket
Parameter
Reference
A, B, C and D
Calcium Ion (Ca2+)
9352
Fluoride Ion (F-)
9353
Fluoroborate Ion (BF4
-)
9354
Nitrate Ion (NO3
-)
9355
pH (for Smart Water Ions)
9363
E
Single Junction Reference
9350 (included by default)
F
Soil/Water Temperature
9255 (included by default)
Figure: Sensor sockets configuration for Smart Water Ions model, single variant
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
Waspmote Plug & Sense! - Encapsulated Line
Double
This variant includes a Double Junction Reference Probe, so it can read all the double type ion sensors.
Sensor sockets are configured as shown in the table below.
Sensor
Socket
Sensor probes allowed for each sensor socket
Parameter
Reference
A, B, C and D
Bromide Ion (Br-)
9356
Chloride Ion (Cl-)
9357
Cupric Ion (Cu2+)
9358
Iodide Ion (I-)
9360
Silver Ion (Ag+)
9362
pH (for Smart Water Ions)
9363
E
Double Junction Reference
9351 (included by default)
F
Soil/Water Temperature
9255 (included by default)
Figure: Sensor sockets configuration for Smart Water Ions model, double variant
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
Waspmote Plug & Sense! - Encapsulated Line
Pro
This special variant integrates extreme quality sensors, with better performance than the Single or Double lines. In this case,
there is only one type of reference probe and up to 16 different ion parameters can be analyzed in 4 sockets.
Sensor sockets are configured as shown in the table below.
Sensor
Socket
Sensor probes allowed for each sensor socket
Parameter
Reference
A, B, C or D
Ammonium Ion (NH4
+) [PRO]
9412
Bromide Ion (Br-) [PRO]
9413
Calcium Ion (Ca2+) [PRO]
9414
Chloride Ion (Cl-) [PRO]
9415
Cupric Ion (Cu2+) [PRO]
9416
Fluoride Ion (F-) [PRO]
9417
Iodide Ion (I-) [PRO]
9418
Lithium Ion (Li+) [PRO]
9419
Magnesium Ion (Mg2+) [PRO]
9420
Nitrate Ion (NO3
-) [PRO]
9421
Nitrite Ion (NO2
-) [PRO]
9422
Perchlorate Ion (ClO4
-) [PRO]
9423
Potassium Ion (K+) [PRO]
9424
Silver Ion (Ag+) [PRO]
9425
Sodium Ion (Na+) [PRO]
9426
pH [PRO]
9411
E
Reference Sensor Probe [PRO]
9410 (included by default)
F
Soil/Water Temperature
9255 (included by default)
Figure: Sensor sockets configuration for Smart Water Ions model, PRO variant
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
Waspmote Plug & Sense! - Encapsulated Line
2.1.8.6. Smart Cities
The main applications for this Waspmote Plug & Sense! model are noise maps (monitor in real time the acoustic levels in the
streets of a city), air quality, waste management, structural health, smart lighting, etc. Refer to Libelium website for more
information.
Figure: Smart Cities Waspmote Plug & Sense! model
Waspmote Plug & Sense! - Encapsulated Line
Sensor sockets are configured as shown in the figure below.
Sensor
Socket
Sensor probes allowed for each sensor socket
Parameter
Reference
A
Temperature
9203
Soil temperature
86949*
Ultrasound (distance measurement)
9246
B
Humidity
9204
Ultrasound (distance measurement)
9246
C
Luminosity (LDR)
9205
D
Noise sensor (dBA)
9259
F
Linear displacement
9319
* Ask Libelium Sales Department for more information.
Figure: Sensor sockets configuration for Smart Cities model
As we see in the figure below, thanks to the directionable probe, the ultrasound sensor probe may be placed in different
positions. The sensor can be focused directly to the point we want to measure.
Figure: Configurations of the ultrasound sensor probe
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
Waspmote Plug & Sense! - Encapsulated Line
2.1.8.7. Smart Parking
The Plug & Sense! Smart Parking node allows to detect available parking spots by placing the node on the pavement. It works
with a magnetic sensor which detects when a vehicle is present or not.
The node benefits from Sigfox and LoRaWAN technologies (868 and 900 MHz bands), getting ubiquitous coverage with few
base stations. The device is very optimized in terms of power consumption, resulting in a long battery life. Its small size and the
robust and surface-mount enclosure enables a fast installation, without the need of digging a hole in the ground. Finally, the
developer does not need to program the node, but just configure some key parameters. Remote management and bidirectional
communication allow to change parameters from the Cloud.
Figure: Plug & Sense! Smart Parking node
There are specific documents for parking applications at Libelium website. Refer to Smart Parking Technical Guide to see
typical applications for this model and how to make a good installation.
Waspmote Plug & Sense! - Encapsulated Line
2.1.8.8. Smart Agriculture
The Smart Agriculture models allow to monitor multiple environmental parameters involving a wide range of applications. It
has been provided with sensors for air and soil temperature and humidity (Sensirion), solar visible radiation, wind speed and
direction, rainfall, atmospheric pressure, etc.
The main applications for this Waspmote Plug & Sense! model are precision agriculture, irrigation systems, greenhouses, weather
stations, etc. Refer to Libelium website for more information.
Two variants are possible for this model, normal and PRO. Next section describes each configuration in detail.
Figure: Smart Agriculture Waspmote Plug & Sense! model
Waspmote Plug & Sense! - Encapsulated Line
Normal
Sensor sockets are configured as shown in the figure below.
Sensor
Socket
Sensor probes allowed for each sensor socket
Parameter
Reference
A
Humidity + Temperature (Sensirion)
9247
B
Atmospheric pressure
9250
C
Soil temperature
86949*
Soil moisture
9248
D
Weather Station WS-3000 (anemometer + wind vane +
pluviometer)
9256
E
Soil moisture
9248
F
Leaf wetness
9249
Soil moisture
9248
* Ask Libelium Sales Department for more information.
Figure: Sensor sockets configuration for Smart Agriculture model
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
PRO
Sensor sockets are configured as shown in the figure below.
Sensor
Socket
Sensor probes allowed for each sensor socket
Parameter
Reference
A
Humidity + Temperature (Sensirion)
9247
B
Soil temperature
9255
C
Solar radiation
9251, 9257
D
Soil temperature
86949*
Soil moisture
9248
E
Dendrometers
9252, 9253, 9254
Soil moisture
9248
F
Lear wetness
9249
Soil moisture
9248
* Ask Libelium Sales Department for more information.
Figure: Sensor sockets configuration for Smart Agriculture PRO model
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
Waspmote Plug & Sense! - Encapsulated Line
2.1.8.9. Ambient Control
This model is designed to monitor main environment parameters in an easy way. Only three sensor probes are allowed for this
model, as shown in next table.
Figure: Ambient Control Waspmote Plug & Sense! model
Waspmote Plug & Sense! - Encapsulated Line
Sensor sockets are configured as it is shown in figure below.
Sensor
Socket
Sensor probes allowed for each sensor socket
Parameter
Reference
A
Humidity + Temperature (Sensirion)
9247
B
Luminosity (LDR)
9205
C
Luminosity (Luxes accuracy)
9325
D
Not used
-
E
Not used
-
F
Not used
-
Figure: Sensor sockets configuration for Ambient Control model
As we see in the figure below, thanks to the directionable probe, the Luminosity sensor (Luxes accuracy) probe may be placed
in different positions. The sensor can be focused directly to the light source we want to measure.
Figure: Configurations of the Luminosity sensor probe (luxes accuracy)
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
Waspmote Plug & Sense! - Encapsulated Line
2.1.8.10. Radiation Control
The main application for this Waspmote Plug & Sense! configuration is to measure radiation levels using a Geiger sensor. For
this model, the Geiger tube is already included inside Waspmote, so the user does not have to connect any sensor probe to the
enclosure. The rest of the other sensor sockets are not used.
Figure: Radiation Control Waspmote Plug & Sense! model
Sensor sockets are not used for this model.
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
3.1. Modular Architecture
Waspmote is based on a modular architecture. The idea is to integrate only the modules needed in each device. These modules
can be changed and expanded according to needs.
The modules available for integration in Waspmote are categorized in:
--
ZigBee/802.15.4 XBee modules (2.4GHz, 868MHz, 900MHz)
--
LoRaWAN module (433/868/900MHz)
--
LoRa module (868/900MHz)
--
Sigfox module (868/900MHz)
--
GSM/GPRS module (Quadband: 850MHz/900MHz/1800MHz/1900MHz)
--
3G/GPRS module (Dual-Band WCDMA/UMTS 900/2100 MHz and Tri-Band GSM/GPRS/EDGE 850/900/1800 MHz)
--
WiFi module
--
Bluetooth modules: Bluetooth Low Energy and Bluetooth Pro
--
NFC/RFID module
--
Sensor modules (Sensor boards)
--
Storage module: SD Memory Card
3.2. Specifications
••
Microcontroller: ATmega1281
••
Frequency: 14.7456 MHz
••
SRAM: 8KB
••
EEPROM: 4KB
••
FLASH: 128KB
••
SD Card: 2GB
••
Weight: 20gr
••
Dimensions: 73.5 x 51 x 13 mm
••
Temperature Range: [-10ºC, +65ºC]
Figure: Main Waspmote components – Top side
Main Waspmote components – Bottom side
3.3. Block Diagram
Data signals:
Figure: Waspmote block diagrams – Data signals
Figure: Waspmote block diagrams – Power signals
3.4. Electrical Data
Operational values:
--
Minimum operational battery voltage
3.3 V
--
Maximum operational battery voltage
4.2V
--
USB charging voltage
5 V
--
Solar panel charging voltage
6 - 12 V
--
Battery charging current from USB 100 mA (max)
--
Battery charging current from solar panel
280 mA (max)
Absolute maximum values:
--
Voltage in any pin
[-0.5 V, +3.8 V]
--
Maximum current from any digital I/O pin 40 mA
--
USB power voltage
7V
--
Solar panel power voltage
18V
--
Charged battery voltage
4.2 V
Waspmote can communicate with other external devices through the using different input/output ports.
Figure: I/O connectors in Waspmote
Sensor connector:
ANALOG
DIGITAL 8
DIGITAL 6
DIGITAL 4
DIGITAL 2
RESERVED
ANALOG 6
ANALOG 4
ANALOG 2
3V3 SENSOR POWER
GPS POWER
SDA
3V3 SENSOR POWER
GND
DIGITAL 7
DIGITAL 5
DIGITAL 3
DIGITAL 1
ANALOG 7
ANALOG 5
ANALOG 3
ANALOG 1
5V SENSOR POWER
SCL
GND
ANALOG 6
3V3 SENSOR
GND
ANALOG 7
3V3 SENSOR
Figure: Description of sensor connector pins
Auxiliary SPI-UART connector:
AUX SERIAL 1TX
AUX SERIAL 1RX
AUX SERIAL 2RX
AUX SERIAL 2TX
BATTERY
GND
SCK
RXD1
TXD1
3V3 SENSOR POWER
MOSI
MISO
Figure: Description of auxiliary SPI-UART connector pins
Waspmote has 7 accessible analog inputs in the sensor connector. Each input is directly connected to the microcontroller. The
microcontroller uses a 10 bit successive approximation analog to digital converter (ADC). The reference voltage value for the
inputs is 0V (GND). The maximum value of input voltage is 3.3V which corresponds with the microcontroller’s general power
voltage.
To obtain input values, the function analogRead(analog input) is used, the function’s input parameter will be the name of
the input to be read “ANALOG1, ANALOG2…” (see sensor connector figure). The value obtained from this function will be an
integer number between 0 and 1023, 0 corresponds to 0 V and 1023 to 3.3 V.
The analog input pins can also be used as digital input/output pins. If these pins are going to be used as digital ones, the
following correspondence list for pin names must be taken into account:
Analog pin
Digital pin
ANALOG1
=>
14
ANALOG2
=>
15
ANALOG3
=>
16
ANALOG4
=>
17
ANALOG5
=>
18
ANALOG6
=>
19
ANALOG7
=>
20
{
val = analogRead(ANALOG1);
}
3.5.2. Digital
Waspmote has digital pins which can be configured as input or output depending on the needs of the application. The voltage
values corresponding to the different digital values would be:
--
0V for logic 0
--
3.3V for logic 1
The instructions for control of digital pins are:
{
// set DIGITAL3 pin as input and read its value
pinMode(DIGITAL3, INPUT);
val = digitalRead(DIGITAL3);
// set DIGITAL3 pin as output and set it LOW
pinMode(DIGITAL3 ,OUTPUT);
digitalWrite(DIGITAL3, LOW);
}
3.5.3. PWM
DIGITAL1 pin can also be used as output PWM (Pulse Width Modulation) with which an analog signal can be “simulated”. It
is actually a square wave between 0V and 3.3V for which the proportion of time when the signal is high can be changed (its
working cycle) from 0% to 100%, simulating a voltage of 0V (0%) to 3.3V (100%).The resolution is 8 bit, so up to 255 values
between 0-100% can be configured. The instruction to control the PWM output is analogWrite(DIGITAL1, value); where
value is the analog value (0-255).
{
analogWrite(DIGITAL1, 127);
}
There are two UARTs in Waspmote: UART0 and UART1. Besides, there are several ports which might be connected to these
UARTs through two different multiplexers, one for each UART.
••
UART0 is shared by the USB port and the Socket0. This socket is used for XBee modules, LoRaWAN module, LoRa module,
Sigfox module, RFID/NFC module, Bluetooth modules, WiFi module, RS-485 module, etc. The multiplexer in this UART
controls the data signal which by default is always switched to Socket0. When the USB needs to send info through the
UART0, the multiplexer is momentarily switched to the USB port and set back again to Socket0 after printing.
••
UART1 is shared by four ports: Socket1, Auxiliar1 and Auxiliar2 sockets. It is possible to select in the same program which
of the four ports is connected to UART1 in the microcontroller. UART1 multiplexer configuration is carried out using the
following instructions:
{
Utils.setMuxAux1(); // set Auxiliar1 socket
Utils.setMuxAux2(); // set Auxiliar2 socket
Utils.setMuxGPS(); // set GPS socket
Utils.setMuxSocket1(); // set Socket1
}
3.5.5. I2C
The I2C communication bus is also used in Waspmote where two devices are connected in parallel: the accelerometer and the
RTC . In all cases, the microcontroller acts as master while the other devices connected to the bus are slaves.
3.5.6. SPI
The SPI port on the microcontroller is used for communication with the micro SD card. All operations using the bus are performed
clearly by the specific library. The SPI port is also available in the SPI/UART connector.
3.5.7. USB
USB is used in Waspmote for communication with a computer or compatible USB devices. This communication allows the
microcontroller’s program to be loaded.
For USB communication, microcontroller’s UART0 is used. The FT232RL chip carries out the conversion to USB standard.
3.6. Real Time Clock - RTC
Waspmote has a built in Real Time Clock – RTC, which keeps it informed of the time. This allows Waspmote to be programmed
to perform time-related actions such as:
“Sleep for 1h 20 min and 15sec, then wake up and perform the following action”
Or even programs to perform actions at absolute intervals, e.g.:
“Wake on the 5th of each month at 00:20 and perform the following action”
All RTC programming and control is done through the I2C bus.
Alarms:
Alarms can be programmed in the RTC specifying day/hour/minute/second. That allows total control about when the mote
wakes up to capture sensor values and perform actions programmed on it. This allows Waspmote to be in the saving energy
modes (Deep Sleep and Hibernate) and makes it wake up just at the required moment.
As well as relative alarms, periodic alarms can be programmed by giving a time measurement, so that Waspmote reprograms its
alarm automatically each time one is triggered.
The RTC chosen is the Maxim DS3231SN, which operates at a frequency of 32.768Hz (a second divisor value which allows it to
quantify and calculate time variations with high precision).
The DS3231SN is one of the most accurate clocks on the market because of its internal compensation mechanism for the
oscillation variations produced in the quartz crystal by changes in temperature (Temperature Compensated Crystal Oscillator
– TCXO).
Most RTCs on the market have a variation of ± 20ppm which is equivalent to a 1.7s loss of accuracy per day (10.34min/year),
however, the model chosen for Waspmote has a loss of just ± 2ppm, which equates to variation of 0.16s per day (1min/year).
The first figure above shows the temperature variation curve in a typical commercial clock, and the second figure, that for the
DS3231SN model built into Waspmote. As can be seen, variations in accuracy are practically zero at room temperature and
minimal when moved to the ends of the temperature scale.
(For more information about clock calibrating methods in real time, consult web page:
http://www.maxim-ic.com/appnotes.cfm/an_pk/3566)
The recalibration process of the oscillation crystal is carried out thanks to the data received by the RTC’s internal temperature
sensor. The value of this digital sensor can be accessed by Waspmote through the I2C bus, which lets it know the temperature
of the board at anytime in the range of -40ºC to +85ºC with an accuracy of 0.25°C. For more information about the acquisition
of this value by the microprocessor, see the section “Sensors in Waspmote → Temperature”.
Note: the RTC’s internal temperature sensor is only meant for the time derive compensation, but not for common air temperature
sensing (we advise our Sensor Boards for that).
The RTC is powered by the battery. When the mote is connected, the RTC is powered through the battery, but take into account
that if the battery is removed or out of load, then time data will be not maintained. That is why we suggest to use RTC time like
‘relative’ and not ‘absolute’ (see Programming Guide for more info).
A coin or button battery is not needed. They have a limited life and therefore Waspmote can have a much longer power life
expectancy. This is so because the RTC is powered from the “main” battery which has a much bigger charge.
The RTC is responsible for waking Waspmote up from 2 of the maximum energy saving modes Deep Sleep and Hibernate. This
makes possible for the Waspmote to use its battery just to power the RTC in sleep modes. The RTC controls when it has to wake
Waspmote up and perform a particular action. This allows a consumption of 0.06μA to be obtained in the Hibernate mode. See
sections “Energy System” → Sleep mode and Deepsleep mode”.
Related API libraries: WaspRTC.h, WaspRTC.cpp
All information about their programming and operation can be found in the document: RTC Programming Guide.
All the documentation is located in the Development section in the Libelium website.
Figure: Uncompensated variation curve
Figure: Compensated variation curve
Source: Maxim-ic.com
Figure: Visual indicator LEDs
••
Charging battery LED indicator
A red LED indicating that there is a battery connected in Waspmote which is being charged, the charging can be done
through a mini USB cable or through a solar panel connected to Waspmote. Once the battery is completely charged, the
LED switches off automatically.
••
LED 0 – programmable LED
A green indicator LED is connected to the microcontroller. It is totally programmable by the user from the program code. In
addition, the LED 0 indicates when Waspmote resets, blinking each time a reset on the board is carried out.
••
LED 1 – programmable LED
A red indicator LED is connected to the microcontroller. It is totally programmable by the user from the program code.
••
USB Power LED indicator
A green LED which indicates when Waspmote is connected to a compatible USB port either for battery charging or
programming. When the LED is on it indicates that the USB cable is connected correctly, when the USB cable is removed
the LED will switch off automatically.
Programming
LED0 and LED1 are programmable. The functions for handling these LEDs are Utils.setLED(LED_SELECTED, LED_MODE)
and Utils.getLED(LED_SELECTED) and Utils.blinkLEDs() (see the API manual for more information about these
functions).
The other two LEDs switch on and off automatically according to their function.
{
Utils.setLED(LED0, LED_ON);
Utils.setLED(LED1, LED_OFF);
Utils.blinkLEDS(1000);
}
Architecture and System
4. Architecture and System
4.1. Concepts
The Waspmote’s architecture is based on the Atmel ATMEGA 1281 microcontroller. This processing unit starts executing the
bootloader binary, which is responsible for loading into the memory the compiled programs and libraries previously stored in
the FLASH memory, so that the main program that has been created can finally begin running.
When Waspmote is connected and starts the bootloader, there is a waiting time (62.5ms) before beginning the first instruction,
this time is used to start loading new compiled programs updates. If a new program is received from the USB during this time,
it will be loaded into the FLASH memory (128KB) substituting already existing programs. Otherwise, if a new program is not
received, the last program stored in the memory will start running.
The structure of the codes is divided into 2 basic parts: setup and loop. Both parts of the code have sequential behaviour,
executing instructions in the set order.
The setup is the first part of the code, which is only run once when the code is initialized. In this part it is recommended to
include the initialization of the modules which are going to be used, as well as the part of the code which is only important
when Waspmote is started.
The part named loop runs continuously, forming an infinite loop. Because of the behavior of this part of the code, the use of
interruptions is recommended to perform actions with Waspmote.
A common programming technique to save energy would be based on blocking the program (either keeping the micro awake
or asleep in particular cases) until some of interruptions available in Waspmote show that an event has occurred. This way, when
an interruption is detected the associated function, which was previously stored in an interruption vector, is executed.
To be able to detect the capture of interruptions during the execution of the code, a series of flags have been created and will
be activated to indicate the event which has generated the interruption (see chapters “Interruptions” and “Energy System”).
Figure: Blocking loop, interruption appears and is dealt with
When Waspmote is reset or switched on, the code starts again from the setup function and then the loop function.
By default, variable values declared in the code and modified in execution will be lost when a reset occurs or there is no battery.
To store values permanently, it is necessary to use the microcontroller’s EEPROM (4KB) non-volatile memory. EEPROM addresses
from 0 to 1023 are used by Waspmote to save important data, so they must not be over-written. Thus, the available storage
addresses go from 1024 to 4095. Another option is to use of the high capacity 2GB SD card.
Architecture and System
4.2. Timers
Waspmote uses a quartz oscillator which works at a frequency of 14.7456 MHz as a system clock. In this way, every 125ns the
microcontroller runs a low level (machine language) instruction. It must be taken into account that each line of C++ code of a
program compiled by Waspmote includes several instructions in machine language.
Waspmote is a device prepared for operation in adverse conditions with regards to noise and electromagnetic contamination,
for this reason, to ensure stable communication at all times with the different modules connected through a serial line to the
UARTs (XBee, GPRS, USB) a maximum transmission speed of 115200bps has been set for XBee, GRPS and USB, so that the success
rate in received bits is 100%.
4.2.1. Watchdog
The Atmega 1281 microcontroller has an internal Enhanced Watchdog Time – WDT. The WDT precisely counts the clock cycles
generated by a 128KHz oscillator. The WDT generates an interruption signal when the counter reaches the set value. This
interruption signal can be used to wake the microcontroller from the Sleep mode or to generate an internal alarm when it is
running ON the mode, which is very useful when developing programs with timed interruptions.
The WDT allows the microcontroller to wake up from a low consumption Sleep mode by generating an interruption. For this
reason, this clock is used as a time-based alarm associated with the microcontroller’s Sleep mode. This allows very precise
control of small time intervals: 16ms, 32ms, 64ms, 128ms, 256ms, 500ms, 1s, 2s, 4s, 8s. For intervals over 8s (Deep Sleep
mode) the RTC is used.
More information about the interruptions generated by the Watchdog can be found in Energy chapter.
Related API libraries: WaspPWR.h, WaspPWR.cpp
All information about their programming and operation can be found in the document: Energy and Power Programming Guide.
All the documentation is located in the Development section in the Libelium website.
4.2.2. RTC
As shown in the Hardware chapter, Waspmote has a real time clock (RTC) running a 32KHz (32.786Hz) which allows to set an
absolute time.
Alarms can be programmed in the RTC specifying day/hour/minute/second. This allows total control when the mote wakes up
to capture values and perform actions programmed on it. Also, the RTC allows Waspmote to function in the maximum energy
saving modes (Deep Sleep and Hibernate) and to wake up just at the required moment.
The RTC allows the microcontroller to be woken from the low consumption state by generating an interruption. For this reason,
it has been associated to the microcontroller’s Deep Sleep and Hibernate modes, making it possible to put the microcontroller
to sleep, and wake it up by activating an alarm in the RTC. Sleeping intervals can go from 8s, to minutes, hours or even days.
More information about the interruptions generated by the RTC and DeepSleep and Hibernate modes can be found in the Energy
management chapter.
Related API libraries: WaspRTC.h, WaspRTC.cpp
All information about the RTC programming and operation can be found in the document: RTC Programming Guide.
All the documentation is located in the Development section in the Libelium website.
Interruptions are signals received by the microcontroller which indicate it must stop the task is doing to attend to an event that
has just happened. Interruption control frees the microcontroller from having to control sensors all the time. It also makes the
sensors warn Waspmote when a determined value (threshold) is reached.
Figure: Diagram of mode in Waspmote
Waspmote is designed to work with 2 types of interruptions: Synchronous and asynchronous
••
Synchronous Interruptions
They are programmed by timers. They allow to program when we want them to be triggered. There are two types of timer
alarms: periodic and relative.
--
Periodic Alarms are those to which we specify a particular moment in the future, for example: “Alarm programmed for
every fourth day of the month at 00:01 and 11 seconds”, they are controlled by the RTC.
--
Relative alarms are programmed taking into account the current moment, eg: “Alarm programmed for 5 minutes and 10
seconds”, they are controlled through the RTC and the microcontroller’s internal Watchdog.
••
Asynchronous Interruptions
These are not programmed so it is not known when they will be triggered. Types:
--
Sensors: the sensor boards can be programmed so that an alarm is triggered when a sensor reaches a certain threshold.
--
Accelerometer: The accelerometer that is built into the Waspmote can be programmed so that certain events such as
a fall or change of direction generate an interruption.
--
XBee module (Digimesh protocol only): Digimesh protocol allows the XBee to set cyclic sleep modes which can
interrupt Waspmote each time the module wakes up. This permits to set up cyclic sleep networks. So, Digimesh XBees
can wake up when certain internal timeout expires (however not when other node sends frames).
All interruptions, both synchronous and asynchronous can wake Waspmote up from the Sleep and the Deep Sleep mode.
However, only the synchronous interruption by the RTC is able to wake it up from the Hibernate mode.
The Hibernate mode totally disconnects the Waspmote power, leaving only the battery powering the RTC to wake Waspmote
up when the time alarm is reached. Because of this disconnection, when the RTC generates the corresponding alarm, the power
in Waspmote is reconnected and the code starts again from the setup.
The way of detecting whether a reboot from the Hibernate mode has happened is to check whether the corresponding flag
has been activated. Activation of this flag happens when the ifHibernate() function is called, which must be done at the
beginning of the setup part of the code. This way, when Waspmote starts, it tests if it is a normal start or if it is an start from the
Hibernate mode.
All information about the programming and operation of interruptions can be found in the document: Interruption Programming
Guide.
6. Energy System
6.1. Concepts
Waspmote has 4 operational modes.
••
ON: Normal operation mode. Consumption in this state is 15mA.
••
Sleep: The main program is paused, the microcontroller passes to a latent state, from which it can be woken up by all
asynchronous interruptions and by the synchronous interruption generated by the Watchdog. The duration interval of
this state is from 32ms to 8s. Consumption in this state is 55μA.
••
Deep Sleep: The main program pauses, the microcontroller passes to a latent state from which it can be woken up by all
asynchronous interruptions and by the synchronous interruption triggered by the RTC. The interval of this cycle can be
from seconds to minutes, hours, days. Consumption in this state is 55μA.
••
Hibernate: The main program stops, the microcontroller and all the Waspmote modules are completely disconnected.
The only way to reactivate the device is through the previously programmed alarm in the RTC (synchronous interrupt).
The interval of this cycle can be from seconds to minutes, hours, days. Almost all devices are totally disconnected from
the battery: only the RTC is powered through the battery, from which it consumes 0.06μA.
Consumption
Micro
Cycle
Accepted Interruptions
ON
15mA
ON
-
Synchronous and Asynchronous
Sleep
55μA
ON
32ms - min/hours/days
Synchronous (Watchdog) and Asynchronous
Deep Sleep
55μA
ON
1s – min/hours/days
Synchronous (RTC) and Asynchronous
Hibernate
0.06μA
OFF
1s – min/hours/days
Synchronous (RTC)
On the other hand, each module might have up to 4 operation modes.
••
ON: Normal operation mode.
••
Sleep: In this mode some module functions are stopped and passed to asynchronous use, normally guided by events. It
functions differently in each module and is specific to each one (programmed by the manufacturer).
••
Hibernate: In this mode all module functions are stopped and passed to asynchronous use, normally guided by events.
It operates differently in each module and is specific to each one (programmed by the manufacturer).
••
OFF: By using digital switches controlled by the microcontroller the module is switched off completely. This mode has
been implemented by Libelium as an independent layer of energy control, so that it can reduce consumption to a
minimum (~0μA) without relegating to techniques implemented by the manufacturer.
For complete information about interruption types and their handling, see the Interruption chapter.
Related API libraries: WaspPWR.h, WaspPWR.cpp
All information about the programming and operation of interruptions can be found in the document: Energy and Power
Programming Guide.
All the documentation is located in the Development section in the Libelium website.
Note: The sleep mode for XBee is not a very useful feature, since the advised action is to switch XBee off after transmission. If the user
puts XBee in sleep mode and also switches Waspmote to sleep or deepsleep, and if the SD card is plugged, there will be an excessive
power consumption: 220 μA or more (instead of the expected 110 μA). This is due to parasite power. To solve that, the user should not
use the XBee sleep mode. Another solution is to call sleep() or deepsleep() with ALL_OFF or SOCKET0_OFF parameters.
6.2. Sleep mode
The main program is paused, the microcontroller passes to a latent state, from which it can be woken by all asynchronous
interruptions and by the synchronous interruption generated by the Watchdog. When the Watchdog Timer is set up, the
duration interval of this state is from 16ms to 8s. Consumption in this state is 55μA.
In this mode the microcontroller stops executing the main program. The program stack where all the variables and log values
are stored keep their value, so when Waspmote returns to ON mode, the next instruction is executed and the variable values
are maintained.
Figure: From ON to Sleep
The following example would set Waspmote in the Sleep mode for 32ms. The microprocessor would be in a state of minimum
consumption waiting for the synchronous interruption from the Watchdog.
{
PWR.sleep(WTD_32MS, ALL_OFF);
}
6.3. Deep Sleep mode
The main program is paused, the microcontroller passes to a latent state from which it can be woken by all the asynchronous
interruptions and by the synchronous interruption launched by the RTC. The interval of this cycle can go from seconds to
minutes, hours, days. Consumption in this state is 55μA.
In this mode the microcontroller stops executing the main program. The program stack where all the variables and log values
are stored keep their value, so when Waspmote returns to ON mode, the next instruction is executed and the variable values
are maintained.
Figure: From ON to Deep Sleep
6.4. Hibernate mode
The main program stops, the microcontroller and all the Waspmote modules are completely disconnected. The only way to
reactivate the device is through the previously programmed alarm in the RTC (synchronous interrupt). The interval for this cycle
can go from seconds to minutes, hours or days. Almost all devices are totally disconnected from the battery: only the RTC is
powered through the battery, from which it consumes 0.06μA.
In this mode the microcontroller does not store any values from variables or from the program stack. When leaving the Hibernate
state the micro is reset, so the setup and loop routines are run as if the main switch were activated.
Figure: From ON to Hibernate
Hibernate mode requires the hibernate switch to be turned off correctly. It is necessary to follow the next steps when executing
the program for first time after uploading it to Waspmote:
1.
Connect the battery
2.
Switch Waspmote on.
3.
Wait for the red led to light on and turn off the “Hibernate switch” while the red led is on.
4.
Once the “Hibernate switch” is off, the green led must blink to indicate the program is running.
The following example would set Waspmote in the Hibernate mode for 2 days, 1 hour and 30 minutes. The microcontroller
would be switched off waiting for the RTC to switch the device on again with a synchronous interruption.
{
PWR.hibernate(“02:01:30:00”, RTC_OFFSET, RTC_ALM1_MODE2);
}
Note: when the hibernate switch is off, RTC alarms must only be used to set the wake up from hibernate. See more details in the
Programming Guides for the RTC and Power Modes.
Related API libraries: WaspPWR.h, WaspPWR.cpp
All information about the programming and operation of sleep modes can be found in the document: Energy and Power
Programming Guide.
All the documentation is located in the Development section in the Libelium website.
7.1. Sensors in Waspmote
7.1.1. Temperature
The Waspmote RTC (DS3231SN from Maxim) has a built in internal temperature sensor which it uses to recalibrate itself.
Waspmote can access the value of this sensor through the I2C bus.
Figure: Temperature sensor in the RTC
Obtaining the temperature:
{
RTC.getTemperature();
}
The sensor is shown in a 10-bit two’s complement format. It has a resolution of 0.25º C. The measurable temperature range is
between -40ºC and +85ºC.
As previously specified, the sensor is prepared to measure the temperature of the board itself and can thereby compensate for
oscillations in the quartz crystal it uses as a clock. As it is a sensor built in to the RTC, for any application that requires a probe
temperature sensor, this must be integrated from the micro’s analog and digital inputs, as has been done in the case of the
sensor boards designed by Libelium.
More information about the RTC can be found in the “Hardware” and “Energy System” chapters.
Related API libraries: WaspRTC.h, WaspRTC.cpp
All information about their programming and operation can be found in the document: RTC Programming Guide.
All the documentation is located in the Development section in the Libelium website.
Waspmote has a built in acceleration sensor LIS3331LDH STMicroelectronics which informs the mote of acceleration variations
experienced on each one of the 3 axes (X,Y,Z).
The integration of this sensor allows the measurement of acceleration on the 3 axes (X,Y,Z), establishing 4 kind of events: Free
Fall, inertial wake up, 6D movement and 6D position which are explained in the Interruptions Programming Guide.
Figure: Accelerometer
The LIS331DLH has dynamically user selectable full scales of ±2g/±4g/±8g and it is capable of measuring accelerations with
output data rates from 0.5 Hz to 1 kHz.
The device features ultra low-power operational modes that allow advanced power saving and smart sleep to wake-up functions.
The accelerometer has 7 power modes, the output data rate (ODR) will depend on the power mode selected. The power modes
and output data rates are shown in this table:
Power mode
Output data rate (Hz)
Power down
--
Normal mode
1000
Low-power 1
0,5
Low-power 2
1
Low-power 3
2
Low-power 4
5
Low-power 5
10
Figure: Axes in the LIS3LV02DL accelerometer
This accelerometer has an auto-test capability that allows the user to check the functioning of the sensor in the final application.
Its operational temperature range is between -40ºC and +85ºC.
The accelerometer communicates with the microcontroller through the I2C interface. The pins that are used for this task are the
SCL pin and the SDA pin, as well as another INT pin to generate the interruptions.
The accelerometer has 4 types of event which can generate an interrupt: free fall, inertial wake up, 6D movement and 6D
position.
These thresholds and times are set in the WaspACC.h file.
To show the ease of programming, an extract of code about how to get the accelerometer values is included below:
{
ACC.ON();
ACC.getX();
ACC.getY();
ACC.getZ();
}
Some figures with possible uses of the accelerometer are shown below:
Rotation and Twist:
Free fall of objects in which it is installed:
Crash:
More information about interruptions generated by the accelerometer can be found in the chapter “Interruptions” and in the
Interruptions Programming Guide.
Related API libraries: WaspACC.h, WaspACC.cpp
All information about their programming and operation can be found in the document: Accelerometer Programming Guide.
All the documentation is located in the Development section in the Libelium website.
7.2. Integration of new sensors
The Waspmote design is aimed at easing integration of both input (sensors) and output (actuators) which allow expansion
of the already wide range of mote responses. These are connected to the board by its 2x12 and 1x12 pin connectors, which
allow communication of 16 digital input and output signals, of which 7 can be used as analog inputs and 1 as a PWM (Pulse
Width Modulation) output signal, as well as a line to ground, 3.3V and 5V power feeds, 2 selectable connections to the serial
communication (UART) inputs and outputs, connection to the two lines of the (I2C) SCL and SDA Inter-Integrated Circuit bus,
and connection to inputs for high level and low level interrupt. An image of the Waspmote output connectors can be seen in
the section of the manual on “Inputs/Outputs”.
The management of sensor board’s two power lines (described in more depth in the section ”Sensors” → Power) is carried out
through two solid state switches which allow the continuous passage of a current of up to 200mA and whose control can be
programmed using the functions included in the WaspPWR library, described in the files WaspPWR.h and WaspPWR.cpp.
The input and output voltage values for both digital and analog pins will be between 0/ and 3.3V, logic zero (‘0’) being found
in values less than 0.5V and logic one (‘1’) in values higher than 2.30V. To read analog signals, the microprocessor has a 10-bit
analog-to-digital converter which allows a resolution of 3mV. Waspmote also has one 8-bit resolution PWM output pin for the
generation of analog signals. Information on the libraries and instructions used for reading and writing on these pins can be
found in the API manual.
Waspmote includes 2 interruption pins, a low level (TXD1) one and a high level (RXD1) one, which offer an alternative to
reading the sensors by survey, allowing the microprocessor to be woken up when an event occurs (such as exceeding a certain
threshold in a comparator) which generates a change in a digital signal connected to one of the above pins, facilitating the
sensor reading only at the moments when a remarkable event occurs.
This option is especially recommended for low consumption sensors that may remain active for long periods of time. Reading
by survey (switched on and cyclical sensor reading after a set time) is more appropriate for those that, in addition to showing
greater consumption, do not require monitoring that generates an alarm signal. The interruptions can be managed using the
warning functions and vectors (flags) defined in the Winterruptions library, file Winterruptions.c. More can be learnt about their
use in the Interruptions Programming Guide.
Sensors reading can generate three types of response: storage of collected data (on the SD card), wireless transmission of
data (using a radiofrequency signal through the XBee/LoRaWAN/LoRa/Sigfox module or through the mobile communications
network using the GRPS module) or automatic activation through an actuator directly controlled by the microprocessor’s output
signals or through a switch or relay.
7.3. Sensor Boards
The integration of sensors requiring some type of electronic adaptation stage or signal processing prior to reading by the
microprocessor is carried out by the various microprocessor sensor boards. Connection between these and the mote takes
place pin to pin using the two 2x11 and 1x12 connectors mentioned in the section “Hardware” → I/O. Currently, Waspmote
has eight integration boards:
GASES
APPLICATIONS
SENSORS
Note: Calibrated sensors are available for more accurate measurement.
• City pollution
CO, CO2, NO2, O3
• Emissions from farms and hatcheries
CH4 ,H2S , NH3
• Control of chemical and industrial
processes
C4H10 ,H2, VOC
• Forest fires
CO, CO2
• Carbon Monoxide – CO
• Carbon Dioxide – CO2
• Oxygen – O2
• Methane – CH4
• Hydrogen – H2
• Ammonia – NH3
• Isobutane – C4H10
• Ethanol – CH3CH2OH
• Toluene – C6H5CH3
• Hydrogen Sulfide – H2S
• Nitrogen Dioxide – NO2
• Ozone – O3
• Hydrocarbons – VOC
• Temperature
• Humidity
• Pressure atmospheric
GASES PRO
APPLICATIONS
SENSORS
• City pollution
CO, NO, NO2, O3, SO2, Particle Matter -
Dust
• Air Quality Index calculation
SO2, NO2, Particle Matter - Dust, CO, O3,
NH3
• Emissions from farms and hatcheries
CH4, H2S, NH3
• Greenhouse management
CO2, CH4, Humidity
• Control of chemical and industrial
processes
H2, HCl, CH4, SO2, CO2
• Indoor air quality
CO2, CO, Particle Matter - Dust, O3
• Forest fires
CO, CO2
• Carbon Monoxide – CO
• Carbon Dioxide – CO2
• Molecular Oxygen – O2
• Ozone – O3
• Nitric Oxide – NO
• Nitric Dioxide – NO2
• Sulfur Dioxide – SO2
• Ammonia – NH3
• Methane – CH4 – and other
combustible gases
• Molecular Hydrogen – H2
• Hydrogen Sulfide – H2S
• Hydrogen Chloride – HCl
• Phosphine – PH3
• Ethylene Oxide – ETO
• Chlorine – Cl2
• Particle Matter (PM1 / PM2.5 /
PM10) – Dust Sensor [only for
Plug & Sense!]
• Temperature, Humidity and
Pressure
Hall effect (doors and windows), person
detection PIR
• Emergencies
Presence detection and water level
sensors, temperature
• Control of goods in logistics
• Pressure/Weight
• Hall Effect
• Temperature (+/-)
• Liquid Presence
• Liquid Level
• Liquid flow
• Luminosity
• Presence (PIR)
SMART WATER
APPLICATIONS
SENSORS
• Potable water monitoring
pH, ORP, Dissolved Oxygen (DO),
Nitrates, Phosphates
• Chemical leakage detection in rivers
Extreme pH values signal chemical
spills, Dissolved Oxygen (DO)
• Swimming pool remote
measurement
pH, Oxidation-Reduction Potential
(ORP)
• Pollution levels in the sea
Temperature, Conductivity (Salinity),
pH, Dissolved Oxygen (DO) and
Nitrates
• pH
• Oxidation-Reduction Potential
(ORP)
• Dissolved Oxygen (DO)
• Conductivity
• Temperature
• Turbidity
SMART WATER IONS
APPLICATIONS
SENSORS
• Drinking water quality control
Calcium (Ca2+), Iodide (I-), Chloride
(Cl-), Nitrate (NO3
-), Magnesium (Mg2+),
Sodium (Na+), pH
• Agriculture water monitoring
Calcium (Ca2+), Nitrate (NO3
-),
Magnesium (Mg2+), Sodium (Na+),
Potassium (K+), Ammonium (NH4
+), pH
• Swimming pools
Bromide (Br-), Chloride (Cl-), Fluoride
(F-), pH
• Waste water treatment
Cupric (Cu2+), Silver (Ag+), Fluoroborate
(BF4
-), Lithium (Li+), Nitrite (NO2
-),
Perchlorate (ClO4
-), pH
• Ammonium (NH4
+)
• Bromide (Br-)
• Calcium (Ca2+)
• Chloride (Cl-)
• Cupric (Cu2+)
• Fluoride (F-)
• Iodide (I-)
• Fluoroborate (BF4
-)
• Lithium (Li+)
• Nitrate (NO3
-)
• Nitrite (NO2
-)
• Magnesium (Mg2+)
• Perchlorate (ClO4
-)
• Potassium (K+)
• Silver (Ag+)
• Sodium (Na+)
• pH
• Temperature
• Noise maps
Monitor in real time the acoustic
levels in the streets of a city
• Structural health monitoring
Crack propagation
• Air quality
Detect the level of particulates
and dust in the air
• Waste management
Measure the garbage levels in bins
to optimize the trash collection routes
• Microphone (dBA)
• Crack propagation gauge
• Linear displacement
• Dust
• Ultrasound
(distance measurement)
• Temperature
• Humidity
• Luminosity
SMART PARKING
APPLICATIONS
SENSORS
Figure: Plug & Sense! Smart Parking node
• Car detection for available
parking information
• Detection of free parking lots outdoors
• Parallel and perpendicular
parking lots control
• Sigfox and LoRaWAN connectivity (868
and 900)
• Extreme battery life
• Surface-mount enclosure, fast
installation
• Easy configuration, remote
management from the cloud
• Magnetic field
• Temperature
AGRICULTURE
APPLICATIONS
SENSORS
• Precision Agriculture
Leaf temperature, fruit diameter
• Irrigation Systems
Soil moisture, leaf wetness
• Greenhouses
Solar radiation, humidity, temperature
• Weather Stations
Anemometer, wind vane, pluviometer
• Air Temperature / Humidity
• Soil Temperature / Moisture
• Leaf Wetness
• Atmospheric Pressure
• Solar Radiation - PAR
• Ultraviolet Radiation - UV
• Trunk Diameter
• Stem Diameter
• Fruit Diameter
• Anemometer
• Wind Vane
• Pluviometer
• Luminosity
4-20 mA CURRENT LOOP
APPLICATIONS
FEATURES
• Sensors and Instruments
• Remote transducers
• Monitoring processes
• Data transmission in industrial ambients
• Type: Analog
• Media: Twisted Pair
• No. of devices: 1
• Distance: 900m
• Supply: 5-24V
The user can choose among a wide
variety of standard sensors
VIDEO CAMERA
APPLICATIONS
SENSORS
• Security and surveillance
• Take photos (640 x 380)
• Record video (320 x 240)
• Realtime Videocall using 3G network
• Night Vision mode available
• Image sensor
• Luminosity
• Infrared
• Presence (PIR)
RADIATION
APPLICATIONS
SENSORS
• Monitor the radiation levels wirelessly
without compromising the life of the
security forces
• Create prevention and control radiation
networks in the surroundings of a
nuclear plant
• Measure the amount of Beta and
Gamma radiation in specific areas
autonomously
• Geiger tube [ β, γ ]
(Beta and Gamma)
PROTOTYPING SENSOR
APPLICATIONS
• Prepared for the integration of any
kind of sensor.
• Pad Area
• Integrated Circuit Area
• Analog-to-Digital Converter
(16b)
It is possible to find more detailed information in the manual for each board at:
http://www.libelium.com/development/waspmote/documentation
In the sensor connector there are also several power pins, specifically GND, SENSOR POWER and 5V SENSOR POWER.
••
SENSOR POWER: 3.3V power voltage (200 mA maximum) which is controlled from the Waspmote execution code.
••
5V SENSOR POWER: 5V power voltage (200 mA maximum) which is controlled from the Waspmote execution code.
Waspmote integrates the Digi XBee modules for communication in the ISM (Industrial Scientific Medical) bands.
These modules communicate with the microcontroller using the UART_0 and UART_1 at 115200bps.
There are 4 possible XBee modules distributed by Libelium for integration in Waspmote.
Model
Protocol
Frequency
txPower
Sensitivity
Range *
XBee-802.15.4-Pro
802.15.4
2.4GHz
100mW
-100dBm
7000m
XBee-ZB-Pro
ZigBee-Pro
2.4GHz
50mW
-102dBm
7000m
XBee-868
RF
868MHz
315mW
-112dBm
12km
XBee-900
RF
900MHz
50mW
-100dBm
10Km
* Line of sight and Fresnel zone clearance with 5dBi dipole antenna
These modules have been chosen for their high receiving sensitivity and transmission power, as well as for being 802.15.4
compliant (XBee-802.15.4 model) and ZigBee-Pro v2007 compliant (XBee-ZB model).
The XBee and LoRa modules integrated in Waspmote include RPSMA antenna connectors.
8.1. XBee-802.15.4
Module
Frequency
TX power
Sensitivity
Channels
Distance
PRO
2,405 – 2,465GHz
63.1mW
-100dBm
12
7000m
XBee 802.15.4 PRO
The frequency used is the free band of 2.4GHz, using 12 channels with a bandwidth of 5MHz per channel.
Figure: Frequency channels in the 2.4GHz band
Channel Number
Frequency
Supported by
0x0C – Channel 12
2,405 – 2,410 GHz
PRO
0x0D – Channel 13
2,410 – 2,415 GHz
PRO
0x0E – Channel 14
2,415 – 2,420 GHz
PRO
0x0F – Channel 15
2,420 – 2,425 GHz
PRO
0x10 – Channel 16
2,425 – 2,430 GHz
PRO
0x11 – Channel 17
2,430 – 2,435 GHz
PRO
0x12 – Channel 18
2,435 – 2,440 GHz
PRO
0x13 – Channel 19
2,440 – 2,445 GHz
PRO
0x14 – Channel 20
2,445 – 2,450 GHz
PRO
0x15 – Channel 21
2,450 – 2,455 GHz
PRO
0x16 – Channel 22
2,455 – 2,460 GHz
PRO
0x17 – Channel 23
2,460 – 2,465 GHz
PRO
Figure: Channels used by the XBee modules in 2.4GHz
The XBee 802.15.4 modules comply with the standard IEEE 802.15.4 which defines the physical level and the link level (MAC
layer). The XBee modules add certain functionalities to those contributed by the standard, such as:
••
Node discovery: certain information has been added to the packet headers so that they can discover other nodes on the
same network. It allows a node discovery message to be sent, so that the rest of the network nodes respond indicating
their data (Node Identifier, @MAC, @16 bits, RSSI).
••
Duplicated packet detection: This functionality is not set out in the standard and is added by the XBee modules.
With a view to obtain frames totally compatible with the IEEE802.15.4 standard and enabling inter-operability with other
chipsets, the XBee.setMacMode(m) command has been created to select at any time if the modules are to use a totally
compatible heading format, or conversely enable the use of extra options for node discovery and duplicated packets detection.
Encryption is provided through the AES 128b algorithm. Specifically through the AES-CTR type. In this case the Frame Counter
field has a unique ID and encrypts all the information contained in the Payload field which is the place in the 802.15.4 frame
where data to be sent is stored.
The way in which the libraries have been developed for the module programming makes encryption activation as simple as
running the initialization function and giving it a key to use in the encryption process.
{
xbee802.setEncryptionMode(1);
xbee802.setLinkKey(key);
}
Extra information about the encryption systems in 802.15.4 and ZigBee sensor networks can be accessed in the Development
section of the Libelium website, specifically in the document: “Security in 802.15.4 and ZigBee networks”
The classic topology of this type of network is a star topology, as the nodes establish point to point connections with brother
nodes through the use of parameters such as the MAC or network address.
Figure: Star topology
Regarding the “Energy” section, the transmission power can be adjusted to several values:
Parameter
Tx XBee-PRO
0
10dBm
1
12dBm
2
14dBm
3
16dBm
4
18dBm
Figure: Transmission power values
Figure: XBee-PRO TX Power
Related API libraries: WaspXBeeCore.h, WaspXBeeCore.cpp, WaspXBee802.h, WaspXBee802.cpp
All information about their programming and operation can be found in the document: 802.15.4 Networking Guide.
All the documentation is located in the Development section in the Libelium website.
8.2. XBee - ZigBee
Module
Frequency
Transmission Power
Sensitivity
Number of channels
Distance
XBee-ZB-PRO
2,40 – 2,70GHz
50mW
-102dBm
14
7000m
Figure: XBee ZigBee PRO
As ZigBee is supported in the IEEE 802.15.5 link layer, it uses the same channels as described in the previous section, with the
peculiarity that the XBee-ZB-PRO model limits the number of channels to 13.
The XBee-ZB modules comply with the ZigBee-PRO v2007 standard. These modules add certain functionalities to those
contributed by ZigBee, such as:
••
Node discovery: some headings are added so that other nodes within the same network can be discovered. It allows a
node discovery message to be sent, so that the rest of the network nodes respond indicating their specific information
(Node Identifier, @MAC, @16 bits, RSSI).
••
Duplicated packet detection: This functionality is not set out in the standard and is added by the XBee modules.
The topologies in which these modules can be used are: star and tree.
Figure: Star topology
Figure: Tree topology
Regarding the “Energy” section, the transmission power cannot be adjusted, because it is always set to 17 dBm
Related API libraries: WaspXBeeCore.h, WaspXBeeCore.cpp, WaspXBeeZB.h, WaspXBeeZB.cpp
All information about their programming and operation can be found in the document: ZigBee Networking Guide.
All the documentation is located in the Development section in the Libelium website.
8.3. XBee - 868
Module
Frequency
Transmission Power
Sensitivity
Channels
Distance
XBee 868
869,4 – 869,65MHz
315mW
-112dBm
1
12km
Figure: XBee 868
Note: The XBee 868 MHz module is provided with 4.5dBi antenna, which enables maximum range.
The frequency used is the 869MHz band (Europe), using 1 single channel. The use of this module is only allowed in Europe. In
the chapter “Certifications”, more information can be obtained about the Certifications.
Figure: Channel frequency on 869MHz
Encryption is provided through the AES 128b algorithm. Specifically through the type AES-CTR. In this case the Frame Counter
field has a unique ID and encrypts all the information contained in the Payload field which is the place in the link layer frame
where the data to be sent is stored.
The way in which the libraries have been developed for module programming means that encryption activation is as simple as
running the initialization function and giving it a key to use in the encryption.
{
xbee868.setEncryptionMode(1);
xbee868.setLinkKey(key);
}
The classic topology for this type of network is a star topology, as the nodes can establish point to point connections with
brother nodes through the use of the MAC address.
Figure: Star topology
Regarding the “Energy” section, the transmission power can be adjusted to several values:
Parameter
Tx XBee - 868
0
0dBm
1
13.7dBm
2
20dBm
3
22dBm
4
25dBm
Figure: Transmission power values
Figure: XBee TX Power
Related API libraries: WaspXBeeCore.h, WaspXBeeCore.cpp, WaspXBee868.h, WaspXBee868.cpp
All information about their programming and operation can be found in the document: 868MHz Networking Guide.
All the documentation is located in the Development section in the Libelium website.
8.4. XBee - 900
Module
Frequency
Tx Power
Sensitivity
Channels
Distance
XBee 900
902-928MHz
50mW
-100dBm
12
10km
Figure: XBee 900MHz
Note: The XBee 868 MHz module is provided with 4.5dBi antenna, which enables maximum range.
The frequency used is the 900MHz band, using 12 channels with a bandw idth of 2.16MHz per channel and a transmission
rate of 156.25kbps. The use of this module is only allowed in the United States and Canada. In the chapter “Certifications”, more
information can be obtained about the Certifications.
Figure: Channel frequencies in the 900MHz band
Encryption is provided through the AES 128b algorithm. Specifically through the type AES-CTR. In this case the Frame Counter
field has a unique ID and encrypts all the information contained in the Payload field which is the place in the link layer frame
where the data to be sent is stored.
The way in which the libraries have been developed for module programming means that encryption activation is as simple as
running the initialization function and giving it a key to use in the encryption.
{
xbee900.setEncryptionMode(1);
xbee900.setLinkKey(key);
}
The classic topology for this type of network is a star topology, as the nodes can establish point to point connections with
brother nodes through the use of parameters such as the MAC address or that of the network.
Figure: Star topology
API libraries: WaspXBeeCore.h, WaspXBeeCore.cpp, WaspXBee900.h, WaspXBee900.cpp
All information about their programming and operation can be found in the document: 900MHz Networking Guide.
All the documentation is located in the Development section in the Libelium website.
8.5. XBee-DigiMesh
The XBee-802.15.4 and XBee-900 modules can use an optional firmware (DigiMesh) so that they can create mesh networks
instead of the usual point to point topology. This firmware has been developed by Digi aimed for allowing modules to sleep,
synchronize themselves and work on equal terms, avoiding the use of node routers or coordinators that have to be permanently
powered on. Characteristics of the implemented protocol:
••
Self Healing: any node can join or leave the network at any moment.
••
All nodes are equal: there are no father-son relationships.
••
Silent protocol: reduced routing heading due to using a reactive protocol similar to AODV (Ad hoc On-Demand Vector
Routing).
••
Route discovery: instead of keeping a route map, routes are discovered when they are needed.
••
Selective ACKs: only the recipient responds to route messages.
••
Reliability: the use of ACKs ensures data transmission reliability.
••
Sleep Modes: low energy consumption modes with synchronization to wake at the same time.
The classic topology of this type of network is mesh, as the nodes can establish point to point connections with brother nodes
through the use the MAC address doing multi-hop connections when it is necessary.
Figure: Mesh topology
DigiMesh 2.4GHz
Module
Frequency
Tx Power
Sensitivity
Channels
Distance
PRO
2,405 – 2,465GHz
100mW
-100dBm
12
7000m
The XBee DigiMesh modules share the hardware module with the XBee-802.15.4. So it is possible to change the firmware of this
kind of modules from one to another and vice versa. For this reason, the characteristics relating to the hardware are the same,
changing those related with the protocol used.
The XBee DigiMesh modules are based on the standard IEEE 802.15.4 that supports functionalities enabling mesh topology use.
DigiMesh 900MHz
Frequency
Tx Power
Sensitivity
Channels
Distance
902-928MHz
50mW
-100dBm
12
10km
The XBee DigiMesh modules share the hardware module with the XBee-900. So it is possible to change the firmware of this
kind of modules from one to another and vice versa. For this reason, the characteristics relating to the hardware are the same,
changing those related with the protocol used.
Related API libraries: WaspXBeeCore.h, WaspXBeeCore.cpp, WaspXBeeDM.h, WaspXBeeDM.cpp
All information about their programming and operation can be found in the document: DigiMesh Networking Guide.
All the documentation is located in the Development section in the Libelium website.
LoRaWAN is a Low Power Wide Area Network (LPWAN) specification intended for wireless battery operated devices in regional,
national or global network. LoRaWAN target key requirements of Internet of things such as secure bi-directional communication,
mobility and localization services. This standard will provide seamless interoperability among smart Things without the need
of complex local installations and gives back the freedom to the user, developer, businesses enabling the role out of Internet of
Things.
LoRaWAN network architecture is typically laid out in a star-of-stars topology in which gateways is a transparent bridge relaying
messages between end-devices and a central network server in the back-end. Gateways are connected to the network server
via standard IP connections while end-devices use single-hop wireless communication to one or many gateways.
Communication between end-devices and gateways is spread out on different frequency channels and data rates. The selection
of the data rate is a trade-off between communication range and message duration. Due to the spread spectrum technology,
communications with different data rates do not interfere with each other and create a set of “virtual” channels increasing the
capacity of the gateway. To maximize both battery life of the end-devices and overall network capacity, the LoRaWAN network
server is managing the data rate and RF output for each end-device individually by means of an adaptive data rate (ADR)
scheme.
Figure: LoRaWAN module with normal antenna
Figure: LoRaWAN module with 0 dBi antenna
National wide networks targeting internet of things such as critical infrastructure, confidential personal data or critical functions
for the society has a special need for secure communication. This has been solved by several layer of encryption.
Protocol: LoRaWAN 1.0, Class A
LoRaWAN-ready
Frequency:
••
LoRaWAN 868/433 modules: 868 MHz and 433 MHz ISM bands
••
LoRaWAN 900 module: 900-930 MHz ISM band
TX power:
••
LoRaWAN 868/433 modules: up to +14 dBm
••
LoRaWAN 900 module: up to +18.5 dBm
Sensitivity: down to -136 dBm
Range: >15 km at suburban and >5 km at urban area. Typically, each base station
covers some km. Check the LoRaWAN Network in your area.
Chipset consumption:
••
LoRaWAN 868/433 modules: 38.9 mA
••
LoRaWAN 900 module: 124.4 mA
Radio data rate:
••
LoRaWAN 868/433 modules: from 250 to 5470 bps
••
LoRaWAN 900 module: from 250 to 12500 bps
Receiver: purchase your own base station or use networks from LoRaWAN operators
All the information about their programming and operation can be found in the LoRaWAN Networking Guide available at
Development section of Libelium website.
10. LoRa
••
Protocol: Own, developed at Libelium. Not compatible with LoRaWAN.
••
Model: Semtech SX1272
••
Frequencies available: 860-1000 MHz, fits both 868 (Europe) and 915 MHz (USA) ISM bands
••
Max TX power: 14 dBm
••
Sensitivity: -137 dBm
••
Range:
--
Line of Sight: 21+ km / 13.4+ miles (LoS and Fresnel zone clearance)
--
Non Line of Sight: 2+ km / 1.2+ miles (nLoS going through buildings, urban
environment)
••
Antenna:
--
868 / 915 MHz: 0 / 4.5 dBi
--
Connector: RPSMA
••
Encryption: AES 128/192/256b (performed by Waspmote API)
••
Control Signal: RSSI
••
Topology: Star
••
Receiver/Central node: Meshlium LoRa, special Gateway LoRa (SPI) or another Waspmote or Plug & Sense! unit
Note: The XBee 868 MHz module is provided with 4.5dBi antenna, which enables maximum range.
This is the radio with the best range performance, thanks to the excellent receiver sensitivity that the LoRa™ technology offers.
Besides, Libelium developed a library which enables addressable, reliable and robust communications with ACK, re-tries or
time-outs strategies.
The user can set any frequency in the 868 and 900MHz bands, with pre-defined channels. The use of this module is allowed in
virtually any country.
Figure: LoRaWAN 868 module
Figure: LoRa module
Figure: Channel frequencies in the 868MHz band
Figure: Channel frequencies in the 900MHz band
Encryption is implemented in the application level, thanks to the Waspmote’s AES library. The payload inside the wireless packet
is encrypted so only nodes knowing the key can read the content. The encryption activation is as simple as running one of our
LoRa with AES encryption examples.
The topology for this type of network is a star topology, as the nodes can establish point to point connections with brother
nodes, normally with the central one.
Figure: Star topology
Related API libraries: WaspSX1272.h, WaspSX1272.cpp
All information about programming the LoRa module can be found in the document SX1272 LoRa Networking Guide.
All the documentation is located in the Development section in the Libelium website.
10.1. RSSI
The RSSI parameter (Received Signal Strength Indicator) indicates the signal quality of the last packet received. The XBee
modules provide this information in all protocol and frequency variants.
One of the most common functionalities in the use of RSSI is the creation of indoor localization systems by signal triangulation.
In Waspmote this value is obtained simply by executing the function (i.e. XBee-802.15.4):
{
xbee802.getRSSI();
}
Sigfox is a private company that aims to build a worldwide network especially designed for IoT devices. The network is cellular,
with thousands of base stations deployed in each country. Sigfox technology offers very long ranges for low-power, battery-
constrained nodes. Sigfox is great for very simple and autonomous devices which need to send small amounts of data to this
ubiquitous network, taking advantage on the Sigfox infrastructure.
So Sigfox is similar to cellular (GSM-GPRS-3G-4G) but is more energy-efficient, and the annual fees are lower.
Sigfox uses a UNB (Ultra Narrow Band) based radio technology to connect devices to its global network. The use of UNB is key to
providing a scalable, high-capacity network, with very low energy consumption, while maintaining a simple and easy to rollout
star-based cell infrastructure.
••
Frequency: ISM 868 MHz
••
TX Power: 14 dBm
••
ETSI limitation: 140 messages of 12 bytes, per module per day
••
Range: Typically, each base station covers some km. Check the Sigfox Network
••
Chipset consumption: TX: 49 mA @ +14 dBm
••
Radio Data Rate: 100 bps
••
Receive sensitivity: -126 dBm
••
Sigfox certificate: Class 0u (the highest level)
The network operates in the globally available ISM bands (license-free frequency bands) and co-exists in these frequencies
with other radio technologies, but without any risk of collisions or capacity problems. Sigfox currently uses the most popular
European ISM band on 868MHz (as defined by ETSI and CEPT).
Sigfox is being rolled out worldwide. It is the responsibility of the system integrator to consult the catalog of SNOs (Sigfox
Network Operators) for checking coverage in the deployment area.
The Sigfox back-end provides a web application interface for device management and configuration of data integration, as well
as standards based web APIs to automate the device management and implement the data integration.
Figure: Sigfox network
Figure: Sigfox module
The WiFi module for the Waspmote platform completes the current connectivity possibilities enabling the direct communication
of the sensor nodes with any WiFi router in the market. As well as this, this radio allows Waspmote to send directly the information
to any iPhone or Android Smartphones without the need of an intermediate router, what makes possible to create WiFi sensor
networks anywhere using just Waspmote and a mobile device as all of them run with batteries.
With this radio, Waspmote can make HTTP connections retrieving and sending information to the web and FTP servers, as well
as using TCP/IP and UDP/IP sockets in order to connect to any server located on the Internet.
Features:
••
Protocols: 802.11b/g - 2.4GHz
••
TX Power: 0dBm - 12dBm (variable by software)
••
RX Sensitivity: -83dBm
••
Antenna connector: RPSMA
••
Antenna: 2dBi/5dBi antenna options
••
Security: WEP, WPA, WPA2
••
Topology: AP
••
802.11 roaming capabilities
Actions:
••
TCP/IP - UDP/IP socket connections
••
HTTP web connections
••
FTP file transfers
••
Direct connections with iPhone and Android
••
Connects with any standard WiFi router
••
DHCP for automatic IP assignation
••
DNS resolution enabled
Related API libraries: WaspWifi.h, WaspWifi.cpp
All information about their programming and operation can be found in the document: WiFi Networking Guide.
All the documentation is located in the Development section in the Libelium website.
12.1. WiFi Topologies
12.1.1. Access Point
Sensor nodes may connect to any standard WiFi router which is configured as Access Point (AP) and then send the data to other
devices in the same network such as laptops and smartphones. This is the common case when implementing home sensor
networks and when using the data inside an Intranet.
Once associated with the Access Point, the nodes may ask for an IP address by using the DHCP protocol or use a preconfigured
static IP. The AP connection can be encrypted, in this case, you have to specify also the pass-phrase or key to the WiFi module.
The WiFi module supports these security modes: WEP-128, WPA2-PSK , WPA1-PSK, and WPA-PSK mixed mode.
Figure: WiFi module with 2dBi and 5dBi antennas
Nodes may also connect to a standard WiFi router with DSL or cable connectivity and send the data to a web server located on
the Internet. Then users are able to get this data from the Cloud. This is the typical scenario for companies which want to give
data accessibility services.
As pointed before, the WiFi module can join any standard WiFi router, however the connection may also be performed using
Meshlium instead of a standard WiFi router. Meshlium is the multiprotocol router designed by Libelium which is specially
recommended for outdoor applications as it is designed to resist the hardest conditions in real field deployments.
12.1.2. When is recommended to use Meshlium instead a standard WiFi router?
As pointed before, the WiFi module for Waspmote can connect to any standard WiFi
router (“home oriented”) in the market. However when deploying sensor networks
outdoors you need a robust machine capable of resist the hardest conditions of rain,
wind, dust, etc. Meshlium is specially designed for real deployments of wireless sensor
networks as it is waterproof (IP-65) and counts with a robust metallic enclosure ready to
resist the hardest atmospheric conditions.
Meshlium is also ready to deal with hundreds of nodes at the same time, receiving sensor
data from all of them and storing it in its internal database or sending it to an Internet
server. As well as this, Meshlium may work as a WiFi to 3G/GPRS gateway, giving access
to the internet to all the nodes in the network using the mobile phones infrastructure.
It is also important to mention that the transmission power of the WiFi interface
integrated in Meshlium is many times higher than the ones available in “home oriented”
WiFi routers so the distance we can get increases dramatically from a few meters to
dozens or even hundreds depending on the location of the nodes.
Using Meshlium as WiFi Access Point allows to control and to store the messages received
from the WiFi module, or allows to combine WiFi technology with other protocols such
as ZigBee. Meshlium may work as:
••
an XBee/LoRa to Ethernet router for Waspmote nodes
••
an XBee/LoRa to 3G/GPRS router for Waspmote nodes
••
a WiFi Access Point
••
a WiFi Mesh node (dual band 2.4GHz-5GHz)
••
a WiFi to 3G/GPRS router
••
a Bluetooth scanner and analyzer
••
a SmartPhone scanner (detects iPhone and Android devices)
For more information about Meshlium go to: http://www.libelium.com/meshlium
13. Bluetooth Pro
The Waspmote Bluetooth Pro module (or simply, Bluetooth) uses the same socket as the XBee does. This means you can change
the XBee module for the Bluetooth module as they are pin to pin compatible.
13.1. Technical specifications
••
Bluetooth v2.1 + EDR. Class 2
••
TX Power: 3dBm
••
Antenna: 2dBi
••
Up to 250 unique devices in each inquiry
••
Received Strength Signal Indicator (RSSI) for each scanned device
••
Class of Device (CoD) for each scanned device
••
7 Power levels [-27dBm, +3dBm]
••
Scan devices with maximum inquiry time
••
Scan devices with maximum number of nodes
••
Scan devices looking for a certain user by MAC address
••
Classification between pedestrians and vehicles
Figure: Libelium Bluetooth module
Waspmote may integrate a Bluetooth module for communication in the 2.4GHz ISM (Industrial Scientific Medical) bands.
Figure: Start topology
Bluetooth uses 79 channels with a bandwidth of 1MHz per channel. In addition, Adaptive Frequency Hopping (AFH) is used to
enhance the transmissions.
Figure: Frequency channels in the 2.4GHz band
Bluetooth modules have some important parameters for their configuration:
••
MAC address: It is the unique identification number of the Bluetooth device. It has 12 hexadecimal digits separated by
“:”. One example could be “12:34:56:aa:bb”.
••
Public Name: It is the name that appears when a scan is performed in order to find new devices.
••
Class of Device (CoD): Bluetooth devices are classified according to the device which they are integrated. Therefore a ve-
hicle hands free device will belong to a different class than a pedestrian mobile phone. This parameter has 6 hexadecimal
digit and it allows distinguish if the detected Bluetooth device is a vehicle, a pedestrian, and so on.
••
RSSI (Received Signal Strength Indicator): This parameters shows quality of the radio link. It can be used to know the
distance between the Bluetooth module and the inquired device. It is shown as a negative value between -40 dBm (close
devices) and -90 dBm (far devices).
13.2. Bluetooth module for device discovery
The Bluetooth radio module has been specifically designed in order to scan up to 250 devices in a single inquiry. The main
purpose is to be able to detect as many Bluetooth users as possible in the surrounding area.
How do we differentiate if the Bluetooth device is a car’s hands-free or a mobile phone?
In the scanning process each Bluetooth device gives its “Class of Device” (CoD) attribute which allows to identify the type of
service it gives. We can differentiate easily the CoD’s generated by the car’s handsfree from the people’s phone ones.
How do I control the inquiry area?
There are seven different power levels which go from -27dBm to +3dBm in order to set different inquiry zones from 10 to 50m.
These zones can also be increased or decreased by using a different antenna for the module as it counts with an standard SMA
connector. The default antenna which comes with the module has a gain of 2dBi.
Figure: Example of TX power levels
How do I calculate the distance of any of the devices detected?
In the inquiry process we receive the MAC address of the Bluetooth device, its CoD and the Received Signal Strength Indicator
(RSSI) which gives us the quality of the transmission with each device. RSSI values usually go from -40dBm (nearest nodes) to
-90dBm (farthest ones). In the tests performed Bluetooth devices at a distance of 10m reported -50dBm as average, while the
ones situated at 50m gave us an average of -75dBm.
How do the Bluetooth and ZigBee radios coexist without causing interferences with each other?
ZigBee and Bluetooth work in the 2.4GHz frequency band (2.400 - 2.480MHz), however, the Bluetooth radio integrated in
Waspmote uses an algorithm called Adaptive Frequency Hopping (AFH) which improves the common algorithm used by
Bluetooth (FHSS) and enables the Bluetooth radio to dynamically identify channels already in use by ZigBee and WiFi devices
and to avoid them.
Can I use this radio to connect to other Bluetooth devices?
No. The idea is to use this radio “as a sensor”. All the API functions developed are thought to detect as many Bluetooth devices
as possible. In order to comunicate with other Bluetooth devices another module is available for the Waspmote platform. For
further information read the chapter “Bluetooth” about the Communication Bluetooth Module.
What about privacy?
The anonymous nature of this technique is due to the use of MAC addresses as identifiers. MAC addresses are not associated with
any specific user account or mobile phone number not even to any specific vehicle. Additionally, the “inquiry mode” (visibility)
can be turned off so people have always chosen if their device will or wont be detectable.
Related API libraries: WaspBT_Pro.h, WaspBT_Pro.cpp
All information on their programming can be found in document: Bluetooth for device discovery Networking Guide.
All the documentation is located in the Development section in the Libelium website.
Note: If you want to detect iPhone and Android devices using the WiFi interface as well as the Bluetooth radio go to the
“Smartphone Detection” section in the Meshlium website: http://www.libelium.com/meshlium
Bluetooth Low Energy
14. Bluetooth Low Energy
The Waspmote Bluetooth Low Energy module uses the same socket as XBee does. This means that you can change XBee module
for the BLE module as they are pin to pin compatible.
14.1. Technical specifications:
••
Protocol: Bluetooth v.4.0 / Bluetooth Smart
••
Chipset: BLE112
••
RX Sensitivity: -103dBm
••
TX Power: [-23dBm, +3dBm]
••
Antenna: 2dBi/5dBi antenna options
••
Security: AES-128
••
Range: 100 meters (at maximum TX power)
••
Consumption: sleep (0.4uA) / RX (8mA) / TX (36mA)
••
Send broadcast advertisements (iBeacons)
••
Connect to other BLE devices as Master / Slave
••
Connect with Smartphones and Tablets
••
Set automatic cycles sleep / transmission
••
Calculate distance using RSSI values
••
Perfect for indoor location networks (RTLS)
••
Scan devices with maximum inquiry time
••
Scan devices with maximum number of nodes
••
Scan devices looking for a certain user by MAC address
Figure: Waspmote Bluetooth Low Energy module
BLE modules use the 2.4GHz band (2402MHz – 2480 MHz). It has 37 data channels and 3 advertisement channels, with a 2MHz
spacing and GFSK modulation.
Bluetooth Low Energy
Figure: Channel distribution on the BLE standard
In the same way as Bluetooth classic modules, other BLE modules can be identified by their MAC address and public name. Also,
the RSSI is provided to show the quality of each link.
Related API libraries: WaspBLE.h, WaspBLE.cpp.
All information on their programming can be found in document: Bluetooth Low Energy Networking Guide.
All the documentation is located in the Development section in the Libelium website.
Waspmote can integrate a GSM (Global System for Mobile communications) / GPRS (General Packet Radio Service) module to
enable communication using the mobile telephone network.
••
Model: SIM900 (SIMCom)
••
Quadband: 850MHz/900MHz/1800MHz/1900MHz
••
TX Power: 2W(Class 4) 850MHz/900MHz, 1W(Class 1) 1800MHz/1900MHz
••
Sensitivity: -109dBm
••
Antenna connector: UFL
••
External Antenna: 0dBi
Figure: GSM/GPRS module
This module can carry out the following tasks:
••
Making/Receiving calls
••
Making ‘x’ second lost calls
••
Sending/Receiving SMS
••
Single connection and multiple connections TCP/IP and UDP/IP clients
••
TCP/IP server.
••
HTTP Service
••
FTP Service (downloading and uploading files)
The functions implemented in the API allow to send information in a simple way, calling functions such as:
{
GPRS_Pro.sendSMS(message, number);
GPRS_Pro.makeLostCall(number, timeCall);
}
This model uses the UART_1 at a baudarte of 57600bps speed to communicate with the microcontroller.
Figure: GSM/GPRS module in Waspmote
Related API libraries: WaspGPRS_Pro.h, WaspGPRS_Pro.cpp , WaspGPRS_Pro_core.h and WaspGPRS_Pro_core.cpp
All information about their programming and operation can be found in the document: GSM/GPRS Programming Guide.
All the documentation is located in the Development section in the Libelium website.
* Note 1: A rechargeable battery must be always connected when using this module (USB power supply is not enough).
Waspmote can integrate a GSM (Global System for Mobile communications) / GPRS (General Packet Radio Service) module to
enable communication using the mobile telephone network. Also, this module integrates a GPS receiver.
Model: SIM928 (SIMCom)
GPRS features:
Quadband: 850MHz/900MHz/1800MHz/1900MHz
TX Power: 2W (Class 4) 850MHz/900MHz, 1W (Class 1) 1800MHz/1900MHz
Sensitivity: -109dBm
Antenna connector: UFL
External Antenna: 0dBi
Consumption in sleep mode: 1mA
Consumption in power off mode: 0mA
GPS features:
Time-To-First-Fix: 30s (typ.)
Sensitivity:
Tracking: -160 dBm
Adquisition: -147 dBm
Accuracy horizontal position : <2.5m CEP
Figure: GPRS+GPS module
This module can carry out the following tasks:
••
Making/Receiving calls
••
Making ‘x’-second lost calls
••
Sending/Receiving SMS
••
Single connection and multiple connections TCP/IP and UDP/IP clients
••
TCP/IP server.
••
HTTP Service
••
FTP Service (downloading and uploading files)
••
GPS receiver
The functions implemented in the API allow to send information in a simple way, calling functions such as:
{
GPRS_SIM928A.sendSMS(message, number);
GPRS_SIM928A.makeLostCall(number, timeCall);
}
This model uses the UART_1 at a baudarte of 57600bps speed to communicate with the microcontroller.
Figure: GPRS+GPS module in Waspmote
Related API libraries: WaspGPRS_SIM928A.h, WaspGPRS_SIM928A.cpp, WaspGPRS_Pro_core.h and WaspGPRS_Pro_core.
cpp
All information about their programming and operation can be found in the document: GPRS+GPS Programming Guide.
All the documentation is located in the Development section in the Libelium website.
* Note 1: A rechargeable battery must be always connected when using this module (USB power supply is not enough).
3G + GPRS
17. 3G + GPRS
Waspmote can integrate a UMTS (Universal Mobile Telecommunication System based in WCDMA technology) / GPRS (General
Packet Radio Service) module to enable communication using the 3G/GPRS mobile telephone network.
••
Model: SIM5215 (SIMCom)
••
Versions: Europe and America/Australia
--
Europe version:
--
Dual-Band: 900/2100 MHz
--
Tri-Band: 850/900/1800 MHzAmerica/Australia version:
--
Dual-Band: 850/1900 MHz
--
Quad-Band: 850/900/1800/1900 MHz
••
WCDMA (downlink): up to 384 kbps
••
WCDMA (uplink): up to 384 kbps
••
TX power:
--
UMTS 850/900/1900/2100: 0.25 W
--
GSM 850/900: 2 W
--
DCS 1800 / PCS 1900: 1 W
••
Sensitivity: -106dBm
••
Antenna connector: UFL
••
External antenna: 0dBi
Figure: 3G/GPRS module
This module can carry out the following tasks:
••
Videocall using 3G network available with Video Camera Sensor Board
••
Record video (res. 320 x 240) and take pictures (res. 640 x 480) available with Video Camera Sensor Board
••
Support microSD card up to 32GB
••
64MB of internal storage space
••
Making/Receiving calls
••
Making ‘x’ -second lost calls
••
Sending/Receiving SMS
••
Single connection and multiple connections TCP/IP and UDP/IP clients
••
TCP/IP server
••
HTTP and HTTPS service
••
FTP and FTPS Service (downloading and uploading files)
••
Sending/receiving email (SMTP/POP3)
3G + GPRS
The functions implemented in the API allow to send information in a simple way, calling functions such as:
{
_3G.sendSMS(message, number);
_3G.makeLostCall(number, timeCall);
}
This model uses the UART_1 at a baudrate of 115200 speed to communicate with the microcontroller.
Figure: 3G/GPRS module in Waspmote
Related API libraries: Wasp3G.h, Wasp3G.cpp
All information about programming and operation can be found in the document: 3G + GPRS Networking Guide.
All the documentation is located in the Development section of Libelium website.
* Note 1: A rechargeable battery must be always connected when using this module (USB power supply is not enough).
Compatibility: Reader/writer mode supporting ISO 14443A /
MIFARE / FeliCaTM / NFCIP-1
••
Distance: 5cm
••
Max capacity: 4KB
••
Tags: cards, keyrings, stickers
Applications:
••
Located based services (LBS)
••
Logistics (assets tracking, supply chain)
••
Access management
••
Electronic prepaid metering (vending machines, public transport)
••
Smartphone interaction (NFCIP-1 protocol)
Related API libraries: WaspRFID13.cpp , WaspRFID13.h
All information on its programming can be found in the document: RFID/NFC 13.56MHz Networking Guide.
All the documentation is located in the Development section in the Libelium website.
Figure: RFID cards
Figure: RFID keyrings
Figure: RFID sticker
Figure: 13.56MHz RFID/NFC module
19. Industrial Protocols
19.1. Introduction
Libelium created communication modules for the most common wired communication protocols: RS-485, RS-232, CAN Bus and
Modbus. These are widely used standards in the industrial and automation market for connecting devices and sensors, not in a
wireless way but with cables. The user can interface Waspmote ecosystem with this protocols.
Waspmote allows to perform three main applications:
1º- Connect any sensor to an existing industrial bus
Waspmote can be configured to work as a node in the network, inserting sensor data into the industrial bus already present.
Waspmote can obtain information from more than 70 sensors currently integrated in the platform by using specific sensor
boards (e.g.: CO, CO2, temperature, humidity, acceleration, pH, IR, luminosity, vibration, etc). This way, the sensor information can
be read from any industrial device connected to the bus.
Figure: Module in wireless sensor network applications
2º- Add wireless connectivity to wired buses
Waspmote can be configured to read the information coming from the bus and send it wirelessly using any of the wireless
modules available in the platform to a base station or to another node connected to another bus. The available wireless
technologies are: WiFi, 3G, GPRS, 802.15.4, ZigBee, Bluetooth, Bluetooth Low Energy, RF-868MHz, RF-900MHz, LoRaWAN, LoRa,
and Sigfox.
Figure: Waspmote for wire replacement
3º- Connect to the Cloud industrial devices
Waspmote can be configured to read the information coming from the bus and send it wirelessly directly to the Cloud using
WiFi, 3G and GPRS radio interfaces.
Figure: Cloud connection
19.2. RS-485 / Modbus module
Technical details:
••
Protocols: RS-485 and Modbus
••
Standard: EIA RS-485
••
Physical Media: Twisted pair
••
Connector: DB9
••
Network Topology: Point-to-point, Multi-dropped, Multi-point
••
Maximum Devices: 32 drivers or receivers
••
Mode of Operation: Differential signaling
••
Maximum Speed: 460800 bps
••
Voltage Levels: -7 V to +12 V
••
Mark(1): Positive Voltages (B-A > +200 mV)
••
Space(0): Negative voltages (B-A < -200 mV)
••
Available Signals: Tx+/Rx+, Tx-/Rx-(Half Duplex)Tx+,Tx-,Rx+,Rx-(Full Duplex)
••
Available sockets in Waspmote: socket 0 (special SPI Waspmote required)
Applications:
••
Industrial Equipment
••
Machine to Machine (M2M) communications
••
Industrial Control Systems, including the most common versions of Modbus and Profibus
••
Programmable logic controllers
••
RS485 is also used in building automation
••
Interconnect security control panels and devices
Figure: RS-485 / Modbus module