Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety...

33
wasp m o te Gases 1.0 Technical Guide

Transcript of Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety...

Page 1: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

waspmote

Gases 1.0Technical Guide

Page 2: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-2- v0.7

INDEX

1. General ................................................................................................................................................. 41.1. General and safety information ..............................................................................................................................................41.2. Conditions of use .........................................................................................................................................................................4

2. Hardware .............................................................................................................................................. 52.1. General Description ....................................................................................................................................................................52.2. Specifications ................................................................................................................................................................................52.3. Electrical Characteristics ............................................................................................................................................................6

3. Sensors ................................................................................................................................................. 73.1. General considerations in the use of the sensors .............................................................................................................73.2. Humidity Sensor – 808H5V5 ....................................................................................................................................................8

3.2.1. Specifications .................................................................................................................................................................83.2.2. Measurement Process.................................................................................................................................................8

3.3. Temperature Sensor – MCP9700A .........................................................................................................................................93.3.1. Specifications .................................................................................................................................................................93.3.2. Measurement Process.................................................................................................................................................9

3.4. Atmospheric Pressure Sensor - MPX4115A .....................................................................................................................103.4.1. Specifications ...............................................................................................................................................................103.4.2. Measurement Process...............................................................................................................................................11

3.5. Carbon Monoxide (CO) Sensor – TGS2442 .......................................................................................................................123.5.1. Specifications ...............................................................................................................................................................123.5.2. Measurement Process...............................................................................................................................................12

3.6. Carbon Dioxide (CO2) Sensor – TGS4161 ..........................................................................................................................133.6.1. Specifications ...............................................................................................................................................................133.6.2. Measurement Process...............................................................................................................................................13

3.7. Molecular Oxygen (O2) Sensor – SK-25 ..............................................................................................................................143.7.1. Specifications ...............................................................................................................................................................143.7.2. Measurement Process...............................................................................................................................................14

3.8. Nitrogen Dioxide (NO2) Sensor - MiC-2710 ......................................................................................................................153.8.1. Specifications ...............................................................................................................................................................153.8.2. Measurement Process...............................................................................................................................................15

3.9. Ammonia (NH3) sensor – TGS2444 ......................................................................................................................................163.9.1. Specifications ...............................................................................................................................................................163.9.2. Measurement Process...............................................................................................................................................16

3.10. Methane (CH4) sensor – TGS2611 ......................................................................................................................................173.10.1. Specifications ............................................................................................................................................................173.10.2. Measurement Process ............................................................................................................................................17

3.11. Liquefied Petroleum Gas Sensor (TGS2610) .................................................................................................................183.11.1. Specifications ............................................................................................................................................................18

Index

Document version: v0.7 - 06/2012 © Libelium Comunicaciones Distribuidas S.L.

Page 3: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-3- v0.7

Index

3.11.2. Measurement Process ............................................................................................................................................183.12. Air Contaminants Sensor (TGS2600) ...............................................................................................................................19

3.12.1. Specifications ............................................................................................................................................................193.12.2. Measurement Process ............................................................................................................................................19

3.13. Air Contaminants Sensor (TGS2602) ...............................................................................................................................203.13.1. Specifications ............................................................................................................................................................203.13.2. Measurement Process ............................................................................................................................................20

3.14. Solvent Vapors Sensor (TGS2620) .....................................................................................................................................213.14.1. Specifications ............................................................................................................................................................213.14.2. Measurement Process ............................................................................................................................................21

3.15. Ozone (O3) Sensor (MiCS-2610) .........................................................................................................................................223.15.1. Specifications ............................................................................................................................................................223.15.2. Measurement Process ............................................................................................................................................22

3.16. VOC’s Sensor (MiCS-5521) ...................................................................................................................................................233.16.1. Specifications ............................................................................................................................................................233.16.2. Measurement Process ............................................................................................................................................23

3.17. Design and connections ......................................................................................................................................................243.17.1. Connector 1 ...............................................................................................................................................................243.17.2. Connector 2 ...............................................................................................................................................................243.17.3. Connectors 3 and 4 .................................................................................................................................................26

4. Board configuration and programming .......................................................................................... 274.1. Hardware configuration .........................................................................................................................................................274.2. API ...................................................................................................................................................................................................27

5. Consumption ..................................................................................................................................... 305.1. Power control .............................................................................................................................................................................305.2. Tables of Consumption ...........................................................................................................................................................305.3. Low Consumption Mode ........................................................................................................................................................30

6. Maintenance ...................................................................................................................................... 32

7. Disposal and recycling ...................................................................................................................... 33

Page 4: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-4- v0.7

General

1. General

1.1. General and safety information• Inthissection,theterm“Waspmote”encompassesboththeWaspmotedeviceitselfanditsmodulesandsensorboards.• Readthroughthedocument“GeneralConditionsofLibeliumSaleandUse”.• Donotallowcontactofmetallicobjectswiththeelectronicparttoavoidinjuriesandburns.• NEVERsubmergethedeviceinanyliquid.• Keepthedeviceinadryplaceandawayfromanyliquidwhichmayspill.• Waspmoteconsistsofhighly sensitiveelectronicswhich is accessible to theexterior,handlewithgreat careandavoid

bangs or hard brushing against surfaces.• Checktheproductspecificationssectionforthemaximumallowedpowervoltageandamperagerangeandconsequently

alwaysuseacurrenttransformerandabatterywhichworkswithinthatrange.Libeliumisonlyresponsibleforthecorrectoperationofthedevicewiththebatteries,powersuppliesandchargerswhichitsupplies.

• Keepthedevicewithinthespecifiedrangeoftemperaturesinthespecificationssection.• Donotconnectorpowerthedevicewithdamagedcablesorbatteries.• Placethedeviceinaplaceonlyaccessibletomaintenancepersonnel(arestrictedarea).• Keepchildrenawayfromthedeviceinallcircumstances.• Ifthere isanelectrical failure,disconnectthemainswitchimmediatelyanddisconnectthatbatteryoranyotherpower

supply that is being used.• Ifusingacar lighterasapowersupply,besureto respect thevoltageandcurrentdataspecified in the“PowerSupplies”

section.• Ifusingabatteryincombinationornotwithasolarpanelasapowersupply,besuretousethevoltageandcurrentdata

specifiedinthe“Powersupplies”section.• Ifasoftwareorhardwarefailureoccurs,consulttheLibeliumWebSupportsection.• Check that the frequency andpowerof the communication radiomodules togetherwith the integratedantennas are

allowed in the area where you want to use the device.• Waspmoteisadevicetobeintegratedinacasingsothatitisprotectedfromenvironmentalconditionssuchaslight,dust,

humidityorsuddenchangesintemperature.Theboardsupplied“asis”isnotrecommendedforafinalinstallationastheelectronic components are open to the air and may be damaged..

1.2. Conditions of use• Readthe“GeneralandSafetyInformation”sectioncarefullyandkeepthemanualforfutureconsultation.• UseWaspmote in accordancewith the electrical specifications and the environment described in the“Electrical Data”

section of this manual.• Waspmoteanditscomponentsandmodulesaresuppliedaselectronicboardstobeintegratedwithinafinalproduct.This

productmustcontainanenclosuretoprotectitfromdust,humidityandotherenvironmentalinteractions.Intheeventofoutsideuse,thisenclosuremustberatedatleastIP-65.

• DonotplaceWaspmoteincontactwithmetallicsurfaces;theycouldcauseshort-circuitswhichwillpermanentlydamageit.

Further information you may need can be found at http://www.libelium.com/waspmote.

