0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
SEN-13683

SEN-13683

  • 厂商:

    SPARKFUNELECTRONICS

  • 封装:

    -

  • 描述:

    SHT15 - Humidity, Temperature Sensor Evaluation Board

  • 数据手册
  • 价格&库存
SEN-13683 数据手册
Page 1 of 7   SHT15 Humidity and Temperature Sensor Hookup Guide SHT15 Overview The SHT15 is an easy to use, highly accurate, digital temperature and humidity sensor. All you need is two lines for 2-wire communication, and you’ll have relative humidity and temperature readings to help you sense the world around you! Features you should know about this sensor: • • • • • • • • • • • Operating Voltage: 2.4V min - 5.5V max 2 factory calibrated sensors for relative humidity & temperature Digital 2-wire interface (Not I2C, but similar) Measurement range: 0-100% RH Absolute RH accuracy: +/- 2% RH (10…90% RH) Repeatability RH: +/- 0.1% RH Temp. accuracy: +/- 0.3°C @ 25°C Precise dewpoint calculation possible Fast response time Low power consumption (typ. 30 µW) Here’s the datasheet This sensor is ideal for environmental sensing and data logging and can be used in applications ranging from a weather station to a humidor control system. Suggested Reading Things you might need to know: • What are pull-up resistors? • How to use a Breadbaord • How to Solder Page 2 of 7 • Serial Terminal Basics Hooking It Up Wiring up the SHT15 is very easy! We recommend soldering four male headers to the breakout board. You can then attach it to an Arduino or Arduino-Compatible Board, such as our RedBoard. Connections: Breakout board to Arduino There are only four pins that need to be hooked up in order to start using this sensor in a project. One for VCC, one for GND, and two data lines. • • • • VCC → 3.3V or 5V GND → GND Data → Any I/O Pin SCK → Any I/O Pin You can connect this sensor directly to the female headers on your Arduino like so… A SHT15 connected to a SparkFun RedBoard, using pins A4 and A5 as communication and pins A2 and A3 as power. Or, you can wire it up on a breadboard. A SHT15 connected to the SDA(A4) and SCL(A5) lines on a SparkFun Page 3 of 7 RedBoard. 2-Wire Interface Please note that the SHT15 has a 2-wire interface that is similar to I2C but is NOT I2C. You may use the SDA and SCL lines to communicate with this sensor so long as they are connected to A4 and A5 on your Arduino or Arduino compatible board. You may use any other I/O pins for the Data and SCK lines as well. Heads up! The datasheet states: “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. The controller must switch between the protocols.” We have experimented with this with mixed results. Make sure you test extensively if adding this to an I2C bus containing other sensors. Should bus contention be a problem, simply use two other I/O pins to communicate with the SHT15. Multiple Sensors Unfortunately, the SHT15 has its address hard-coded, making it nonaddressable. As a result, you may not have more than one SHT15 hooked up to any two pins at a given time. The 2-wire protocol used for this sensor does not allow for multiple of the same sensor to be on the bus, but it does allow multiple I2C devices to share the same bus as the SHT15, as mentioned above. In order to use more than one SHT15, you will need to use a dedicated pin for each sensor’s Data line. You may share the Clock (SCK) line between multiple sensors. For example, you could have one sensor’s Data line connected to pin 8 and another connected to pin 7, while both are sharing pin 9 as the SCK line. Declaring this using the library mentioned in the next section would look like this: //Create two instances of the SHT1X sensor SHT1x sht15(8, 9);//Data, SCK SHT1x sht15_2(7, 9);//Data, SCK Pull-up Resistor As suggested in the datasheet, a 10KΩ pull-up resistor was added to the Data line. Should you find yourself in a situation where you want this sensor and another I2C sensor with pull-up resistors to share the I2C lines, you may cut the trace in between the solder jumper labeled PU. If you ever need that pull-up again, simply place a blob of solder between the two pads. Page 4 of 7 Codebender Example To get started immediately, here is a Codebender example that uses the SHT1x library. SHT15_Basic (https://codebender.cc/sketch:153176?referrer=sparkfun) [ Edit È Clone & Edit 3 Download  by 1sparkfun (https://codebender.cc/user/sparkfun?referrer=sparkfun) /********************************************************** (/? (https://codebende 2 SHT15 Example  3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Joel Bartlett @ SparkFun Electronics 16 Sept 2015 referrer=sparkfun) referrer=sparkfun) https://github.com/sparkfun/SparkFun_ISL29125_Breakout_Ardu This example shows how to get the temperature in F or C and Developed/Tested with: SparkFun RedBoard Arduino IDE 1.6.5 Connections: GND ­> A2 Vcc ­> A3 DATA ­> A4 SCK ­> A5 Requires: SparkFun_SHT1X Arduino Library https://github.com/sparkfun/SHT15_Breakout/ This code is beerware. Distributed as­is; no warranty is given. *********************************************************** #include //variables for storing values float tempC = 0; float tempF = 0;   Loading Boards...       Serial Monitor: Port:   Speed: 9600   Once you’ve uploaded the code, connect using this serial terminal to see the output. Page 5 of 7 If you prefer to install the Arduino library and work within the Arduino IDE, read on. SHT1X Arduino Library and Example Luckily, there is an Arduino library and some example code to make using the SHT15 as easy as possible. Grab the SHT15 library for Arduino from the SHT15 GitHub Repository , or you can download the files directly from the button below. S H T 1 5 A RD U I N O L I B R A RY Need help using the Library Manager or want to install the library the old fashioned way? Visit our Arduino Library tutorial, for more information. Once the library is installed, open Arduino, and expand the examples menu. You should see the SHT_1X submenu. Load this example onto the Arduino. Open the serial terminal at 9600bps. You will see the current humidity and temperature in the room! Here is the same example sketch if you would rather copy and paste: Page 6 of 7 /************************************************************* ***************** SHT15 Example Joel Bartlett @ SparkFun Electronics 16 Sept 2015 https://github.com/sparkfun/SparkFun_ISL29125_Breakout_Arduino _Library This example shows how to get the temperature in F or C and hu midity Developed/Tested with: SparkFun RedBoard Arduino IDE 1.6.5 Connections: GND ­> A2 Vcc ­> A3 DATA ­> A4 SCK ­> A5 Requires: SHT1X Arduino Library https://github.com/sparkfun/SHT15_Breakout/ This code is beerware. Distributed as­is; no warranty is given. ************************************************************** ****************/ #include //variables for storing values float tempC = 0; float tempF = 0; float humidity = 0; //Create an instance of the SHT1X sensor SHT1x sht15(A4, A5);//Data, SCK //delacre output pins for powering the sensor int power = A3; int gnd = A2; void setup() { Serial.begin(9600); // Open serial connection to report valu es to host pinMode(power, OUTPUT); pinMode(gnd, OUTPUT); digitalWrite(power, HIGH); digitalWrite(gnd, LOW); } //­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ void loop() { readSensor(); printOut(); delay(1000); } //­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ void readSensor() Page 7 of 7 { // Read values from the sensor tempC = sht15.readTemperatureC(); tempF = sht15.readTemperatureF(); humidity = sht15.readHumidity(); } //­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ void printOut() { Serial.print(" Temp = "); Serial.print(tempF); Serial.print("F, "); Serial.print(tempC); Serial.println("C"); Serial.print(" Humidity = "); Serial.print(humidity); Serial.println("%"); } Resources and Going Further You should now have a good idea of how to add humidity and temperature sensing into your next project. Need some inspiration? Check out these other tutorials: • Make an automated terrarium that manages heat and humidity levels. • Build a humidor control box that maintains a constant humidity in a controlled space. Resources: • • • • SHT15 Datasheet HTU21D Breakout Board Schematic HTU21D Breakout Board Eagle Files Github repo containing all the latest files and code https://learn.sparkfun.com/tutorials/sht15-humidity-and-temperature-sensor-hookup-guide?... 10/8/2015
SEN-13683 价格&库存

很抱歉,暂时无法提供与“SEN-13683”相匹配的价格&库存,您可以联系我们找货

免费人工找货