APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet...

24
APPLICATION NOTE 602: SENSORS FOR EMOS 200L © EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 1/ 24 Revision Changes Author Date 1 Initial Document Dirk Lumbeck 19.12.2017

Transcript of APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet...

Page 1: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE 602: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 1/ 24

Revision Changes Author Date

1 Initial Document Dirk Lumbeck 19.12.2017

Page 2: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE 602: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 2/ 24

1 TABLE OF CONTENTS 1 Table of Contents ..........................................................................................2

2 References and Applicable Documents ..............................................................4

3 Definitions ....................................................................................................4

4 Introduction ..................................................................................................4

5 Interfacing to the Host Unit .............................................................................4

5.1 Sleeping Sensor .........................................................................................5

5.1.1 Values of R2 and R3 ...............................................................................5

5.1.2 Value of C1 ...........................................................................................5

5.1.3 Value of C4 ...........................................................................................5

5.1.4 Boot-Circuit Q1…Q6 ...............................................................................5

5.2 Trigger Sensor ...........................................................................................7

5.2.1 Values of R3 and R4 ...............................................................................7

5.2.2 Value of C1 ...........................................................................................7

5.2.3 Value of C4 ...........................................................................................7

5.2.4 SENSOR_IRQ-Circuit R1, Q1 ....................................................................7

5.2.5 Boot-Circuit Q2 ......................................................................................7

5.3 Considerations on EMI and ESD ...................................................................9

5.3.1 Shielding ..............................................................................................9

5.3.2 Blocking................................................................................................9

5.3.3 ESD Protection ......................................................................................9

6 Interfacing to the Sensor Element ....................................................................9

6.1 Types of Sensor Elements ...........................................................................9

6.1.1 Passive Analog Sensor Element ...............................................................9

6.1.1.1 Power Supply .................................................................................. 10

6.1.1.2 Voltage Level Translation .................................................................. 10

6.1.2 Active Analog Sensor Element ............................................................... 10

6.1.2.1 Power Supply .................................................................................. 10

6.1.2.2 Voltage Level Translation .................................................................. 10

6.1.3 UART Interface Sensor Element ............................................................. 10

6.1.3.1 Power Supply .................................................................................. 10

6.1.3.2 Voltage Level Translation .................................................................. 10

6.1.4 RS232 Interface Sensor Element............................................................ 11

6.1.4.1 Power Supply .................................................................................. 11

6.1.4.2 Voltage Level Translation .................................................................. 11

6.1.5 SPI Interface Sensor Element ................................................................ 12

6.1.5.1 Power Supply .................................................................................. 12

6.1.5.2 Voltage Level Translation .................................................................. 12

6.1.6 I²C Interface Sensor Element ................................................................ 13

6.1.6.1 Power Supply .................................................................................. 13

6.1.6.2 Voltage Level Translation .................................................................. 13

6.1.6.2.1 Voltage Level on Sensor Element same as on microcontroller (Section 6.2.1) 13 6.1.6.2.2 Voltage Level on Sensor Element always higher than maximum Voltage

Level on Microcontroller (Sections 6.2.3 and Fehler! Verweisquelle konnte nicht

Page 3: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE 602: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 3/ 24

gefunden werden.) ......................................................................................... 13 6.1.6.2.3 Voltage Level on Sensor Element always lower than minimum Voltage Level on Microcontroller (Section 6.2.4) ............................................................... 14 6.1.6.2.4 Voltage Level on Sensor Element is between minimum and maximum Voltage Level on Microcontroller (Section 6.2.2) .................................................... 15

6.2 Power Supply for Sensor Elements ............................................................. 15

6.2.1 Voltage from 2.4V to 3.6V (no fixed voltage) ........................................... 16

6.2.2 Voltage from 2.4V to 3.6V (fixed voltage) ............................................... 16

6.2.3 Voltage from 3.6V to 5.0V (fixed voltage) ............................................... 17

6.2.4 Voltage from 0.8V to 2.4V (fixed Voltage) ............................................... 18

7 Application Examples ................................................................................... 18

7.1 Soil Volumetric Water Content Sensor ........................................................ 18

7.2 PIR Presense Detection Sensor .................................................................. 19

7.3 Air Temperature and Humidity Sensor ........................................................ 20