The“GeneralConditionsofLibeliumSaleandUse”documentcanbefoundat:http://www.libelium.com/legal

Page 5: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-5- v0.7

Hardware

2. Hardware

2.1. General DescriptionTheWaspmotegasessensorboardhasbeendesignedtomonitorenvironmentalparameterssuchastemperature, humidity, atmospheric pressure and 14 different types of gases. It allows the inclusion of 6gasessensorsatthesametime,theregulationof their power through a system of solid state switches and the amplification of the output signal of each one of them through a non-inverting amplification stage of a maximum gain of 101 controlled by a digital potentiometer configurable through the Inter-IntegratedCircuitBus,I2C).

The gases which can be monitored are:

- Carbon Monoxide – CO- Carbon Dioxide – CO2

- Molecular Oxygen – O2

- Methane – CH4

- Molecular Hydrogen – H2

- Ammonia – NH3

- Isobutane – C4H10

- Ethanol – CH3CH2OH- Toluene – C6H5CH3

- Hydrogen Sulphide – H2S- Nitrogen Dioxide – NO2

- Ozone – O3

- Volatile Organic Compounds (VOC’s)- Hydrocarbons

2.2. SpecificationsWeight: 20grDimensions: 73.5 x 51 x 1.3 mmTemperatureRange: [-20ºC,65ºC]

Figure 1: Upper side

Page 6: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-6- v0.7

Hardware

Sensors compatibility:

• thereisadedicatedsocketforeachofthefollowingsensors:

- temperature

- humidity

- air pressure

- CO2(socket1A)

- O2(socket1B)

• therecanbejustoneofthefollowingsensorsinonegasboard:NO2,VOCandO3(socket2B).TheVOCandO3 sensors require ahardwaremodificationinthegasboard,whichisdoneinLibelium.

• sockets2A,3and4areavailablefortherestofthesensors.

• COandNH3sensorscanonlybeplacedinthesockets3or4.

2.3. Electrical CharacteristicsBoard power voltage: 3.3V and 5V

Sensor power voltage: 5V

Maximum admitted current (continuous): 200mA

Maximum admitted current (peak): 400mA

Page 7: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-7- v0.7

Sensors

3. Sensors

3.1. General considerations in the use of the sensorsA very similar structure has been installed for all the connectors for the gas sensors: a load resistance at the output of each sensor,exceptinconnectors1Aand1Bwhereitisnotnecessary,combinedwithanamplificationstageofmaximumgain101.Connectors 1A and 1B on one side and 2A and 2B on the other side share the same amplification stage and the same output to themicroprocessor.Formoredetailsontheconnectors,seesection3.17inthismanual.

The choice of amplification stage gain and of the sensor’s load resistance can be carried out according to two parameters: the specificsensoravailable,sincetheremaybesignificantvariationsbetweentwodifferentsensorsofthesamemodel,andthevalue and range of concentrations of gas to be monitored.

Important: when selecting load resistance and amplification itmust be remembered that, although the sensorsmust bepoweredbyavoltageof5Vtofunctionappropriately,theWaspmoteallowsinputbetween0and3.3V,soitwillbenecessarytocalculatetheresistance,loadandgainvaluestoadaptthemeasurementrangeofthesensortotheWaspmoteinput.

The amplification stage gain and load resistance of a connector can be configured through a simple group of commands availableintheSensorGaslibrary,createdtofacilitatehandlingoftheboardfromtheWaspmotemote.Formoreinformationonthelibraryinstructionsandstepstofollowfortheconfigurationofthesensors,consultsection4.2ofthismanual.

Theaccuracywhichcanbeobtainedinthesensor’soutputvaluewillbedependentonthewayinwhichitissupplied.Thisway,thelongerthepowertimeordutycycle,asappropriate,thebetteraccuracywillbeobtained.Thedisadvantageofprolongedpowerisanincreaseinthemote’sconsumption,withtheconsequentdecreaseofthebattery’slife,soadjustingthepowerofeach sensor to the requirements of the specific application being developed is recommended to optimise the equipment’s performance.

Thecalculationofthesensor’sresistance,fromwhichtheconcentrationofgasvaluecanbeobtainedusingthegraphsincludedinthismanualandinthesensors’datasheets,canbemadeusingthefollowingequation:

Rs=VcxRI/Vout-RI

InwhichRsisthesensor’soutputresistance,Vcitspower(5VforanysensorexceptNO2,whichispoweredat1.8V),VoutistheoutputvoltagemeasurementandRItheloadresistancewhichhasbeendefined.

Whenasensorremainswithoutpowerforaprolongedperioditispossiblethatitshowsanunstableoutput.Thisstabilityisregained after spending time switched on or after many consecutive cycles of power supply.

Sensitivityofthesensormayvarywhenthedeviceissubjectedtolargevariationsintemperatureorhumidity,forexampleinoutdoorconditions.Tocompensateforthesevariations,usethetablesandgraphsusedinthesensors’datasheets.

Page 8: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-8- v0.7

Sensors

3.2. Humidity Sensor – 808H5V5

3.2.1. Specifications

Measurement range: 0~100%RHOutput signal: 0.8~3.9V(25ºC)Accuracy: <±4%RH(at25ºC,range30~80%),<±6%RH(range0~100)Supply voltage: 5VDC ±5%Operating temperature:-40~+85ºCResponse time: <15 secondsTypical consumption: 0.38mAMaximum consumption: 0.5mA

3.2.2. Measurement Process

This is an analog sensor which provides a voltage output proportional to the relative humidity in the atmosphere. As the sensor’ssignalrangeisoutsideofthatpermittedtotheWaspmote’sinput,avoltagedividerhasbeeninstalledwhichconvertsthe output voltage to values between 0.48 ~ 2.34V.

Thesensorremainspoweredprovidedthattheboard’s5Vsupplyisswitchedon,sothatforitsreadingitisonlynecessarytoexecute the capture command of the analog value of the pin to which the sensor is connected (ANALOG4).

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); delay(100); value = SensorGas.readValue(SENS_HUMIDITY);}

Figure 3: 808H4V5 Humidity sensor output taken from the Sencera Co. Ltd sensor data sheet.

Figure 2: Image of the 808H5V5 sensor

Page 9: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-9- v0.7

Sensors

ThissensorhasitsownconnectorontheWaspmotegassensorboard:

Figure 4: Image of the sensor connector on the Waspmote gas sensor board.

3.3. Temperature Sensor – MCP9700A

3.3.1. Specifications

Measurement range:[-40ºC,+125ºC]Output voltage (0°C): 500mVSensitivity: 10mV/ºCAccuracy:±2ºC(range0ºC~+70ºC),±4ºC(range-40~+125ºC)Supply voltage: 2.3 ~ 5.5VResponse time:1.65 seconds (63% response from +30 to +125°C).Typical consumption: 6μAMaximum consumption: 12μA

3.3.2. Measurement Process

The MCP9700A is an analog sensor which converts a temperature value into a proportional analog voltage. The range of outputvoltagesisbetween100mV(-40°)and1.75V(125°C),resultinginavariationof10mV/°C,with500mVofoutputfor0°C.TheoutputcanthusbereaddirectlyfromWaspmotethroughthecapturecommandofthepin’sanalogvaluetowhichit isconnected (ANALOG1).

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); delay(100); value = SensorGas.readValue(SENS_TEMPERATURE);}

Figure 5: Image of the MCP9700A temperature sensor

Page 10: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-10- v0.7

Sensors

Figure 6: Graph of the MCP9700A sensor output voltage with respect to temperature, taken from the Microchip sensor’s data sheet

