How to control SHT15 sensor using WIZwiki-W7500

details

In this posting, you can learn how to connect the SHT15 (made by Senirion, http://www.sensirion.com), a high-precision temperature & humidity sensor to WIZwiki-W7500 and read the sensin value.

SHT-xx Series

Sensirion is the manufacutrer of digital relative humidity and temperature sensors. SHT-xx familiy is sensors with high performand and intergration (CMOSens Technology). The capacitive humidity and temperature sensors provide digital and fully calibrated ouput.

  • 2 sensor on 1 chip : relative humidity & temperature
  • Temperature Sensing Range : -40 ~ +120도(max)
  • Humidity Sensing Range : 0% ~+99.9% RH
  • Digital fully-calibrated output
  • Fast response Speed < 8 sec
  • Low power consumption (typ. 30 uW)
  • Low Cost

senserion

 

The sensors are provided in different packaging type : SMD type (SHT 1x series), pin type (SHT7x series). Sensirion also provides filter caps for their sensors. The filter cap fits the outer dimension of the SHTxx sensors and allows for compact system design.

SHT-2

 

As you see above pin map, the pins for VDD, GND, DATA and SCK are required to be connectd. Other pins are “Not connect”.

sht-3

 

Above picture is the reference circuit provided by the Senserion’s official datasheet.

The supply voltage of SHT1x must be in the range of 2.4 ~ 5.5V, and recomendded supply voltage is 3.3V. Supply Voltage (VDD) and Ground (GND) must be decoupled with a 100nF capacitor. 10K pull-up resistor is required to be connected to Data line. The serial interface of the SHT1x is optimized for sensor readout and effective power consumption. The sensor cannot be addressed by I2C protocol; however, the sensor can be connected to an I2C bus without interference with other devices connected to the bus.

Hardware Connection with WIZwiki-W7500

By referring to below, draw the circuit for WIZwiki-W7500 board and the sensor. Connect to D2 for DATA and D3 for SCK.

sht11_6

 

sht-4

mbed coding

As WIZwiki-W7500 board is ARM mbed enabled, it is possible to use the on-line web compiler. If you use the web compiler, you can search the related libraries on site. Let’s search the libraries for SHT series. As you see below, you can find several source codes that published by other users.

sht-5

Import one of them.

#include "mbed.h"
#include "SHTx/sht15.hpp"
 
Serial pc(USBTX, USBRX);
DigitalOut busy(LED1);
 
// I used D2 and D3 here  but you
// can use any other GPIO as well.
SHTx::SHT15 sensor(D2, D3);
 
int main() {
    pc.baud(115200);
    wait(0.5f);
    pc.printf("Hello WIZwiki-W7500!\n\r");
    pc.printf("===========================================\n\r");
    // Speed things up a bit.
    sensor.setOTPReload(false);
    sensor.setResolution(true);
    
    while(1) {
        busy = true;
        sensor.update();
        busy = false;
        
        // Temperature in celcius
        sensor.setScale(false);
        pc.printf("Temperature [ %3.2f C ]\r\n", sensor.getTemperature());
        
        // Temperature in fahrenheit
        sensor.setScale(true);
        pc.printf("            [ %3.2f F ]\r\n", sensor.getTemperature());
        
        // Relative Humidity
        pc.printf("Humdity     [ %3.2f %% ]\r\n", sensor.getHumidity());
        
        pc.printf("===========================================\n\r");        
        wait(3);
    }
}

It’s done! If you click below link, you can see the codes.

https://developer.mbed.org/users/nanjsk/code/SHT15_WIZwiki-W7500/

You can check the values of temperature and humidity through serial terminal

In this posting, you can learn how to connect the SHT15 (made by Senirion, http://www.sensirion.com), a high-precision temperature & humidity sensor to WIZwiki-W7500 and read the sensin value.

SHT-xx Series

Sensirion is the manufacutrer of digital relative humidity and temperature sensors. SHT-xx familiy is sensors with high performand and intergration (CMOSens Technology). The capacitive humidity and temperature sensors provide digital and fully calibrated ouput.

  • 2 sensor on 1 chip : relative humidity & temperature
  • Temperature Sensing Range : -40 ~ +120도(max)
  • Humidity Sensing Range : 0% ~+99.9% RH
  • Digital fully-calibrated output
  • Fast response Speed < 8 sec
  • Low power consumption (typ. 30 uW)
  • Low Cost

senserion

 

The sensors are provided in different packaging type : SMD type (SHT 1x series), pin type (SHT7x series). Sensirion also provides filter caps for their sensors. The filter cap fits the outer dimension of the SHTxx sensors and allows for compact system design.

SHT-2

 

As you see above pin map, the pins for VDD, GND, DATA and SCK are required to be connectd. Other pins are “Not connect”.

sht-3

 

Above picture is the reference circuit provided by the Senserion’s official datasheet.

The supply voltage of SHT1x must be in the range of 2.4 ~ 5.5V, and recomendded supply voltage is 3.3V. Supply Voltage (VDD) and Ground (GND) must be decoupled with a 100nF capacitor. 10K pull-up resistor is required to be connected to Data line. The serial interface of the SHT1x is optimized for sensor readout and effective power consumption. The sensor cannot be addressed by I2C protocol; however, the sensor can be connected to an I2C bus without interference with other devices connected to the bus.

Hardware Connection with WIZwiki-W7500

By referring to below, draw the circuit for WIZwiki-W7500 board and the sensor. Connect to D2 for DATA and D3 for SCK.

sht11_6

 

sht-4

mbed coding

As WIZwiki-W7500 board is ARM mbed enabled, it is possible to use the on-line web compiler. If you use the web compiler, you can search the related libraries on site. Let’s search the libraries for SHT series. As you see below, you can find several source codes that published by other users.

sht-5

Import one of them.

#include "mbed.h"
#include "SHTx/sht15.hpp"
 
Serial pc(USBTX, USBRX);
DigitalOut busy(LED1);
 
// I used D2 and D3 here  but you
// can use any other GPIO as well.
SHTx::SHT15 sensor(D2, D3);
 
int main() {
    pc.baud(115200);
    wait(0.5f);
    pc.printf("Hello WIZwiki-W7500!\n\r");
    pc.printf("===========================================\n\r");
    // Speed things up a bit.
    sensor.setOTPReload(false);
    sensor.setResolution(true);
    
    while(1) {
        busy = true;
        sensor.update();
        busy = false;
        
        // Temperature in celcius
        sensor.setScale(false);
        pc.printf("Temperature [ %3.2f C ]\r\n", sensor.getTemperature());
        
        // Temperature in fahrenheit
        sensor.setScale(true);
        pc.printf("            [ %3.2f F ]\r\n", sensor.getTemperature());
        
        // Relative Humidity
        pc.printf("Humdity     [ %3.2f %% ]\r\n", sensor.getHumidity());
        
        pc.printf("===========================================\n\r");        
        wait(3);
    }
}

It’s done! If you click below link, you can see the codes.

https://developer.mbed.org/users/nanjsk/code/SHT15_WIZwiki-W7500/

You can check the values of temperature and humidity through serial terminal

2
COMMENTS

Please Login to comment
1 Comment authors
Flow Meter Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Flow Meter
Guest

nice

Flow Meter
Guest

Thanks