7.4 Ultrasonic Distance Sensor ........................................................................ 21

7.5 Temperature Sensor................................................................................. 22

7.6 Tilt Sensor .............................................................................................. 23

Page 4: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE 602: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 4/ 24

2 REFERENCES AND APPLICABLE DOCUMENTS [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data Sheet M16 sensor connector EMOS 200L (Hummel) [5] Data Sheet M16 connector sensor (Hummel) [6] DS10690: Access line ultra-low-power 32-bit MCU Arm®-based Cortex®-

M0+, up to 192KB Flash, 20KB SRAM, 6KB EEPROM, ADC (ST Microelectron-ics)

[7] RM0377: Ultra-low-power STM32L0x1 advanced ARM®-based 32-bit MCUs (ST Microelectronics)

[8] AN10441: Level shifting techniques in I2C-bus design (NXP)

3 DEFINITIONS The following terms will be used throughout this document: GSI Generic Sensor Interface host unit EMOS 200L sensor unit the combination of a sensor element with a microcontroller and

connector that can be connected to the host unit sensor element the sensor that is actually doing the measurements

typically an off-the-shelf sensor with an arbitrary interface

microcontroller the microcontroller that manages the GSI on the sensor unit

4 INTRODUCTION EMOS 200L is a sensor platform suited for self-supplied environmental monitoring out-door sensors. This application note will present examples of sensors units that can be connected to the sensor interface (also known as the “Generic Sensor Interface”) of

EMOS 200L.

5 INTERFACING TO THE HOST UNIT The interface to EMOS 200L is defined by the “Generic Sensor Interface Specification” [3]. Proved application circuits for this interface shall be presented in this chapter. They are based on a STM32L071K8U microcontroller from ST Microelectronics. The STM32L071K8U offers an I²C boot loader. This enables on-site firmware upgrades through the generic interface, which is very desirable on outdoor sensors that must be waterproof. There are three options to implement this on-site firmware upgrade:

1. Manufacturer specific GSI command that enables boot loader mode of the µC 2. Manipulation of the BOOT0 pin (pulling it high) by e.g. supplying VDD_SWITCHED

while pulling VDD_PERMANENT to ground (this is a use case that will never occur in regular operation)

3. Writing a boot loader that uses manufacturer specific GSI commands

The circuits in this application note will show how to implement option 2. Of course these components can be omitted if this feature is not desired.

Page 5: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE 602: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 5/ 24

5.1 SLEEPING SENSOR This type of sensor unit is powered by VDD_PERMANENT. The microcontroller is in a very low power sleep mode most of the time. It can be woken up by VDD_SWITCHED or a signal coming from the sensor. A typical application for such a sensor unit would be a presence detection sensor based on a PIR element. Also switch contacts on doors, windows or similar would be another use case. Figure 1 shows a basic schematic of a sleeping sensor. The following details have to be reviewed if this circuit is going to be used.

5.1.1 VALUES OF R2 AND R3

These values depend very much on the capacitive load on the I²C lines SDA and SCL. These resistors have to be adjusted to a value that ensures proper rise times on SDA and

SCL while not exceeding the maximum sink current of the connected I²C drivers. The given values are able to drive a capacitive load of approximate 300pF.

5.1.2 VALUE OF C1

This is the minimum capacitance specified by the user manual of the STM32L071. If this capacitance is to be increased, tests whether the host can cope with that inrush current need to done. Especially when the host unit’s energy storage is completely de-

pleted and the system needs to start up, high inrush currents can lead to oscil-lating switching on and off of the host unit.

5.1.3 VALUE OF C4

This capacitance can be increased. But the time the microcontroller is held in reset also increases.

5.1.4 BOOT-CIRCUIT Q1…Q6

This circuit controls the BOOT0 pin of the microcontroller. The following Table 1 shows how this circuits works.

VDD_SWITCHED VDD_PERMANENT BOOT0 VDD

LOW LOW LOW LOW

HIGH LOW1 HIGH HIGH

LOW HIGH LOW HIGH

HIGH HIGH LOW HIGH

Table 1: Logic of boot circuit If the boot feature is not needed, this circuit can be removed. In this case VDD of the microcontroller has to be connected to VDD_PERMANENT.

1 Note: VDD_PERMENENT has to be pulled to ground. Letting it float will lead to unpre-dictable behaviour.

Page 6: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 6/ 24

Figure 1: Schematic – interface to EMOS 200L of sleeping sensor

Page 7: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 7/ 24

5.2 TRIGGER SENSOR This type of sensor is powered by VDD_SWITCHED. As soon as VDD_SWITCHED is present the sensor unit starts its measurement and returns the measured value via the GSI. Most sensor units will use this kind of implementation. Figure 2 shows an example schematic of a trigger sensor. The following details should be reviewed if the circuit is to be used.

5.2.1 VALUES OF R3 AND R4

These values depend very much on the capacitive load on the I²C lines SDA and SCL. These resistors have to be adjusted to a value that ensures proper rise times on SDA and SCL while not exceeding the maximum sink current of the connected I²C drivers. The given values are able to drive a capacitive load of approximate 300pF.

5.2.2 VALUE OF C1

This is the minimum capacitance specified by the user manual of the STM32L071. If this capacitance is to be increased, tests whether the host can cope with that inrush current need to done. Especially when the host unit’s energy storage is completely deplet-ed and the system needs to start up, high inrush currents can lead to oscillating switching on and off of the host unit.

5.2.3 VALUE OF C4

This capacitance should not be increased. The time the microcontroller is held in reset after power-up increases. This leads to long response times of the sensor unit and consequently to higher energy usage.

5.2.4 SENSOR_IRQ-CIRCUIT R1, Q1

The sensor unit needs to pull SENSOR_IRQ high all the time, as soon as it is plugged into the host unit and inactive. As the microcontroller is not supplied most of the time, this cir-cuit is necessary. As there is 10nF capacitance on this line, R1 needs to be this small to achieve the required fast pulse responses on SENSOR_IRQ.

5.2.5 BOOT-CIRCUIT Q2

This circuit controls the BOOT0 pin of the microcontroller. Table 1 from section sleeping sensors is also valid for trigger sensors. If the boot feature is not needed, this circuit can be removed.

Page 8: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 8/ 24

Figure 2: Schematic – interface to EMOS 200L of trigger sensor

Page 9: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 9/ 24

5.3 CONSIDERATIONS ON EMI AND ESD Depending on the length of the cable that connects the sensor unit to the host unit, addi-tional measures such as shielding, blocking and ESD protection need to be implemented.

5.3.1 SHIELDING

It is generally a good idea to use a shielded cable. Please take care that the shield of the cable is connected to the housing of the connector, connected to the host unit. If you use twisted pair cables, do not twist SDA and SCL with each other. It’s recommended to twist both to ground, VDD_PERMANENT or VDD_SWITCHED. SENSOR_IRQ should not be twisted to VDD_SWITCHED, SDA or SCL. It’s recommended to twist this signal to ground or VDD_PERMANENT.

5.3.2 BLOCKING

Use capacitors (typ. 1nF) to block noise and ripple coming from the cable for static or slow

signals like VDD_SWITCHED, VDD_PERMANENT and SENSOR_IRQ. Use ferrite beads to block noise and ripple on SDA and SCL. High capacitances on these lines will lead to failure of the GSI communication which is based on I²C.

5.3.3 ESD PROTECTION

As the connector of the sensor unit has exposed pins that can be touched when the sensor

unit is not connected to the host unit, ESD protection measures should be taken. Transient Voltage Suppressor diodes (TVS diodes) should be placed on all signals from the GSI. Low capacitance parts should be selected for the SCL and SDA lines. Unidirectional TVS diodes are sufficient as all signals of the GSI are above ground.

6 INTERFACING TO THE SENSOR ELEMENT

6.1 TYPES OF SENSOR ELEMENTS These chapters focus on the interface to the actual sensor element itself. The microcontroller is supplied by VDD_SWITCHED or VDD_PERMANENT. These voltages can range from 2.5V to 3.6V and are not stabilized. Thus special attention has to be paid to the supply voltage of the sensor element.

6.1.1 PASSIVE ANALOG SENSOR ELEMENT

A passive analog sensor element generates an output voltage which is a proportional to the supply voltage of the sensor and proportional to the quantity to be measured.

𝑈𝑂𝑈𝑇~𝑈𝑆𝑈𝑃𝑃𝐿𝑌 ∙𝑆𝑒𝑛𝑠𝑜𝑟𝑉𝑎𝑙𝑢𝑒

𝑆𝑒𝑛𝑠𝑜𝑟𝑉𝑎𝑙𝑢𝑒𝑀𝐴𝑋

Typical examples for such passive analog sensor elements are temperature sensors based on an NTC resistor divider. In this case the resistance ratio is proportional to the tempera-ture. The output voltage of the sensor circuit is proportional to the temperature and the reference, respectively supply voltage. As an ADC gives the ratio of measured voltage to its reference voltage, no additional voltage references are needed if the sensor supply voltage is also used as the ADC reference voltage. There are also sensor elements available that are active (meaning, they have active circuit-

Page 10: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 10/ 24

ry inside) but behave like a passive sensor. Section 7.1 describes an example sensor unit for such a sensor element.

The measurement error introduced by an offset of the voltage at the sensor element to the voltage at the microcontroller is given by this relationship:

𝑔𝑎𝑖𝑛 𝑒𝑟𝑟𝑜𝑟[%] = 100% ∙𝑈𝑃𝑂𝑊𝐸𝑅_𝑆𝐸𝑁𝑆𝑂𝑅𝑥 − 𝑈𝑉𝐷𝐷𝐴

𝑈𝑉𝐷𝐷𝐴

6.1.1.1 POWER SUPPLY

Usually, passive analog sensor elements can be used with any voltage level and do not consume much current. So typically the power supply scheme from section 6.2.1 should be used.

6.1.1.2 VOLTAGE LEVEL TRANSLATION

As the output voltage of a passive sensor cannot exceed the input voltage, no additional voltage level translation circuits are needed.

6.1.2 ACTIVE ANALOG SENSOR ELEMENT

Typical examples for active analog sensors are temperature sensors based on thermocou-ples. In this case the output voltage is proportional to the temperature. In this case a volt-age reference is needed to determine the absolute voltage. The microcontroller has an in-ternal voltage reference that can be used for this type of sensor. Nevertheless care should be taken to ensure that the maximum output voltage of the sensor does not exceed the minimum supply voltage of the microcontroller (2.5V) from the GSI.

6.1.2.1 POWER SUPPLY

Select a proper power supply scheme from section 6.2 for your sensor element.

6.1.2.2 VOLTAGE LEVEL TRANSLATION

In general operational amplifiers with appropriate gain or attenuation should be used to convert the output voltage of the sensor element to a sensible voltage. This voltage should be below the 2.5V minimum supply voltage of the GSI and high enough to give sufficient resolution. As the ADC of the microcontroller measures the sensor element’s voltage in relation to the supply voltage (that can be variable), an additional measurement of the internal voltage reference of the microcontroller is needed to determine the supply voltage and thus the

absolute output voltage of the sensor element. For details refer to section 13.10 of the mi-crocontroller’s reference manual [7].

6.1.3 UART INTERFACE SENSOR ELEMENT

There are several ready-to-use sensor elements with a standard UART interface available. The UART interface is a two-wire interface with dedicated signal directions of each line – one is driven by the microcontroller, the other one by the sensor unit. In section 7.6 an example for a tilt sensor unit is available.

6.1.3.1 POWER SUPPLY

Most sensor elements with UART interfaces have a limited supply voltage range. Please select the appropriate supply from section 6.2.

6.1.3.2 VOLTAGE LEVEL TRANSLATION

The UART interface voltage of the sensor element is usually dependent on its supply volt-

Page 11: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 11/ 24

age. To avoid reverse biasing and latching up, the voltage level of the UART interface has to be translated to the microcontroller’s supply voltage, if it differs.

The following Figure 3 shows an example of how to implement such a voltage level transla-tion with an integrated circuit (SN74LVC1T45 – 1-Bit Dual-Supply Bus Transceiver with Configurable Voltage, Texas Instruments).

Figure 3: Example of voltage level translation circuit for a UART interface on a trigger sen-sor (sensor element and sensor supply not shown)

6.1.4 RS232 INTERFACE SENSOR ELEMENT

This interface is very similar to the UART interface but has different voltage levels. A RS232 compliant device uses -15V…-5V as a mark symbol and +5V…+15V as a space symbol.

6.1.4.1 POWER SUPPLY

Most sensor elements with RS232 interface have a limited supply voltage range. Please select the appropriate supply from section 6.2.

6.1.4.2 VOLTAGE LEVEL TRANSLATION

This interface requires a dedicated voltage level translation with an RS232 driver IC that converts the communication signals to the voltage of the microcontroller and generates the voltage to drive the communication.

Figure 4 shows an example how to implement such a driver IC (LTC2801/LTC2802 –1.8V to 5.5V RS-232 Single Transceivers, Linear Technology).

Page 12: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 12/ 24

Figure 4: Example of voltage level translation circuit for an RS232 interface sensor element on a trigger sensor (sensor element and sensor supply not shown)

6.1.5 SPI INTERFACE SENSOR ELEMENT

This serial interface is very common for chip to chip communication and able to support very high data rates. It is a four-wire interface with dedicated signal directions for every signal. The signals are:

CS (Chip Select from Master to Slave) CLK (Clock from Master to Slave) MOSI (Master output, Slave input) MISO (Master input, Slave output)

6.1.5.1 POWER SUPPLY

Most sensor elements with an SPI interface have a limited supply voltage range. Please select the appropriate supply from section 6.2.

6.1.5.2 VOLTAGE LEVEL TRANSLATION

The SPI interface on a sensor element usually has the same voltage as its supply voltage. If this voltage is not the same as the microcontroller’s supply voltage, voltage level transla-tion has to be used. Figure 5 shows an example how to implement a voltage level translation for SPI interface sensor elements.

Page 13: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 13/ 24

Figure 5: Example of voltage level translation circuit for an SPI interface sensor element on a trigger sensor (sensor element and sensor supply not shown)

6.1.6 I²C INTERFACE SENSOR ELEMENT

This serial interface is very common for chip to chip communication. Its uses only two sig-nal lines but is limited in communication speed due to the necessary pull up resistors and parasitic line capacitances.

6.1.6.1 POWER SUPPLY

Most sensor elements with an I²C interface have a limited supply voltage range. Please select the appropriate supply from section 6.2.

6.1.6.2 VOLTAGE LEVEL TRANSLATION

Depending on the selection of the sensor element’s voltage supply, different voltage trans-lation strategies have to be implemented. The following sections give details about all pow-er supply configurations possible for such a sensor element.

6.1.6.2.1 Voltage Level on Sensor Element same as on microcontroller (Section 6.2.1)

The easiest variant is when the voltage level of the sensor element I²C interface is the same as the voltage level of the microcontroller. In this case no voltage level translation is necessary.

6.1.6.2.2 Voltage Level on Sensor Element always higher than maximum Voltage Level on

Microcontroller (Sections 6.2.3 and Error! Reference source not found.)

If the sensor element’s voltage is above the maximum supply voltage of the microcontroller the circuit in Figure 7 can be used. This circuit is based on an application note from NXP which was founded by Phillips, the developer of the I²C interface [8].

Please note that the values of R5…R8 need to be matched to the parasitic capacitance of your I²C interface. 1.2kΩ is a very small value and consumes a lot of current during com-

munication. This value is suited for bus capacitances of roughly 300pF. This shifter is only

Page 14: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 14/ 24

suited for Standard-mode (100kbps) and Fast-mode (400kbps) systems.

Figure 6: An example of a voltage level translation circuit for an I²C interface sensor ele-ment with a supply voltage above maximum microcontroller voltage on a trigger sensor (sensor element and sensor supply not shown)

6.1.6.2.3 Voltage Level on Sensor Element always lower than minimum Voltage Level on

Microcontroller (Section 6.2.4)

If the sensor element’s voltage is below the minimum supply voltage of the microcontroller the circuit in Figure 7 can be used. This circuit is based on an application note from NXP which was founded by Phillips, the developer of the I²C interface [8].

Please note that the values of R5…R8 need to be matched to the parasitic capacitance of your I²C interface. 1.2kΩ is a very small value and consumes a lot of current during com-

munication. This value is suited for bus capacitances of roughly 300pF. This shifter is only suited for Standard-mode (100kbps) and Fast-mode (400kbps) systems.

Figure 7: Example of voltage level translation circuit for an I²C interface sensor element with a supply voltage below minimum microcontroller voltage on a trigger sensor (sensor element and sensor supply not shown)

Page 15: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 15/ 24

6.1.6.2.4 Voltage Level on Sensor Element is between minimum and maximum Voltage Level on Microcontroller (Section 6.2.2)

If the supply voltage of the sensor element is between the minimum and maximum voltage of the microcontroller, this is a rather unpleasant scenario. Nevertheless this can be over-come by shifting the voltage from the sensor element to a value outside the supply voltage range of the microcontroller (preferably below, as no step converter is necessary) and then shifting it a second time to the microcontroller’s supply voltage.

Figure 8: Example of voltage level translation circuit for an I²C interface sensor element with a supply voltage below minimum microcontroller voltage on a trigger sensor (sensor element, sensor supply and 2.4V-supply not shown)

6.2 POWER SUPPLY FOR SENSOR ELEMENTS These chapters focus on ways to power the sensor element according to its requirements. In general it’s a good idea to make the supply voltage for the sensor element switchable. This gives more control over power consumption, and initialization and startup times. Several voltage and current consumption ranges are presented. The following table gives an overview of the voltage and current consumption ranges and points to the corresponding section of the document which gives a description.

Vmin Vmax fixed voltage Imax Section

2.4V 3.6V no --mA 6.2.1

2.4V 3.6V yes 60mA 6.2.2

3.6V 5.0V yes 25mA 6.2.3

1.8V 2.4V yes 250mA 6.2.4

Table 2: Overview of power supply schemes for sensor elements Voltage and current combinations that are not listed here are also possible; nevertheless these circuits should cover most use cases. When designing power supplies for sensors, extra care has to be taken regarding noise and ripple on the supply voltage. This can result in reduced precision of the measured values.

Page 16: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 16/ 24

6.2.1 VOLTAGE FROM 2.4V TO 3.6V (NO FIXED VOLTAGE)

If the sensor is able to work within the voltage range of 2.4V to 3.6V and able to tolerate that this voltage changes, no further additions to the power supply of the sensor have to be taken other than a power switch or a microcontroller digital output. It might even be con-nected directly to VDD_SWITCHED. Nevertheless the recommended design procedure is to make the sensor element’s power supply controllable by the microcontroller. The following Figure 9 shows two ways (POW-ER_SENSOR1 and POWER_SENSOR2) to control the sensor element’s supply voltage.

Figure 9: Power supply variants for sensor elements that are able to tolerate 2.4V to 3.6V The POWER_SENSOR1 circuit will provide less voltage drop at high currents and thus higher precision (given proper MOSFET selection). This is because the voltage VDDA (ADC refer-ence voltage of microcontroller) and the voltage at the sensor element are more similar. The POWER_SENSOR2 circuit has a slightly smaller BOM. Dedicated tests to verify the volt-

age drop of this circuit are recommended for proprietary designs. As a rule of thumb, currents exceeding 10mA will very likely require a dedicated MOSFET.

6.2.2 VOLTAGE FROM 2.4V TO 3.6V (FIXED VOLTAGE)

If the sensor needs a fixed voltage that lies within the range of 2.4V to 3.6V, a voltage converter is required that is able to convert voltages up and down. The reason for this is

that the supply voltage of the GSI can be anywhere within this voltage range. Useful components for such a supply are buck-boost converters or charge pumps and boost-converters with an integrated linear regulator. The following Figure 10 gives an ex-ample for a Buck-Boost Charge Pump with up to 60-mA Output Current (REG710NA-3, Texas Instruments).

Page 17: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 17/ 24

Figure 10: An example of a 3.0V fixed sensor element voltage supply

6.2.3 VOLTAGE FROM 3.6V TO 5.0V (FIXED VOLTAGE)

If the sensor needs a fixed voltage that lies above the range of 2.4V to 3.6V, a voltage

converter is required that is able to convert voltages up. Useful components for such a supply are boost converters or charge pumps and boost-converters with an integrated linear regulator. The following Figure 11 gives an example of a 170-μVrms Zero-Ripple Switched Capacitor Buck-Boost Converter for VCO Supply (TPS60241, Texas Instruments).

Figure 11: an example of a 5.0V fixed sensor element voltage supply

Page 18: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 18/ 24

6.2.4 VOLTAGE FROM 0.8V TO 2.4V (FIXED VOLTAGE)

If the sensor needs a fixed voltage that lies below the range of 2.4V to 3.6V, a voltage con-verter is required that is able to convert voltages down. Useful components for such a supply are buck converters or charge pumps and buck-converters with integrated linear regulator. The following Figure 12 gives an example of a High-Efficiency, 250-mA Step-Down Charge Pump (TPS 60500, Texas Instruments).

Figure 12: An example of a 1.8V fixed sensor element voltage supply The maximum current with this configuration is 50mA. By selecting different capacitors and resistors, voltages down to 0.8V and currents up to 250mA are possible with this circuit.

7 APPLICATION EXAMPLES The following sections give examples of off-the-shelf sensors elements with different inter-faces that are connected to the Generic Sensor Interface. The examples use an STM32L071K8U to manage the Generic Sensor Interface on one side and the specific sen-sor element’s interface on the other. All circuits have been tested at room temperature and designed with care. Nevertheless these circuits are given “as is” and should be qualified by the user of these examples ac-cording to his own standards.

7.1 SOIL VOLUMETRIC WATER CONTENT SENSOR The soil volumetric water content sensor is based on the Decagon EC-5 sensor. The sensors output voltage is proportional to the volumetric water content (VCW) of the soil surround-

ing it. This sensor behaves like a passive analog sensor and is able to tolerate voltages between 2.4V and 3.6V.

Page 19: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 19/ 24

Figure 13: Schematic of VWC sensor

7.2 PIR PRESENSE DETECTION SENSOR The PIR presence detection sensor is based on the Optex VXI-R sensor. The sensor has normally open (NO) contacts which close on detection of presence (ALARM+/ALARM-). It

also has a NO contact to detect tampering of the housing (TAMPER+/TAMPER-). According to the manufacturer, this sensor works down to 2.37V. ALARM+ and TAMPER+ are configured as digital inputs with internal pull-up resistors on the microcontroller. ALARM- and TAMPER- are configured as digital outputs, set to LOW. This sensor is a sleeping sensor and supplied all the time.

Page 20: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 20/ 24

Figure 14: Schematic of PIR presence detection sensor

7.3 AIR TEMPERATURE AND HUMIDITY SENSOR The air temperature and humidity sensor unit is based on Sensirion’s SHT35-DIS sensor. This sensor element provides an I²C interface and can be supplied by a voltage of

2.4V…5.5V.

Page 21: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 21/ 24

Figure 15: Schematic of air temperature and humidity sensor

7.4 ULTRASONIC DISTANCE SENSOR The ultrasonic distance sensor is based on Maxbotix’s I2CXL-MaxSonar®- WR/WRC™ Se-ries MB7040-101. The sensor element requires a 3.0V…5.5V supply voltage and provides

an I²C interface. The sensor element’s supply is 3.6V. Thus the microcontroller’s supply voltage is always below the sensor element’s supply voltage. A TLV61220 boost converter (Texas Instru-ments) is used to supply the sensor element.

Page 22: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 22/ 24

Figure 16: Schematic of ultrasonic distance sensor

7.5 TEMPERATURE SENSOR The temperature sensor is based on Sensirion’s STS31-DIS. The sensor element requires a 2.4V…5.5V supply voltage and provides an I²C interface.

Page 23: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 23/ 24

Figure 17: Schematic of ESO-T

7.6 TILT SENSOR The tilt sensor is based on level developments’ LCH-45-05 Dual Axis inclinometer. The sen-sor element provides an UART interface and requires 2.4V…3.6V to operate.

Page 24: APPLICATION NOTE 602: SENSORS FOR EMOS 200L · [1] User Manual EMOS 200L (EnOcean) [2] Data Sheet EMOS 200L (EnOcean) [3] Specification Generic Sensor Interface (EnOcean) [4] Data

APPLICATION NOTE: SENSORS FOR EMOS 200L

© EnOcean | www.enocean.com Subject to modifications | Coates, Lee | May-2018 | Page 24/ 24

Figure 18: Schematic of ESO-N