ThissensorhasitsownconnectorontheWaspmotegassensorboard:

Figure 7: Image of the temperature sensor connector of the Waspmote gas sensor board.

3.4. Atmospheric Pressure Sensor - MPX4115A

3.4.1. Specifications

Measurement range: 15~115kPaOutput signal: 0,2~4,8V(0~85ºC)Sensitivity: 46mV/kPaAccuracy: <±1,5%V(0~85ºC)Typical consumption: 7mAMaximum consumption: 10mASupply voltage: 4.85 ~ 5.35VOperation temperature: -40~+125ºCStorage temperature: -40~+125ºCResponse time: 20ms

Figure 8: MPX4115A Sensor

Page 11: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-11- v0.7

Sensors

3.4.2. Measurement Process

The MPX4115A sensor converts atmospheric pressure to an analog voltage value in a range covering between 0.2V and 4.8V. As thisisarangewhichexceedsthemaximumvalueadmittedbyWaspmote,itsoutputhasbeenadaptedtofitinarangebetween0.12V and 2.88V.

To read the sensor it is sufficient to capture the analog value in its input (ANALOG5) via the corresponding command.

Figure 9: Graph of the MPX4115A sensor’s output voltage with regard to pressure taken from the Freescale sensor’s data sheet

ReadingCode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.setSensorMode(SENS_ON, SENS_PRESSURE); delay(30); value = SensorGas.readValue(SENS_PRESSURE); }

ThissensorhasitsownconnectorontheWaspmotegassensorboard:

Figure 10: Image of the socket for the MPX4115A sensor

Page 12: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-12- v0.7

Sensors

3.5. Carbon Monoxide (CO) Sensor – TGS2442

3.5.1. Specifications

Gases: COMeasurement range: 30 ~ 1000ppmResistance at 100ppm: 13.3~133kΩSensitivity: 0.13 ~ 0.31 (ratio between the resistance at 300ppm and at 100ppm)Supply voltage: 5V ±0.2V DCOperating temperature:-10~+50ºCResponse time: 1 secondMinimum load resistance: 10kΩAverage consumption:3mA (throughout the complete power supply cycle in one second)

3.5.2. Measurement Process

TheTGS2442isaresistivesensorsensitivetothechangesinconcentrationofCarbonMonoxide(CO)and,veryslightly,Hydrogen(H2),whichmaybeplacedintheboard’ssocket3and4,andmustbeconnectedinthewayindicatedinimages38and39ofsection3.17.3aboutthesetwoconnectors.Thesensor’sresistancewouldvaryaccordingtothegraphinfigure12,whichmaypresentsignificantvariationsbetweentwodifferentsensors,soitisrecommendedtoconsultthesensor’sdocumentationtochoose the load resistance and amplification gain and calibrate it before finally inserting it into the application.

Readingthissensorrequiresacycleofonesecondthroughoutwhichtwopowersupplypulsesaregeneratedonheatresistanceand resistance sensitive of 14ms and 5ms each (average consumption throughout the power supply cycle is 3mA). The execution of this cycle and the reading of the sensor can be done automatically using the functions of the SensorGas library.

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENSOR,GAIN,RESISTOR); value = SensorGas.readValue(SENSOR);}

SENSORindicatesthesocketintowhichitistobeinserted,forthissensor:SENS_SOCKET3BorSENS_SOCKET4BGAIN indicates the chosen gain for the sensor.RESISTORindicatestheloadresistancetobeintroduced

Figure 12: Graph of the sensitivity of the TGS2442 taken from the Figaro sensor’s data sheet

Figure 11: Image of the TGS2442 sensor

Page 13: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-13- v0.7

Sensors

3.6. Carbon Dioxide (CO2) Sensor – TGS4161

3.6.1. Specifications

Gases: CO2

Measurement range: 350 ~ 10000ppmVoltage at 350ppm: 220 ~ 490mVSensitivity: 44 ~ 72mV (variation between the voltage at 350ppm and at 3500ppm)Supply voltage: 5V ±0.2V DCOperating temperature: -10~+50ºCResponse time: 1.5 minutesAverage consumption: 50mA

3.6.2. Measurement Process

The TGS4161 sensor provides a voltage output proportional to the CO2 concentration in the atmosphere. It shows a value between 220 and 490mV for a concentration of 350ppm (approximately the normal CO2 concentration in the air) decreasing as theamountofgasincreases.Differentsensorsmayshowalargevariabilityintheinitialvoltagevaluesat350ppmandsensitivity,so it is recommended to calibrate each sensor before including it in the application.

The accuracy that this sensor can offer would vary depending on the time it has remained powered before being measured. A timeof30secondsissufficienttodetectsignificantchangesinconcentration,whileahighaccuracymeasurementwillrequireat least 10 minutes of power.

This sensor must be placed only in connector 1A as indicated in figure 35 which appears in section 3.17.1. To access the sensor’s output value it is enough to execute the SensorGas library command which captures the sensor’s analog value in its input pin (ANALOG3).

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENS_CO2,GAIN); SensorGas.setSensorMode(SENS_ON,SENS_CO2); delay(TIME); value=SensorGas.readValue(SENS_CO2);}

GAIN indicates the chosen gain for the sensor.TIMEisthetimeinmillisecondsthatthesensorremainsonbeforetakingthemeasurement(minimum:30000)

Figure 14: Graph of sensitivity of the TGS4161 taken from the Figaro sensor’s data sheet.

Figure 13: Image of the TGS4161 sensor

Page 14: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-14- v0.7

Sensors

3.7. Molecular Oxygen (O2) Sensor – SK-25

3.7.1. Specifications

Gases: O2

Measurement range: 0 ~ 30%Output range: Approximately 0 ~ 10mVInitial voltage: 5.5 ~ 8.8mVOperating temperature:5~+40ºCResponse time: 15 secondsConsumption: 0μA

3.7.2. Measurement Process

The SK-25 is an analog sensor which provides a voltage output proportional to the O2concentrationintheatmosphere,withoutneedingpowerandthereforewithzeroconsumption.Itshowsanoutputrangebetween0and10mV,withvoltageinstandardconditions (approximately 21% O2 concentration) of between 5.5 and 8.8mV. The output response can vary from one sensor to another,soitisrecommendedtocalibratethesensorbeforefinallyinsertingitintotheapplication.

Thereadingofthesensor,whichmustbe inserted inconnector1Boftheboard,canbecarriedoutusingtheanalogvaluecapture command of the SensorGas library.

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENS_O2,GAIN); value=SensorGas.readValue(SENS_O2);}

GAIN indicates the chosen gain for the sensor.

Figure 16: Graph of the sensitivity of the SK-25 extracted from the Figaro sensor’s data sheet.

Figure 15: Image of the SK-25 sensor

Page 15: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-15- v0.7

Sensors

3.8. Nitrogen Dioxide (NO2) Sensor - MiC-2710

3.8.1. Specifications

Gases: NO2

Measurement range: 0.05 ~ 5ppmAir resistance: 0.8~8kΩ(typically2.2kΩ)Sensitivity:6~100(typically55,ratiobetweentheresistanceat0.25ppmandinair)Supply voltage: 1.7 ~ 2.5V DCOperating temperature:-30~+85ºCResponse time: 30 secondsAverage consumption: 26mA (throughout the complete power supply cycle in one second)

3.8.2. Measurement Process

