Application Note
www.sensirion.com Version 1 October 2014 D1 1/3
Application Note for Sensirion SHTC1 Xplained Pro Extension Board
Getting Started with the SHTC1 Extension Board and Demo Code
Summary
Many of today’s smart phones and tablets feature
processors to allow low power always-on sensor data
processing. Sensirion is partnering with leading sensor
hub manufacturer Atmel in their sensor hub initiative, a
collaboration to bring together sensor manufacturers and
companies developing fusion algorithms and create an
expandable, unified platform to prototype new sensor
subsystems for smart phones or wearable devices in a
simple, plug-and-play fashion.
Sensirion provides a sensor wing board which is
compatible with Atmel’s Xplained Pro platform. This board
includes the SHTC1 humidity and temperature sensor
which is built for the consumer and mobile market, with its
tiny 2x2x0.8mm3 footprint and 1.8V supply voltage.
Sensirion’s sensor board can be combined with any of the
already available extension boards providing touch
controls or display capabilities to quickly build powerful
systems and start developing right away.
Required Hardware and Wiring
To run the demo code, the Atmel SAMD20 Xplained Pro Board and the Sensirion SHTC1 Xplained Extension Board are
needed. The SHTC1 extension board has to be connected to SERCOM extension position 2 (EXT2) as shown in Figure 1.
Figure 1: STHC1 Xplained Extension Board connected to Atmel SAMD20 Xplained Pro Board
SHTC1 Sensor
BUTTON0
LED0
EXT2
Application Note for Sensirion SHTC1 Xplained Pro Extension Board
www.sensirion.com Version 1.2 October 2014 D1 2/3
Functionality of Demo Code
The provided demo code implements communication with the SHTC1 sensor over the I2C bus. Values are read in a loop and
used for detection of breathing on the sensor (so called Air-Touch).
On reset/start, a reference humidity value is calculated. During operation, humidity values are read in a loop and the difference
between current value and reference value is calculated. If the difference exceeds a given threshold, LED0 is turned on.
BUTTON0 can be used to re-initialize the reference value.
In addition, humidity values and calculated dew point values are sent to host PC over USART. When the example from Atmel
studio is running, the output can be read with any serial port terminal program (e.g., hyper-terminal or Tera term) from EDBG
Virtual COM Port.
Code Structure
The code is structured as follows:
SHTC1 driver (shtc1.c and shtc1.h)- Implements I2C driver for SHTC1 sensor
Main file (main.c) Contains an entry point of an example. The code in this file calls initialization routines and
subsequently starts the main loop, where values from the SHTC1 sensor are read and air-touch is detected
Helpers (demo_tools.c and demo_tools.h) Contains implementation of helper functions, e.g., printing messages
back to the terminal (for debugging purposes) and initialization of I2C board support.
References
More information on the SHTC1 can be found at www.sensirion.com/SHTC1.
License
Copyright (c) 2014, SENSIRION AG
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that
the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or
promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Application Note for Sensirion SHTC1 Xplained Pro Extension Board
www.sensirion.com Version 1.2 October 2014 D1 3/3
Headquarter and Sales Offices
SENSIRION AG Phone: + 41 (0)44 306 40 00
Laubisruetistr. 50 Fax: + 41 (0)44 306 40 30
CH-8712 Staefa ZH info@sensirion.com
Switzerland www.sensirion.com
SENSIRION Korea Co. Ltd. Phone: +82-31-440-9925~27
#1414, Anyang Construction Tower B/D, Fax: +82-31-440-9927
1112-1, Bisan-dong, Anyang-city, info@sensirion.co.kr
Gyeonggi-Province, South Korea www.sensirion.co.kr
SENSIRION Inc Phone: +1 805-409 4900
Westlake Pl. Ctr. I, suite 204 Fax: +1 805-435 0467
2801 Townsgate Road michael.karst@sensirion.com
Westlake Village, CA 91361 www.sensirion.com
USA
SENSIRION China Co. Ltd. Phone: +86 755 8252 1501
Room 2411, Main Tower Fax: +86 755 8252 1580
Jin Zhong Huan Business Building, info@sensirion.com.cn/
Postal Code 518048 www.sensirion.com.cn
Futian District, Shenzhen, PR China
SENSIRION Japan Phone: +81 3-3444-4940
Sensirion Japan Co. Ltd. Fax: +81 3-3444-4939
Shinagawa Station Bldg. 7F info@sensirion.co.jp
4-23-5 Takanawa www.sensirion.co.jp
Minato-ku, Tokyo, Japan
Find your local representative at: http://www.sensirion.com/reps
Revision History
Date
Author
Changes
07.08.2014
SDE/TPO
First Version
23.09.2014
CCO
Layout changes
09.10.2014
CCO/JWI
Released
24.10.2014
CCO
Minor changes
Mouser Electronics
Authorized Distributor
Click to View Pricing, Inventory, Delivery & Lifecycle Information:
Sensirion:
1-101204-01