Adafruit Si7021 User Manual

Temperature and humidity sensor

Advertisement

Quick Links

Adafruit Si7021 Temperature + Humidity Sensor
Created by lady ada
Last updated on 2018-11-21 06:58:57 PM UTC

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Si7021 and is the answer not in the manual?

Questions and answers

Summary of Contents for Adafruit Si7021

  • Page 1 Adafruit Si7021 Temperature + Humidity Sensor Created by lady ada Last updated on 2018-11-21 06:58:57 PM UTC...
  • Page 2: Table Of Contents

    Install Adafruit_Si7021 library Load Demo Library Reference Python & CircuitPython CircuitPython Microcontroller Wiring Python Computer Wiring CircuitPython Installation of Si7021 Library Python Installation of Si7021 Library CircuitPython & Python Usage Full Example Code Python Library Docs Downloads Files & Datasheets...
  • Page 3: Overview

    42% when it feels more like 77%. Enter the Si7021 Temperature + Humidity Sensor - the best way to prove the weatherman wrong! This lovely sensor for Silicon labs has ± 3% relative humidity measurements with a range of 0–80% RH, and ±0.4 °C temperature accuracy at a range of -10 to +85 °C.
  • Page 4 5V power & logic. There's a PTFE filter to keep the sensor clean, that's the white flat thing on top. Also comes with some pin header. Some light soldering is required to attach the header but it's easy to do. © Adafruit Industries https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor...
  • Page 5: Pinouts

    Pinouts The Si7021 is a I2C sensor. That means it uses the two I2C data/clock wires available on most microcontrollers, and can share those pins with other sensors as long as they don't have an address collision. For future reference, the I2C...
  • Page 6: Assembly

    Assembly The photos below show a an HTUD21 sensor rather than the Si7021 but the soldering procedure is identical! Prepare the header strip: Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - long pins down ©...
  • Page 7: Add The Breakout Board

    Add the breakout board: Place the breakout board over the pins so that the short pins poke through the breakout pads © Adafruit Industries https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor Page 7 of 19...
  • Page 8: And Solder

    Be sure to solder all pins for reliable electrical contact. (For tips on soldering, be sure to check out our Guide to Excellent Soldering (https://adafru.it/aTk) You're done! Check your solder joints visually and continue onto the next steps © Adafruit Industries https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor Page 8 of 19...
  • Page 9: Arduino Code

    20 and on a Leonardo/Micro, digital 2 https://adafru.it/rAA https://adafru.it/rAA The Si7021 has a default I2C address of 0x40 and cannot be changed! Install Adafruit_Si7021 library To begin reading sensor data, you will need to install the Adafruit_Si7021 library (code on our github repository) (https://adafru.it/rAw).
  • Page 10: Load Demo

    We also have a great tutorial on Arduino library installation at: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use (https://adafru.it/aYM) Load Demo Open up File->Examples->Adafruit_Si7021->si7021 and upload to your Arduino wired up to the sensor Thats it! Now open up the serial terminal window at 115200 speed to begin the test. © Adafruit Industries https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor...
  • Page 11: Library Reference

    32 as you have learned in grade school! Reading the humidity is equally simple. Call sensor.readHumidity() to read the humidity also as a floating point value between 0 and 100 (this reads % humidity) © Adafruit Industries https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor Page 11 of 19...
  • Page 12 This sensor also has a serial number which you might find handy! Call to read out the 8 bytes sensor.readSerialNumber() of unique ID. Then you can access them from sensor.sernum_a sensor.sernum_b © Adafruit Industries https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor Page 12 of 19...
  • Page 13: Python & Circuitpython

    Adafruit_Blinka, our CircuitPython-for-Python compatibility library (https://adafru.it/BSN). CircuitPython Microcontroller Wiring First wire up a SI7021 to your board exactly as shown on the previous pages for Arduino. Here's an example of wiring a Feather M0 to the sensor with I2C: Board 3V to sensor VIN...
  • Page 14: Python Installation Of Si7021 Library

    REPL (https://adafru.it/pMf)so you are at the CircuitPython >>> prompt. Python Installation of Si7021 Library You'll need to install the Adafruit_Blinka library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3.
  • Page 15: Full Example Code

    That's all there is to using the Si7021 sensor with CircuitPython! Full Example Code import time import board import busio import adafruit_si7021 # Create library object using our Bus I2C port i2c = busio.I2C(board.SCL, board.SDA) sensor = adafruit_si7021.SI7021(i2c) while True: print("\nTemperature: %0.1f C"...
  • Page 16: Python Library Docs

    Python Library Docs Python Library Docs (https://adafru.it/C3f) © Adafruit Industries https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor Page 16 of 19...
  • Page 17: Downloads

    Downloads Files & Datasheets Fritzing object in Adafruit Fritzing library (https://adafru.it/aP3) Arduino library on GitHub (https://adafru.it/rAw) EagleCAD PCB files on GitHub (https://adafru.it/rAB) Si7021-A20 datasheet (https://adafru.it/rAC) K&R Smith calibration notes (https://adafru.it/BfU) Schematic Fabrication Print © Adafruit Industries https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor Page 17 of 19...
  • Page 18 © Adafruit Industries https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor Page 18 of 19...

Table of Contents