The MiCS-2710 is a sensor whose resistance varies in the presence of small concentrations of NO2.Thisvaluevariesbetween2kΩand2MΩapproximately,providinghighaccuracythroughouttheoutputrange.Unliketherestoftheboard’sgassensors,whichoperateatavoltageof5V,thissensorispoweredthrougha1.8Vvoltageregulator,withconsumptionofapproximately26mA.Thesensor’sresistanceinair,aswellasitssensitivity,canvarybetweendifferentunits,soitisrecommendedtocalibrateeachone of them before finally inserting them in the application.

Thissensormustbeconnectedinsocket2Boftheboard(itspositionisindicatedinsection3.17.2),anditsoutputcanbereadthrough the capture commands of the SensorGas library:

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENS_SOCKET2B,GAIN,RESISTOR); SensorGas.setSensorMode(SENS_ON,SENS_SOCKET2B); delay(TIME); value=SensorGas.readValue(SENS_SOCKET2B);}

GAIN indicates the chosen gain for the sensor.RESISTORindicatestheloadresistancechosenforthesensorTIMEisthetimeinmillisecondsthatthesensorremainsonbeforetakingthemeasurement(minimum:30000)

Figure 18: Graph of the sensitivity of the MiCS-2710 taken from the e2v’s sensor data

Figure 17: Image of the MiCS-2710 sensor

Page 16: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-16- v0.7

Sensors

3.9. Ammonia (NH3) sensor – TGS2444

3.9.1. Specifications

Gases: NH3,H2SMeasurement range: 10 ~ 100ppmResistance at 10ppm:3.63~36.3kΩSensitivity:0,063~0.63(ratiobetweentheresistanceat3000andat1000ppm)Supply voltage: 5V ±0.2V DCOperating temperature:-10~+50ºCResponse time: 250msMinimum load resistance:8kΩAverage consumption: 12mA (throughout the complete power supply cycle in 250ms)

3.9.2. Measurement Process

The TGS2444 sensor is a resistive sensor which is highly sensitive to variations in the concentration of Ammonia (NH3) and which shows slight sensitivity to hydrogen sulphide (H2S)andtoalesserextent,toHydrogen(H2) and Ethanol (CH3CH2OH). Both the sensor’sinitialresistance(at10ppm)anditssensitivitywouldvarywidelybetweendifferentsensorsofthesamemodel,soitisrecommended to calibrate each one of them independently before finally including them in the application.

Thissensorcanbeplacedonconnectors3and4followingthedirectionindicatedinsection3.17.3.Toreadit,thenecessaryinstructions are in the SensorGas library:

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENSOR,GAIN,RESISTOR); value = SensorGas.readValue(SENSOR);}

SENSORindicatesthesocketintowhichitistobeinserted,forthissensor:SENS_SOCKET3CorSENS_SOCKET4CGAIN indicates the chosen gain for the sensor.RESISTORindicatestheloadresistancechosenforthesensor

Figure 20: Graph of the sensitivity of the TGS2444 taken from the Figaro sensor data sheet.

Figure 19: Image of the TGS2444 sensor

Page 17: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-17- v0.7

Sensors

3.10. Methane (CH4) sensor – TGS2611

3.10.1. Specifications

Gases: CH4,H2

Measurement range: 500 ~ 10000ppmResistance at 5000ppm: 0.68~6.8kΩSensitivity: 0.6 ± 0.06 (ratio between the resistance at 9000 and at 3000ppm)Supply voltage: 5V ±0.2V DCOperating temperature:-10~+40ºCResponse time: 30 secondsMinimum load resistance:0.45kΩAverage consumption: 61mA

3.10.2. Measurement Process

The TGS2611 sensor shows a variable resistance with the concentration of CH4 and to a lesser extent with the concentration of H2. The sensor’sinitialresistance(for5000ppm)anditssensitivitymayshowlargevariationsbetweendifferentsensorsofthesamemodel,soit is recommended to consult the manufacturer’s documentation and calibrate it before finally inserting it in the application.

Thissensorcanbeusedfromconnectors2A,3and4,placingitinthepositionreferredtoinsection3.17.2and3.17.3anditsoutput value can be read using the corresponding function in the SensorGas library:

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENSOR,GAIN,RESISTOR); SensorGas.setSensorMode(SENS_ON, SENSOR); delay(TIME); value = SensorGas.readValue(SENSOR);}

SENSORindicatesthesocketintowhichitistobeinserted,forthissensor:SENS_SOCKET2A,SENS_SOCKET3AorSENS_SOCKET4AGAIN indicates the chosen gain for the sensor.RESISTORindicatestheloadresistancechosenforthesensorTIMEisthetimeinmillisecondsthatthesensorremainsswitchedonbeforetakingthemeasurement(minimum:30000)

Figure 21: Image of the TGS2611 sensor

Figure 22: Graph of sensitivity of the TGS2611 taken from the Figaro sensor’s data sheet

Page 18: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-18- v0.7

Sensors

3.11. Liquefied Petroleum Gas Sensor (TGS2610)

3.11.1. Specifications

Gases: CH3CH2OH,CH4,C4H10,H2

Measurement range: 500 ~ 10000ppmResistance at 1800ppm (isobutane) 0.68~6.8kΩSensitivity: 0.56 ± 0.06 (ratio between the resistance at 3000 and at 1000ppm)Supply voltage: 5V ±0.2V DCOperating temperature:-10~+40ºCResponse time: 30 secondsMinimum load resistance:0.45kΩAverage consumption: 61mA

3.11.2. Measurement Process

The TGS2610 is a resistive sensor which shows sensitivity to combustible gases and derivatives. Especially reactive to Isobutane (C4H10),itisalsosensitivetoMethane(CH4),Ethanol(CH3CH2OH) and Hydrogen (H2). Because both its resistance and sensitivity showsignificantvariationsbetweendifferent sensorsof thesamemodel, it is recommended toconsult themanufacturer’sdocumentation and carry out a process of calibration prior to its final inclusion in an application.

Thissensorcanbeinsertedinconnectors2A,3and4,andmustbeplacedinthepositionindicatedinsections3.17.2and3.17.3.The sensor’s output value can be read using the corresponding commands in the SensorGas library:

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENSOR,GAIN,RESISTOR); SensorGas.setSensorMode(SENS_ON, SENSOR); delay(TIME); value = SensorGas.readValue(SENSOR);}

SENSORindicatesthesocketintowhichitistobeinserted,forthissensor:SENS_SOCKET2A,SENS_SOCKET3AorSENS_SOCKET4AGAIN indicates the chosen gain for the sensor.RESISTORindicatestheloadresistancechosenforthesensorTIMEisthetimeinmillisecondsthatthesensorremainsonbeforetakingthemeasurement(minimum:30000)

Figure 23: Image of the TGS2610 sensor

Figure 24: Graph of the sensitivity of the TGS2610 taken from the Figaro sensor’s data sheet.

Page 19: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-19- v0.7

Sensors

3.12. Air Contaminants Sensor (TGS2600)

3.12.1. Specifications

Gases: C4H10,CH3CH2OH,H2,CO,CH4

Measurement range: 1 ~ 100ppmAir resistance:10~90kΩSensitivity:0.3 ~ 0.6 (ratio between the resistance in 10ppm of H2 and in air)Supply voltage: 5V ±0.2V DCOperating temperature: -10~+40ºCResponse time: 30 secondsMinimum load resistance:0.45kΩAverage consumption: 46mA

3.12.2. Measurement Process

