Smart Metering Sensor Board 2.0eng
Smart Metering Sensor Board 2.0eng
Smart Metering Sensor Board 2.0eng
0
Technical Guide
wasp mote
Index
Document version: v4.2 - 04/2013 Libelium Comunicaciones Distribuidas S.L.
INDEX
1. General.................................................................................................................................................. 4
1.1. General and safety information...............................................................................................................................................4 1.2. Conditions of use..........................................................................................................................................................................4
3. Hardware............................................................................................................................................. 14
3.1. General Description.................................................................................................................................................................. 14 3.2. Specifications.............................................................................................................................................................................. 14 3.3. Electrical Characteristics.......................................................................................................................................................... 14
4. Sensors................................................................................................................................................ 15
4.1. Current Sensor............................................................................................................................................................................ 15 4.1.1. Specifications................................................................................................................................................................15 4.1.2. Measurement Process...............................................................................................................................................15 4.1.3. Socket..............................................................................................................................................................................17 4.2. Load Cell (AME, AMT and AMS from Hanyu).................................................................................................................... 18 4.2.1. Specifications................................................................................................................................................................18 4.2.2. Measurement Process...............................................................................................................................................18 4.2.3. Socket..............................................................................................................................................................................20 4.3. Liquid Flow Sensor (FS100A, FS200A and FS400 from Broiltech)............................................................................. 20 4.3.1. Specifications................................................................................................................................................................20 4.3.2. Measurement Process...............................................................................................................................................21 4.3.3. Socket..............................................................................................................................................................................22 4.4. Ultrasonic Sensor (MaxSonar from MaxBotix)............................................................................................................ 22 4.4.1. Specifications................................................................................................................................................................22 4.4.2. Measurement Process...............................................................................................................................................24 4.4.3. Socket..............................................................................................................................................................................26
-2-
v4.2
Index 4.5. Humidity Sensor (808H5V5)................................................................................................................................................... 26 4.5.1. Specifications................................................................................................................................................................26 4.5.2. Measurement Process...............................................................................................................................................27 4.5.3. Socket..............................................................................................................................................................................28 4.6. Temperature Sensor (MCP9700A)........................................................................................................................................ 28 4.6.1. Specifications................................................................................................................................................................28 4.6.2. Measurement Process...............................................................................................................................................29 4.6.3. Socket..............................................................................................................................................................................30 4.7. Luminosity Sensor (LDR)......................................................................................................................................................... 30 4.7.1. Especificaciones...........................................................................................................................................................30 4.7.2. Measurement Process...............................................................................................................................................30 4.7.3. Socket..............................................................................................................................................................................31 4.8. Displacement Foil Sensor (MTP sensor from Metallux and MagnetoPots from Spectra Symbol)................ 31 4.8.1. Specifications................................................................................................................................................................31 4.8.2. Measurement Process...............................................................................................................................................32 4.8.3. Socket..............................................................................................................................................................................33 4.9. Sockets for casing...................................................................................................................................................................... 34
6. Consumption...................................................................................................................................... 41
6.1. Power control.............................................................................................................................................................................. 41 6.2. Tables of consumption............................................................................................................................................................. 41 6.3. Low consumption mode......................................................................................................................................................... 42
-3-
v4.2
General
1. General
1.1. General and safety information
In this section, the term Waspmote encompasses both the Waspmote device itself and its modules and sensor boards. Read through the document General Conditions of Libelium Sale and Use. Do not allow contact of metallic objects with the electronic part to avoid injuries and burns. NEVER submerge the device in any liquid. Keep the device in a dry place and away from any liquid which may spill. Waspmote consists of highly sensitive electronics which is accessible to the exterior, handle with great care and avoid bangs or hard brushing against surfaces. Check the product specifications section for the maximum allowed power voltage and amperage range and consequently always use a current transformer and a battery which works within that range. Libelium is only responsible for the correct operation of the device with the batteries, power supplies and chargers which it supplies. Keep the device within the specified range of temperatures in the specifications section. Do not connect or power the device with damaged cables or batteries. Place the device in a place only accessible to maintenance personnel (a restricted area). Keep children away from the device in all circumstances. If there is an electrical failure, disconnect the main switch immediately and disconnect that battery or any other power supply that is being used. If using a car lighter as a power supply, be sure to respect the voltage and current data specified in the Power Supplies section. If using a battery in combination or not with a solar panel as a power supply, be sure to use the voltage and current data specified in the Power supplies section. If a software or hardware failure occurs, consult the Libelium Web Development section. Check that the frequency and power of the communication radio modules together with the integrated antennas are allowed in the area where you want to use the device. Waspmote is a device to be integrated in a casing so that it is protected from environmental conditions such as light, dust, humidity or sudden changes in temperature. The board supplied as is is not recommended for a final installation as the electronic components are open to the air and may be damaged.
Further information you may need can be found at: http://www.libelium.com/development/waspmote The General Conditions of Libelium Sale and Use document can be found at: http://www.libelium.com/development/waspmote/technical_service
-4-
v4.2
2.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 and 3G/GPRS 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
-5-
v4.2
For the internal option, the solar panel is embedded on the front of the enclosure, perfect for use where space is a major challenge.
-6-
v4.2
-7-
v4.2
Tri-Band UMTS UMTS 900/1900/2100 0,25W 2100/1900/900MHz GSM 850MHz/900MHz 2W Quad-Band GSM/EDGE, 850/900/1800/1900 MHz DCS1800MHz/PCS1900MHz 1W
-8-
v4.2
Figure 8: Meshlium
-9-
v4.2
-10-
v4.2
2.10. Models
There are some defined configurations of Waspmote Plug & Sense! depending on which sensors are going to be used. Waspmote Plug & Sense! configurations allow to connect 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.
D
Figure 11: Identification of sensor sockets
-11-
v4.2
-12-
v4.2
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.
Note: For more technical information about each sensor probe go to the Development section in Libelium website.
-13-
v4.2
Hardware
3. Hardware
3.1. General Description
The Smart Metering 2.0 Board for Waspmote has been conceived to monitor those parameters that may require to be controlled in a domestic environment. It includes sensors for power and water consumption control, displacement, luminosity and environmental humidity. In the normal version of the board, up to 8 sensors, powered independently, can be connected at the same time, while existing a PRO board version with the necessary electronics for load cell control and adaptation.
3.2. Specifications
Weight: 20gr Dimensions: 73.5 x 51 x 1.3 mm Temperature Range: [-20C, 65C]
-14-
v4.2
Sensors
4. Sensors
4.1. Current Sensor
4.1.1. Specifications
Maximum primary current: 100A Turns ratio: 1:2000 approximately Minimum resolution: 130mA approximately Measurement range: 500mA ~ 40A
Figure 16: Current clamp
-15-
v4.2
Sensors
You can find a complete example code for reading the current sensor in the following link: www.libelium.com/development/waspmote/examples/sm-4-current-sensor-reading
-16-
v4.2
Sensors
4.1.3. Socket
The clamp should be connected to the board through the power jack connector in socket 1. We can see an image of socket 1 in figure 18.
Figure 19: Picture of the Smart Metering 2.0 Board with socket 1 highlighted
-17-
v4.2
Sensors
-18-
v4.2
Sensors
You can find a complete example code for reading the load cells in the following links: www.libelium.com/development/waspmote/examples/sm-11-5v-load-cell-reading www.libelium.com/development/waspmote/examples/sm-12-10v-load-cell-reading
Output vs Load
600 550 500 450
Load (kg)
-19-
v4.2
Sensors
4.2.3. Socket
Any of the load cell models can be connected to socket 9 on the Smart Metering 2.0 Board. We can see in image 24 the pin correspondence between the input and output wires of the cell and the socket, in function of the supply voltage required.
Note: The load cells can only be integrated in the Smart Metering PRO sensor board.
4.3. Liquid Flow Sensor (FS100A, FS200A and FS400 from Broiltech)
4.3.1. Specifications
FS100A: Flow rate: 0.15 ~ 2.5L/Min Working voltage: +3.3V ~ +24V Working temperature: -10C ~ 120C Pulse number: 3900 pulses/liter Inlet pipe size: 2mm Outlet pipe size: 4mm Accuracy: 0.5% Max rated current: 8mA FS200A: Flow rate: 0.5 ~ 25L/Min Working voltage: +3.3V ~ +24V Working temperature: -10C ~ 120C Pulse number: 450 pulses/liter Pipe connection: Accuracy: 1% Max rated current: 8mA
-20-
v4.2
Sensors
FS400: Flow rate: 1 ~ 60L/Min Working voltage: +3.3V ~ +24V Working temperature: -10C ~ 120C Pulse number: 390 pulses/liter Pipe connection: 1 Accuracy: 2% Max rated current: 8mA
Figure 27: Image of the Liquid FS400 Flow sensor
The flow sensors may be connected on sockets 5, for a power supply of 3.3V, or 4, for a power supply of 5V. Below, a small sample of a code for reading the flow sensors is shown:
{ SensorSmartv20.ON(); SensorSmartv20.setSensorMode(SENS_ON, SENS_SMART_FLOW); delay(50); float value_flow; value_flow = SensorSmartv20.readValue(SENS_SMART_FLOW, SENS_FLOW_FS100); }
You can find a complete example code for reading the flow sensors in the following links: www.libelium.com/development/waspmote/examples/sm-5-flow-sensor-on-3v3-socket-reading www.libelium.com/development/waspmote/examples/sm-6-flow-sensor-on-5v-socket-reading
-21-
v4.2
Sensors
4.3.3. Socket
Flow sensors can be connected to sockets 5, for a 3.3V power supply, and 4, for a 5V power supply, as shown in figure 28.
-22-
v4.2
Sensors
LV-MaxSonar-EZ0 Operation frequency: 42kHz Maximum detection distance: 645cm Sensitivity (analog output): 2.5mV/cm (powered at 3.3V) 3.8mV/cm (powered at 5V) Power supply: 3.3 ~ 5V Consumption (average): 2mA (powered at 3.3V) 3mA (powered at 5V) Usage: Indoors
Figure 32: Ultrasonic LV-MaxSonarEZ0 from MaxBotix sensor
-23-
v4.2
Sensors
You can find a complete example code for reading the ultrasound sensors in the following links: www.libelium.com/development/waspmote/examples/sm-7-ultrasound-sensor-on-3v3-socket-reading www.libelium.com/development/waspmote/examples/sm-8-ultrasound-sensor-on-5v-socket-reading
In figure 33 we can see a drawing of two example applications for the ultrasonic sensors, such as liquid level monitoring or presence detection.
The XL-MaxSonar-WRA1 sensor is endowed with an IP-67 casing, so it can be used in outdoors applications, such as liquid level monitoring in storage tanks. In the figure below we can see a diagram of the detection range of both sensors developed using different detection patterns (a 0.63cm diameter dowel for diagram A, a 2.54cm diameter dowel for diagram B, a 8.25cm diameter rod for diagram C and a 28cm wide board for diagram D):
-24-
v4.2
Sensors
Figure 35: Diagram of the sensor beam extracted from the data sheet of the XL-MaxSonar-WRA1 sensor from MaxBotix
Figure 36: Diagram of the sensor beam extracted from the data sheet of the LV-MaxSonar-EZ0 sensor from MaxBotix
-25-
v4.2
Sensors
4.4.3. Socket
Since this sensor may be powered at 3.3V or 5V, it can be placed on any of the sockets 2 and 8 (5V) or 3 and 6 (3,3V). In figure 36 sockets 2 and 3 are shown.
-26-
v4.2
Sensors
You can find a complete example code for reading the humidity sensor in the following link: www.libelium.com/development/waspmote/examples/sm-2-humidity-sensor-reading
Figure 39: 808H5V5 humidity sensor output taken from the Sencera Co. Ltd sensor data sheet
-27-
v4.2
Sensors
4.5.3. Socket
This sensor may be connected to any of the sockets prepared for analog sensors powered at 5V, i.e. sockets2 and 8, shown in figure 39, where the function of each pin has been indicated.
-28-
v4.2
Sensors
You can find a complete example code for reading the temperature sensor in the following link: www.libelium.com/development/waspmote/examples/sm-1-temperature-sensor-reading
Figure 42: Graph of the MCP9700A sensor output voltage with respect to temperature, taken from the Microchip sensors data sheet
-29-
v4.2
Sensors
4.6.3. Socket
Placing the MCP9700A sensor on socket 6 is recommended. Even though, since the sensor may be powered with 3.3V or 5V, it can be placed on any of the sockets for analog sensors. We have an image of socket 6 in figure 42, where the function of each pin has been indicated.
-30-
v4.2
Sensors
You can find a complete example code for reading the LDR sensor in the following link: www.libelium.com/development/waspmote/examples/sm-3-ldr-sensor-reading
4.7.3. Socket
This sensor has been thought to be placed on socket 7, specifically configured for it. We have an image of the sockets in figure 44, where the function of each pin has been indicated.
4.8. Displacement Foil Sensor (MTP sensor from Metallux and MagnetoPots from Spectra Symbol)
4.8.1. Specifications
Length: 200mm Resistance range: 0 ~ 10k Minimum resolution: 1mm approximately Consumption: 0.33mA (socket 3) ~ 1.6mA (socket 2)
-31-
v4.2
Sensors
You can find a complete example code for reading the displacement foil sensors in the following link: www.libelium.com/development/waspmote/examples/sm-9-linear-displacement-sensor-on-3v3-socket-reading www.libelium.com/development/waspmote/examples/sm-10-linear-displacement-sensor-on-5v-socket-reading
-32-
v4.2
Sensors
1 2
3 4
8 9 10 11 12 13 14 15 16 17 18 19 20
4.8.3. Socket
Like the ultrasonic sensors, both kind of sensors can be placed on any of the sockets 2 and 8 (5V) or 3 and 6 (3,3V). In figure 48 sockets 2 and 3 are shown.
-33-
v4.2
Sensors
Figure 50: Diagram of a socket extracted from the Phoenix Contact data sheet
-34-
v4.2
Sensors
In the figure below an image of the board with the sockets in it and the correspondence between its inputs and the sensors pins is shown.
Figure 52: Image of the pin correspondence between the sockets and the sensors
-35-
v4.2
Sensors
Sensor Socket 1 Pin 1 2 3 Socket 2 4 5 6 Socket 3 7 8 9 Socket 4 10 11 12 Socket 5 13 14 15 Socket 6 16 17 Socket 7 18 19 20 Socket 8 21 22 23 24 Socket 9 25 26 27 Function Input 1 (no polarity) Input 2 (no polarity) GND Output Vcc (5V) GND Vcc (3.3V) Output GND Output Vcc (5V) GND Output Vcc (3.3V) GND Output Vcc (3.3V) Vcc (3.3V) Output GND Output Vcc (5V) Output Output + GND Vcc (10V) Vcc (5V)
-36-
v4.2
5.2. API
When using this board remember it is mandatory to include the SensorSmartv20 library by introducing the next line at the beginning of the code:
#include <WaspSensorSmart_v20.h>
The functions to handle all the features of the board, included in the WaspSensorSmart_v20 API library, are detailed below:
SensorSmartv20.ON()
Turns on the sensor board by activating the 3.3V and 5V supply lines.
SensorSmartv20.OFF()
Turns off the sensor board by cutting the 3.3V and 5V supply lines.
SensorSmartv20.setBoardMode(MODE)
This function is used to manage the power supply applied to the Smart Metering 2.0 board. Assigning the value SENS_ON to the variable MODE activates the Waspmotes switches which allow the passage of the 3.3V and 5V voltages, while assigning SENS_OFF disconnects both switches cutting the power.
SensorSmartv20.setSensorMode(MODE, SENSOR)
This function, similar to setBoardMode, allows to activate or deactivate the power of each sensor independently. The state on which the sensor should be set is defined through the variable MODE, which can take the values SENS_ON, to connect the power of the sensor, or SENS_OFF, to disconnect it. The sensor, circuit or group of sensors that we are going to manage is stored in the variable SENSOR, that can take the following values:
SENS_SMART_US_3V3, to activate the ultrasound sensor on socket 3. SENS_SMART_US_5V, to activate the ultrasound sensor on socket 2. SENS_SMART_FLOW_3V3, to activate the flow sensor on socket 5. SENS_SMART_FLOW_5V, to activate the flow sensor on socket 4. SENS_SMART_DFS_3V3, to activate the displacement foil sensor on socket 3. SENS_SMART_DFS_5V, to activate the displacement foil sensor on socket 2. SENS_SMART_LCELLS_10V, to activate the load cells 10V supply line. SENS_SMART_LCELLS_5V, to activate the load cells 5V supply line. SENS_SMART_CURRENT, to activate the current sensor. SENS_SMART_TEMPERATURE, to activate the temperature sensor on socket 6. SENS_SMART_HUMIDITY, to activate the humidity sensor on socket 8. SENS_SMART_LDR, to read the activate sensor on socket 7.
As said in section Power control, the LDR, TEMPERATURE and HUMIDITY sensors, the two FLOW sensors and the two ultrasound sensors are powered through the same switch, so when turning on or off one of them you will be acting on the whole group. -37v4.2
The function readValue may be used to execute the configuration, conversion and reading process of any of the sensors on the board through the analog-to-digital converter. In the variable SENSOR the sensor to be read is introduced. The values that can be assigned to this variable are:
SENS_SMART_US_3V3, to read the ultrasound sensor on socket 3. SENS_SMART_US_5V, to read the ultrasound sensor on socket 2. SENS_SMART_FLOW_3V3, to read the flow sensor on socket 5. SENS_SMART_FLOW_5V, to read the flow sensor on socket 4. SENS_SMART_LCELLS_10V, to read the load cells. SENS_SMART_LCELLS_5V, to read the load cells. SENS_SMART_DFS_3V3, to read the displacement foil sensor on socket 3. SENS_SMART_DFS_5V, to read the displacement foil sensor on socket 2. SENS_SMART_CURRENT, to read the current sensor. SENS_SMART_TEMPERATURE, to read the temperature sensor on socket 6. SENS_SMART_HUMIDITY, to read the humidity sensor on socket 8. SENS_SMART_LDR, to read the luminosity sensor on socket 7.
The TYPE parameter, used when reading ultrasound or flow sensors, indicates the model of the sensor to be read. It may take the values:
SENS_US_WRA1, to refer to the XL-MaxSonar-WRA1 ultrasound sensor. SENS_US_EZ0, to refer to the LV-MaxSonar-EZ0 ultrasound sensor. SENS_FLOW_FS100, to refer to the FS100A flow sensor. SENS_FLOW_FS200, to refer to the FS200A flow sensor. SENS_FLOW_FS400, to refer to the FS400 flow sensor.
A basic program to detect events from the board will present a similar structure to the following, subject to changes in dependence of the application: 1. The board is switched on using the function SensorSmartv20.setBoardMode. 2. Turn on those inactive sensors to be read using function SensorSmartv20.setSensorMode. 3. Take the measurements needed using function SensorSmartv20.readValue. 4. Turn off the sensors with function SensorSmartv20.setSensorMode. Store or send via a radio module the gathered information. Put the mote to sleep with the functions PWR.sleep or PWR.deepSleep.
-38-
v4.2
/* ------------Smart Metering v20 board example-------------- www.Libelium.com */ // Inclusion of the Smart Metering v20 Board library #include <WaspSensorSmart_v20.h> // Inclusion of the Frame library #include <WaspFrame.h> // Inclusion of the XBee 802.15.4 library #include <WaspXBee802.h> float current_value = 0; float temperature_value = 0; float flow_value = 0; // Pointer to an XBee packet structure packetXBee* packet; void setup() { } void loop() { //Switch on the board SensorSmartv20.ON(); delay(100); // Init RTC RTC.ON(); delay(100); //Turn on the current sensor SensorSmartv20.setSensorMode(SENS_ON, SENS_SMART_CURRENT); delay(50); //Read the current value from the Current sensor current_value = SensorSmartv20.readValue(SENS_SMART_CURRENT); //Turn off the current sensor SensorSmartv20.setSensorMode(SENS_OFF, SENS_SMART_CURRENT); //Turn on the temperature sensor on socket 6 SensorSmartv20.setSensorMode(SENS_ON, SENS_SMART_TEMPERATURE); delay(50); //Read the temperature value from the MCP9700A sensor temperature_value = SensorSmartv20.readValue(SENS_SMART_TEMPERATURE); //Turn off the temperature sensor on socket 6 SensorSmartv20.setSensorMode(SENS_OFF, SENS_SMART_TEMPERATURE); //Turn on the flow sensor on socket 5 SensorSmartv20.setSensorMode(SENS_ON, SENS_SMART_FLOW_3V3); delay(50); //Read the flow value from the FS100A sensor flow_value = SensorSmartv20.readValue(SENS_SMART_FLOW_3V3, SENS_FLOW_FS100); //Turn off the flow sensor on socket 5 SensorSmartv20.setSensorMode(SENS_OFF, SENS_SMART_FLOW_3V3);
-39-
v4.2
-40-
v4.2
Consumption
6. Consumption
6.1. Power control
The Smart Metering 2.0 Board for Waspmote requires both the 3.3V and 5V power supplies output from the mote. In the PRO version of the board a DC-DC converter is used to get the 15V voltage needed by the 5V and 10V voltage references for load cells. A combination of transistors and solid state switches is used to control independently the power supply of the components in the board and the sensors connected to it: First of all, the load cells, that have to be powered at 15V are controlled independently through a series of MOSFET transistors that may handle higher currents and voltages than those permitted at the solid state switches. This way, the 10V and 5V voltage references supply can be controlled through signals DIGITAL3 and DIGITAL4 respectively. The activation of any of those signals will also activate the DC-DC converter. The remaining sensors are controlled using solid state switches. The supply voltage of the electronics used to adapt the current clamp is controlled through signal DIGITAL5, the humidity, luminosity and temperature sensors (sockets 6, 7 and 8), that require both 5V and 3.3V supplies, are controlled via signal DIGITAL8, ultrasound sensors (sockets 2 and 3) are both controlled via signal DIGITAL2 and flow sensors (sockets 4 and 5) via signal DIGITAL6. All these switches may be controlled through the SensorSmartv20.setBoardMode and SensorSmartv20.setSensorMode functions implemented in the API. You can find more information about it in section API.
-41-
v4.2
Consumption
-42-
v4.2
Consumption
7. API Changelog
Function / File #include SensorSmartv20.ON() SensorSmartv20.OFF() SENS_SMART_LCELLS Changelog Version Remember to include the WaspSensorSmart_v20 library in the top v.31 v1.0 of your pde New function to turn on the board New function to turn off the board v.31 v1.0 v.31 v1.0
Variable SENS_SMART_LCELLS disappears and is replace by SENS_ SMART_LCELLS_5V and SENS_SMART_LCELLS_10V, now it will not v.31 v1.0 be necessary to modify the API file to select which kind of load cell is held
-43-
v4.2
Documentation changelog
8. Documentation changelog
Added references to 3G/GPRS Board in section: Radio Interfaces
-44-
v4.2
Maintenance
9. Maintenance
In this section, the term Waspmote encompasses both the Waspmote device itself as well as its modules and sensor boards. Take care with the handling of Waspmote, do not drop it, bang it or move it sharply. Avoid putting the devices in areas of high temperatures since the electronic components may be damaged. The antennas are lightly threaded to the connector; do not force them as this could damage the connectors. Do not use any type of paint for the device, which may damage the functioning of the connections and closure mechanisms.
-45-
v4.2
-46-
v4.2