The TGS2600 sensor shows sensitivity to the variation of the concentration of numerous gases that are not usually found in the compositionoftheatmosphereandwhichareconsideredcontaminants.Amongstthesewouldbemainly,Ethanol(CH3CH2OH) and Isobutane (C4H10)and,withlessresponse,CarbonMonoxide(CO)andMethane(CH4). This sensor is also sensitive to variations in the concentration of Hydrogen (H2).Thesensor’sresistanceinairwouldvarybetween10and90kΩ,witharatioofsensitivitybetween 0.3 and 0.6 for an H2 concentration of 10ppm. Because of this variability it is recommended to calibrate each one of the sensors prior to their use in a final application.

This sensorcanbeplacedonconnectors2A,3and4 following thedirection indicated in sections3.17.2and3.17.3of thismanual.Tocapturethisoutputvoltagevalue,specificinstructionsareintheSensorGaslibrary:

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENSOR,GAIN,RESISTOR); SensorGas.setSensorMode(SENS_ON, SENSOR); delay(TIME); value = SensorGas.readValue(SENSOR);}

SENSORindicatesthesocketintowhichitistobeinserted,forthissensor:SENS_SOCKET2A,SENS_SOCKET3AorSENS_SOCKET4AGAIN indicates the chosen gain for the sensor.RESISTORindicatestheloadresistancechosenforthesensorTIMEisthetimeinmillisecondsthatthesensorremainsonbeforetakingthemeasurement(minimum:30000)

Figure 25: Image of TGS2600 sensor

Figure 26: Graph of the sensitivity of the TGS2600 taken from the Figaro sensor’s data sheet.

Page 20: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-20- v0.7

Sensors

3.13. Air Contaminants Sensor (TGS2602)

3.13.1. Specifications

Gases: C6H5CH3,H2S,CH3CH2OH,NH3,H2

Measurement range: 1 ~ 30ppmAir resistance: 10 ~ 100kΩSensitivity: 0.15 ~ 0.5 (ratio between the resistance in 10ppm of Ethanol and in air)Supply voltage: 5V ±0.2V DCOperating temperature:+10~+50ºCStorage temperature: -20~+60ºCResponse time: 30 secondsMinimum load resistance:0.45kΩAverage consumption: 61mA

3.13.2. Measurement Process

TheTGS2602isasensorsimilartotheTGS2600whichreactsvaryingitsresistanceinthepresenceofcontaminantgases,mainlyToluene (C6H5CH3),HydrogenSulphide (H2S), Ethanol (CH3CH2OH),Ammonia (NH3) and toa lesserextent,Hydrogen (H2). In airwithoutcontaminantsthesensorshowsaresistancebetween10and100kΩwithavariationratiobetween0.15and0.5between the resistance in 10ppm of CH3CH2OHandthisone.Thisvariabilitymakesacalibrationofthesensornecessarybeforeusing it in a final application.

TheTGS2602sensorcanbeplacedinsockets2A,3and4inaccordancewiththeindicationsshowninsections3.17.2and3.17.3.The output voltage values of these connectors can be read using the instructions in the SensorGas library:

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENSOR,GAIN,RESISTOR); SensorGas.setSensorMode(SENS_ON, SENSOR); delay(TIME); value = SensorGas.readValue(SENSOR);}

SENSORindicatesthesocketintowhichitistobeinserted,forthissensor:SENS_SOCKET2A,SENS_SOCKET3AorSENS_SOCKET4AGAIN indicates the chosen gain for the sensor.RESISTORindicatestheloadresistancechosenforthesensorTIMEisthetimeinmillisecondsthatthesensorremainsonbeforetakingthemeasurement(minimum:30000)

Figure 27: Image of the TGS2602 sensor

Figure 28: Graph of the sensitivity of the TGS2602 taken from the Figaro sensor’s data sheet.

Page 21: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-21- v0.7

Sensors

3.14. Solvent Vapors Sensor (TGS2620)

3.14.1. Specifications

Gases: CH3CH2OH,H2,C4H10,CO,CH4

Measurement range: 50 ~ 5000ppmResistance to 300ppm of Ethanol:1~5kΩSensitivity: 0.3 ~ 0.5 (ratio between the resistance at 300ppm and at 50ppm)Supply voltage: 5V ±0.2V DCOperating temperature: -10~+40ºCResponse time: 30 secondsLoad minimum resistance:0.45kΩAverage consumption: 46mA (throughout the complete power supply cycle in 250ms)

Figure 29: Image of the TGS2620 Sensor

3.14.2. Measurement Process

TheTGS2620 sensor allows detection of alcohol and organic gases,mainly Ethanol (CH3CH2OH), Hydrogen (H2), Isobutane(C4H10),CarbonMonoxide(CO)andMethane(CH4). The resistance the sensor shows in a 300ppm concentration of Ethanol can varybetween1and5kΩ,whilethesensitivityratiobetweenthisandtheresistancein50ppmvariesbetween0.3and0.5.Asaconsequence of these variations it is necessary to calibrate each sensor before their insertion into a final application.

Thesensorcanbeconnectedtotheboardthroughsockets2A,3and4,providedthattheirdirectionisasthatshowninsections3.17.2 and 3.17.3. The necessary instructions for the reading of the sensor’s output is in the SensorGas library:

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENSOR,GAIN,RESISTOR); SensorGas.setSensorMode(SENS_ON, SENSOR); delay(TIME); value = SensorGas.readValue(SENSOR);}

SENSORindicatesthesocketintowhichitistobeinserted,forthissensor:SENS_SOCKET2A,SENS_SOCKET3AorSENS_SOCKET4AGAIN indicates the chosen gain for the sensor.RESISTORindicatestheloadresistancechosenforitTIMEisthetimeinmillisecondsthatthesensorremainsonbeforetakingthemeasurement(minimum:30000)

Figure 30: Graph of the sensitivity of the TGS2620 taken from the Figaro sensor’s data sheet.

Page 22: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-22- v0.7

Sensors

3.15. Ozone (O3) Sensor (MiCS-2610)

3.15.1. Specifications

Gases: O3

Measurement range: 10 ~ 1000ppbAir resistance:3~60kΩ(typically11kΩ)Sensitivity:2~4(typically1.5,ratiobetweentheresistanceat100ppmandat50ppm)Supply voltage: 1.95 ~ 5V DCOperating temperature: -30~+85ºCResponse time: 30 secondssAverage consumption: 34mA (throughout the complete power supply cycle in one second)

3.15.2. Measurement Process

The MiCS-2610 is a resistive sensor that allows to measure the variation of the O3 concentration between 10ppb and 1000ppb. It’s resistance varies between 11kΩ and 2MΩapproximately.Unlike theMiCS-2710, this sensor is powered through a 2.5Vvoltageregulator,withconsumptionofapproximately34mA.Thesensor’sresistanceinair,aswellas itssensitivity,canvarybetweendifferentunits,soitisrecommendedtocalibrateeachoneofthembeforefinallyinsertingthemintheapplication.

Thissensormustbeconnectedinsocket2Boftheboard(itspositionisindicatedinsection3.17.2),anditsoutputcanbereadthrough the capture commands of the SensorGas library:

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENS_SOCKET2B,GAIN,RESISTOR); SensorGas.setSensorMode(SENS_ON,SENS_SOCKET2B); delay(TIME); value=SensorGas.readValue(SENS_SOCKET2B);}

GAIN indicates the chosen gain for the sensor.RESISTORindicatestheloadresistancechosenforthesensorTIMEisthetimeinmillisecondsthatthesensorremainsonbeforetakingthemeasurement(minimum:30000)

Figure 32: Graph of the sensitivity of the MiCS-2610 taken from the e2v’s sensor data

Figure 31: Image of the MiCS-2610 sensor

Page 23: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-23- v0.7

Sensors

3.16. VOC’s Sensor (MiCS-5521)

3.16.1. Specifications

Gases:CO,Hydrocarbons,VolatileOrganicCompounds*Measurement range: 30 ~ 400ppmAir resistance:100~1000kΩSensitivity:1.8~6(typically3,ratiobetweentheresistanceat60ppmandat200ppmofCO)Supply voltage: 2.1 ~ 5V DCOperating temperature:-30~+85ºCResponse time: 30 secondsAverage consumption: 32mA (throughout the complete power supply cycle in one second)

(*) Chlorinated hydrocarbons, aromatic hydrocarbons, aromatic alcohols, aliphatic alcohols, terpenes, glycols, aldehydes, esters and acids. Detailed list can be found at http://www.libelium.com/downloads/voc-sensors.xls

3.16.2. Measurement Process

TheMiCS-5521isaresistivesensorrespondstoagreatvarietyofgases,suchasCarbonMonoxide(CO),HydrocarbonsandVolatileOrganicIt’sresistancevariesbetween1000kΩand2kΩapproximately.LiketheMiCS-2610.theMiCS-5521ispoweredthrougha2.5Vvoltageregulator,withconsumptionofapproximately32mA.Thesensor’sresistanceinair,aswellasitssensitivity,canvarybetweendifferentunits,soitisrecommendedtocalibrateeachoneofthembeforefinallyinsertingthemintheapplication.

Thissensormustbeconnectedinsocket2Boftheboard(itspositionisindicatedinsection3.17.2),anditsoutputcanbereadthrough the capture commands of the SensorGas library:

Readingcode:

{ SensorGas.setBoardMode(SENS_ON); SensorGas.configureSensor(SENS_SOCKET2B,GAIN,RESISTOR); SensorGas.setSensorMode(SENS_ON,SENS_SOCKET2B); delay(TIME); value=SensorGas.readValue(SENS_SOCKET2B);}

GAIN indicates the chosen gain for the sensor.RESISTORindicatestheloadresistancechosenforthesensorTIMEisthetimeinmillisecondsthatthesensorremainsonbeforetakingthemeasurement(minimum:30000)

Figure 34: Graph of the sensitivity of the MiCS-5521 taken from the e2v’s sensor data

Figure 33: Image of the MiCS-5521 sensor

Page 24: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-24- v0.7

Sensors

3.17. Design and connectionsThe different connectors used for the sensors’ connection can be used for the integration of different sensors to those previously planned,providedthattheorganisationofthepinsisfollowed,aswellasthedefinedelectricalspecificationsintheWaspmotemanual.Inthissense,twotypesofdifferentsensorsareavailable:

Firstly,thetwoconnectorsforanalogsensors,initiallythosefortemperatureandhumiditysensors(seecomponentsdiagraminsection2.2).Thesetwoconnectorshaveonlyonestripofthreepinswhichprovideconnectiontoground,to5Vsupplyandtooneofthemicroprocessor’sanaloginputs(ANALOG0andANALOG3respectively).Inthecaseofthehumiditysensor’soutput,avoltage divider of resistances of 3.3K and 2.2K has been placed between this and the microprocessor’s analog input ANALOG3 toadaptthesensor’soutputrange(between0and4.5VtothatavailableintheWaspmoteinput(between0and3.3V).

Next the rest of the connectors used for gas sensors are described:

3.17.1. Connector 1

Connector 1 (see the components diagram in section 2.2) has been designed to connect 2 different sensors in the board simultaneously: TGS4161 (CO2) and SK-25 (O2),althoughitsreadingandpoweringisnotpermittedatthesametime. Inthisway,theconnectiondesignedfortheCO2 sensor (which is named connector 1A) has two strips of three 2.54mm pitch female pins,ofwhichtwoarewithoutconnection(thetwointhecentre),onedrivesthesensoroutputtotheamplificationstage,theotherthe5Vsupplycontrolledbyaswitchandtwoareforthecircuit’sconnectiontoground;whilethreeisolatedpinshavebeen assigned to the O2sensor(connector1B),oneconnectedtoground,anothertothesensor’soutput(accessingthesameamplification stage as connector 1A) and another without connections assigned to the sensor’s reference pin. The amplification stageoftheconnectorsconsistsofavoltagefollowerfollowedbyanon-invertingamplifier,whosegainiscontrolledthrougha100KΩdigitalpotentiometer,whichcanbeprogrammedbytheuser,uptoamaximumvalueof101.Wecanseeanimagewithconnector 1A and the connected CO2sensor,withreferencetotheplacementhighlightedinred,infigure35.

Figure 35: Image of socket 1A with a connected sensor

3.17.2. Connector 2

Aswithconnector1,connector2(whichwillbedividedintoconnector2Aandconnector2B)hasbeendesignedtosupportconnectionoftwodifferentsensorsatthesametimebutwithoutallowingsimultaneousreadingorpowering.Inthiscase,theaim of this structure is to allow coexistence on the board of the MiCS 2710 sensor for NO2,MiCS2610sensorforO3 and MiCS 5521 sensor for VOC’s (connector 2B) and the TGS2611 resistive sensors for CH4,TGS2600andTGS2602foraircontaminants,TGS2610 for LPG gases and TGS2620 for solvent vapors (connector 2A). The difference between the last sensors and the TGS2442 for CO and TGS2444 for NH3notcompatiblewiththisconnector,isthatthelatterrequirethestimulationoftheheaterresistanceandpowerofthevariableresistancewiththeconcentrationofgas,whichthesensor’smeasurementextracts,independentlyprovidedbysmallpulses.Giventhatthisconnector’spowerisregulatedbyasingleswitch,thesetwolastsensorscannotbeinsertedintothisconnectorwithoutriskofbreakdown.

Page 25: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-25- v0.7

Sensors

Thus,forconnector2Btherearefourisolatedpinswhichprovidetwoconnectionstothe1.8Vpower(takenfromaregulatorwhichreceives5Vpoweratitsinput),aconnectiontogroundandanothertoaloadresistance(100KΩdigitalpotentiometer)attheinputofanon-invertingamplificationstagewithamaximumgainof101controlledthrougha100KΩdigitalpotentiometer.Connector2Ahastwostripsof2.54mmpitchfemalepinswhichprovidethesensorwithtwoconnectionsto5Vsupply,controlledbyaswitch,aconnection togroundandanother tooutput,at thesame load resistanceandamplificationstagedescribedpreviously.Thetwocentralpinsofbothstrips,notused,remainwithoutconnection.Animageofconnector2Acanbeseeninfigure36withaconnectedsensoranditsreferencetoplacementhighlighted,andanimageofconnector2BwithaconnectedNO2 sensor and its reference highlighted can be seen in figure 37.

Figure 36: Image of socket 2A with a connected sensor

Figure 37: Image of socket 2B with a connected sensor

Page 26: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-26- v0.7

Sensors

3.17.3. Connectors 3 and 4

Connectors3and4,analogtoconnector2A,havetwostripsofthree2.54mmpitchfemalepins(whosecentralpinsarenotconnected to any signal)whichprovide two connections topower supply, oneof themcontrolledby a switch, anoutputconnectionwhichcarriesaloadresistance(100KΩdigitalpotentiometer)andanon-invertingamplificationstageofamaximumgainof101controlledbya100KΩdigitalpotentiometer,andaconnectiontoground,regulatedbyaswitch.Thislastswitch,themaindifferencebetweenthistwoconnectorsandthepreviousone,togetherwiththedirectconnectionsofoneofthepowerpins,allowsadjustingcurrentflowthroughthesensor’sresistanceindependentlyofitsheaterresistancepowersupply.Inthisway,sensorsTGS2442forCOandTGS2444forNH3 can be inserted in these two connectors as well as any of the sensors admitted by connector 2A (TGS2611 for CH4,TGS2600andTGS2602foraircontaminants,TGS2610forLPGgasesandTGS2620forsolventvapors). In figures 38 and 39 there are two images of both connectors with placement reference of the sensor highlighted.

Figure 38: Image of socket 3 with a connected sensor

Figure 39: Image of socket 4 with a connected sensor

Page 27: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-27- v0.7

Board configuration and programming

4. Board configuration and programming

4.1. Hardware configurationThe gas sensor board does not require any handling of the hardware by the user except for placing the sensors in their corresponding position. In the section dedicated to each connector we can see an image of each of the sensors inserted into thecorrespondingsocketwiththereferencetothesensor’sdirectionhighlighted.

4.2. APITheboardfortheWaspmotegassensorshasitsownlibrarywhichcontainsasetofnecessaryinstructionstoeasilyandintuitivelyconfigure and read each one of the sensors which connect to the board. Next each one of the functions is described and the process of configuration detailed for each sensor. The specific configuration which must be applied to each one of the sensors is explained in the specific sensor’s section.

SensorGas.setBoardMode(MODE)

Thisfunctionisusedtoswitchthesensorboardpoweronandoff.ThevariableMODEcantakevaluesSENS_ON,toswitchontheboard,andSENS_OFF,toswitchitoff.

SensorGas.configureSensor(SENSOR, GAIN, RESISTOR)

Thefunctiondescribedinthissectionisusedtoestablishparameterswhichaffecttakingthesensor’smeasurements:thesocketinwhichthesensorisconnected,theamplificationstagegainattheoutputandtheloadresistanceonwhichthereadingistaken.

ThevalueSENSORindicatestheconnectoronwhichthesensorhasbeenplaced.Thereare6possibleconnectorstochoose,three of which are shared by a number of sensors while the three remaining are exclusive for a specific sensor.

The connectors exclusive to one sensor are:

• SENS_CO2,whichrepresentsconnector1A,towhichonlytheCO2 sensor is connected. • SENS_O2,whichrepresentsconnector1B,towhichonlytheO2 sensor is connected.

The connectors which are shared by a number of sensors are:

• SENS_SOCKET2A,whichisusedforsensorsplacedinconnectors2A.• SENS_SOCKET2A,whichisusedforsensorsplacedinconnectors2B.• SENS_SOCKET3A,whichisusedforsensorsplacedinconnector3,whendealingwiththeCH4,LPG,solventvaporsandboth• aircontaminantsensors.• SENS_SOCKET3B,whichisusedwhentheCOsensorisplacedinconnector3.• SENS_SOCKET3C,whichisusedwhentheNH3 sensor is placed in connector 3. • SENS_SOCKET4A,whichisusedforsensorsplacedinconnector4,whendealingwiththeCH4,LPG,solventvaporsandboth• aircontaminantsensors.• SENS_SOCKET4B,whichisusedwhentheCOsensorisplacedinconnector4.• SENS_SOCKET4C,whichisusedwhentheNH3 sensor is placed in connector 4.

The variable GAIN represents the gain chosen for the amplification stage which is accessed from the sensor’s output. Integer values can be set between 1 and 101.

ThevariableRESISTORdetermines the load resistanceonwhich the sensor actsbefore theamplification stage, expresingkiloohms.Valuesbetween0and100kΩcanbetaken(providedthattheminimumloadresistanceshowninthespecificationsof each sensor is respected). In the case of the O2 and CO2sensors,whichdonotrequireloadresistance,thisparametermaybe omitted.

Page 28: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-28- v0.7

Board configuration and programming

SensorGas.setSensorMode(MODE, SENSOR)

Thisfunction,analogtosetBoardMode,allowsindependentconfigurationofthepowersupplyofeachsensor.

ThevariableMODEdefinesthestatusinwhichthesensorshouldbeset,whichcantakethevaluesSENS_ON,toconnectthepower,andSENS_OFFtodisconnectit.

ThevariableSENSORrepresentstheconnectoronwhichthesensorisplacedandthetypeofsensorused,whichisabletotakethe following values:

• SENS_CO2,tocontroltheCO2 sensor’s power and enable its output. • SENS_O2toenabletheO2 sensor’s output. • SENS_PRESSURE,tocontroltheatmosphericpressuresensor’spower.• SENS_SOCKET2A,tocontrolthepowerofthesensorplacedinconnector2Aandenableitsoutput.• SENS_SOCKET2B,tocontrolthepowerofthesensorplacedinconnector2Bandenableitsoutput.• SENS_SOCKET3A,tocontrolthepowerofthesensorplacedinconnector3whenoneoftheCH4,LPG,solventvaporsand

bothaircontaminantssensorsareconnectedtoit(CAUTION:donotusethiscommandwhentheCOorNH3 sensors are placedinthisconnector,thesesensorsmustnotbepermanentlypowered).

• SENS_SOCKET4A,tocontrolthepowerofthesensorplacedinconnector4whenoneoftheCH4,LPG,solventvaporsandbothaircontaminantsensorsareconnectedtoit(CAUTION:donotusethiscommandwhentheCOorNH3 sensors are placedinthisconnector,thesesensorsmustnotbepermanentlypowered).

SensorGas.readValue(SENSOR)

ThefunctionreadValueallowscaptureoftheoutputvalueofeachoneoftheboard’ssensors,returningthevoltagevalueinafloatingpoint(float)inthevariabletowhichithasbeenassigned.ThesensorwhoseoutputwewanttoreadisdefinedbythevariableSENSOR,whichcantakethefollowingvalues:

• SENS_TEMPERATURE,forthereadingofthetemperaturesensor. • SENS_HUMIDITY,forthereadingofthehumiditysensor. • SENS_PRESSURE,forthereadingoftheatmosphericpressuresensor. • SENS_CO2,forthereadingoftheCO2 sensor. • SENS_O2,forthereadingoftheO2 sensor. • SENS_SOCKET2A,forthereadingofthesensorplacedinconnector2A. • SENS_SOCKET2B,forthereadingofthesensorplacedinconnector2B. • SENS_SOCKET3A,forthereadingofthesensorplacedinconnector3,withtheexceptionoftheCOandNH3 sensors. • SENS_SOCKET4A,forthereadingofthesensorplacedinconnector4,withtheexceptionoftheCOandNH3 sensors.

ThevaluesofthevariableSENSORforthereadingoftheNH3 and CO sensors are the following:

• SENS_SOCKET3B,toreadtheCOsensorplacedinconnector3. • SENS_SOCKET4B,toreadtheCOsensorplacedinconnector4. • SENS_SOCKET3C,toreadtheNH3 sensor placed in connector 3. • SENS_SOCKET4C,toreadtheNH3 sensor placed in connector 4.

Thereasonforreadingthesetwosensorsinadifferentwayisthattheydonotnormallyremainpowered,butmustbepoweredby two small pulses of voltage when capturing the output data to avoid them being damaged. The function readValue provides these power supply pulses and automatically reads the sensors when one of the previous values is provided in its input variable.

The structure in which the code to read a sensor must be presented is the following:

1. The board is switched on using the function SensorGas.setBoardMode. 2. Configuration of the sensor’s amplification gain and load resistance (the latter if necessary) using the function SensorGas.

configureSensor. 3. TurnontheRTCtoavoidpossibleconflictsintheI2CbususingthefunctionRTC.ON.4. The sensor is switched on (with the exception of the CO and NH3 sensors) using the function SensorGas.setSensorMode.

Page 29: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-29- v0.7

Board configuration and programming

5. Waitforthenecessaryamountoftimeforthesensor’sresponsedependingontheaccuracyrequired.Thedelayfunctionmaybeused(seetheWaspmoteAPImanual).

6. ReadthesensorusingthefunctionSensorGas.readValue. 7. If necessary, switch off the sensors and the board using the functions SensorGas.setSensorMode and SensorGas.

setBoardMode.

A specific example of the reading of each sensor can be found in the section dedicated to each one.

Bellow,anexamplecodetoreadtheTGS2600sensorplacedonsocket2Aisshown:

// Set delay here #defineTIME30000 // Set resistor here #defineRESISTOR50 #defineGAIN1 floatvalue=0; void setup(){ // Init USB port USB.begin(); USB.println(“Gases Sensor Board..”); //switchonthegasessensorboard SensorGas.setBoardMode(SENS_ON); delay(100); //InitRTC RTC.ON(); delay(100);

//Configurationofthesensor’sloadresistorandgain SensorGas.configureSensor(SENS_SOCKET2A,GAIN,RESISTOR); //Turn on the sensor SensorGas.setSensorMode(SENS_ON,SENS_SOCKET2A); USB.println(“HeatingSensor...”); delay(TIME); } void loop(){ value=SensorGas.readValue(SENS_SOCKET2A); USB.print(“Value :”); USB.println(value); delay(1000); }

The files of the sensor board itself are: SensorGas.cpp, SensorGas.h

They can be downloaded from: http://www.libelium.com/development/waspmote

Page 30: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-30- v0.7

Consumption

5. Consumption

5.1. Power controlOnone side, thecontrolof thegasboardpower canbecarriedoutusing thegeneralon/off systemsof the 3.3V and 5V sensors’ power controlled from Waspmote which allows the board to be totally switched on and off (0uA).

Ontheotherhand,specificcontrolmechanismshavebeeninstalledinsidethesensorboardusingasystemofsolidstateswitches,the independent digitalpowercontrolofeachsensor,withouttheneedtophysicallyaccessthecircuit,sothatitsactivationandreading can be programmed from the same main program,controlledbythemicrocontroller. In section 4.2 where the API librariesrelatedtothisboardarepresented,theuseofeachoftheseswitchesisclearlyandpreciselydescribed,aswellasthecorrectwaytoreadeachsensor.Inthefollowingtableappearsasummaryofwhatcanbefoundinthatsection,includingeachoneoftheswitches,theWaspmotemicroprocessorsdigitalsignalwhichcontrolsitandthesignalwhichregulatesthatswitch:

Switch Control signal Controlled signal

Switch 1 (A) DIGITAL1 Connector 3 load connection to ground

Switch 1 (B) DIGITAL3 Connector 4 load connection to ground

Switch 2 (A) DIGITAL2 (inverted) Connector 1 sensor’s connection to output (B)

Switch 2 (B) DIGITAL2 Connector 1 sensor’s connection to output (A)

Switch 3 (A) DIGITAL2 Power of connector 1 sensor (A)

Switch 3 (B) DIGITAL4 Power of connector 2 sensor (A)

Switch 4 (A) DIGITAL7 Power of connector 3 sensor’s heater resistance

Switch 4 (B) DIGITAL5 Power of connector 4 sensor’s heater resistance

Switch 5 (A) DIGITAL6 Connector 2 sensor’s connection to output (B)

Switch 5 (B) DIGITAL4 Connector 2 sensor’s connection to output (A)

Switch 6 (A) DIGITAL6 Connector 2 sensor’s power (B)

Switch 6 (B) DIGITAL8 Power of Atmospheric Pressure sensor

5.2. Tables of ConsumptionInthefollowingtabletheconsumptionshownbytheboardwhenactiveisdetailed,fromminimumconsumption(constant,fixed by the permanently active components).

Tofindoutthetotalconsumptionoftheboardwithsensorsintegratedtotheconsumptionofeachconnector,theconsumptionof each chosen sensor must be added together. This consumption can be consulted in the section for the sensor itself when all its characteristics are described.

Switch ON Switch OFF

Minimum (CTE) 3.3mA 0μA(Waspmoteswitch)

Connector 1-A (without sensor) 0mA 0μA

Connector 1-B (without sensor) 0mA 0μA

Connector 2-A (without sensor) 0mA 0μA

Connector 2-B (without sensor) 0mA 0μA

Connector 3 (without sensor) 0mA 0μA

Connector 4 (without sensor) 0mA 0μA

5.3. Low Consumption ModeFromthepointofviewofoptimisingWaspmote resourceswhen thegassensorboard isused, it is recommendedthat thefollowing instructions are followed:

Page 31: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-31- v0.7

Consumption

• Keep the board switched off while no measurement is being takenThis is the most efficient method of lowering consumption when none of the parameters are being continually monitored. Tocompletelydisconnecttheboard’spower,disabletheswitchesthatallowpassageofthe3.3Vsupply,the5VsupplyfromWaspmote(usingtheSensorBoard.setBoardModelibraryfunction)andtothetwoI2Cbuschannels(SCLandSDA)usingthecommandshownintheWaspmotePWRlibrary(moreinformationonthiscanbefoundintheAPImanual).Donotforgetto reconfigure gain and load resistances when switching it on again.

• Optimise the time the sensors are switched on depending on your applicationThe accuracy of each sensor’s measurement which can be obtained will vary depending on the time that it remains switchedonoron thepower supply cycleswhich are continually applied,dependingon the typeof sensor. Knowingthetimerequiredto takeameasurement inadeterminedapplicationwillallowsavingofconsumptionwithout losingresolution in the sampled value.

• Configure the amplification stage gains and the load resistances of the connectors which do not use to their maximum value.

• Simultaneously activate the minimum number of sensors possible Giventhatthecurrentallowedinthedigitalswitches’outputislimited(about200mA),itisrecommendedtonotoverloadthem by activating a number of sensors at the same time which in total may surpass this current.

Page 32: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-32- v0.7

Maintenance

6. Maintenance • Inthissection,theterm“Waspmote”encompassesboththeWaspmotedeviceitselfaswellasitsmodulesandsensorboards. • TakecarewiththehandlingofWaspmote,donotdropit,bangitormoveitsharply. • Avoid putting the devices in areas of high temperatures since the electronic components may be damaged. • Theantennasarelightlythreadedtotheconnector;donotforcethemasthiscoulddamagetheconnectors. • Donotuseanytypeofpaintforthedevice,whichmaydamagethefunctioningoftheconnectionsandclosuremechanisms

Page 33: Technical Guide - Libelium · PDF file-4- v0.7 General 1. General 1.1. General and safety information • In this section, the term “Waspmote” encompasses both the Waspmote device

-33- v0.7

Disposal and recycling

7. Disposal and recycling • Inthissection,theterm“Waspmote”encompassesboththeWaspmotedeviceitselfaswellasitsmodulesandsensorboards. • WhenWaspmotereachestheendofitsusefullife,itmustbetakentoarecyclingpointforelectronicequipment. • Theequipmenthastobedisposedonaselectivewastecollectionsystem,differenttothatofurbansolidwaste.Please,

dispose it properly. • Your distributorwill inform you about themost appropriate and environmentally friendlywaste process for the used

productanditspackaging.