Difference between revisions of "Temperature & Humidity Sensor"

From Microduino Wiki
Jump to: navigation, search
(Changed Outline)
(Changed Specifications)
Line 5: Line 5:
 
This mCookie sensor uses an AM2321 chip and the standard mCookie connector to give you the ability to quickly add high precision temperature measuring and humidity sensing to any Microduino project. The sensor has an on-board microprocessor delivering rapid response, high noise tolerance and excellent data quality.
 
This mCookie sensor uses an AM2321 chip and the standard mCookie connector to give you the ability to quickly add high precision temperature measuring and humidity sensing to any Microduino project. The sensor has an on-board microprocessor delivering rapid response, high noise tolerance and excellent data quality.
 
==Specification==
 
==Specification==
*Electrical specification
+
*Electrical Specifications
**Operation voltage: 2.6~5V;
+
**Operation Voltage: 2.6~5V;
**Input device
+
**Output: Data over I2C bus protocol
*Tech parameters
+
*Technical Specifications
**Accuracy: 0.1°C  in temperature and 0.1%RH in relative humidity;
+
**Resolution:
*Size
+
***0.1 Degrees Celsius (°C)
**Size of the Sensor: 8mm*11mm,
+
***0.1 percent (%) Relative Humidity
**Size of the Board: 20mm*10mm
+
*Dimensions
**1.27mm-pitch 4Pin interface;
+
**Dimensions of the Sensor: 8mm*11mm
*Connection method
+
**Dimensions of the Board: 20mm*10mm
**Interface: I2C。
+
** Connector Interface: 4 Pin, 1.27mm-pitch
**Pin description: GND, VCC, Signal 1 and Signal 2. This output signal is IIC and needs IIC interface to receive signal, which can connect Sensorhub's IIC pin.
+
*Communication Protocol
 +
**Interface: I¬¬2C
 +
**Pins: SDA (data), SCL (clock), VCC (power) and GND (ground)
  
 
==Development==
 
==Development==

Revision as of 17:25, 15 August 2016

Outline

This mCookie sensor uses an AM2321 chip and the standard mCookie connector to give you the ability to quickly add high precision temperature measuring and humidity sensing to any Microduino project. The sensor has an on-board microprocessor delivering rapid response, high noise tolerance and excellent data quality.

Specification

  • Electrical Specifications
    • Operation Voltage: 2.6~5V;
    • Output: Data over I2C bus protocol
  • Technical Specifications
    • Resolution:
      • 0.1 Degrees Celsius (°C)
      • 0.1 percent (%) Relative Humidity
  • Dimensions
    • Dimensions of the Sensor: 8mm*11mm
    • Dimensions of the Board: 20mm*10mm
    • Connector Interface: 4 Pin, 1.27mm-pitch
  • Communication Protocol
    • Interface: I¬¬2C
    • Pins: SDA (data), SCL (clock), VCC (power) and GND (ground)

Development

Equipment

Module Number Function
mCookie-CoreUSB 1 Core board
mCookie-Hub 1 Sensor pin board
Microduino-Temp&Hum 1 Sound detection sensor
  • Other Hardware Equipment
    • One USB cable
Temp-Hum.jpg

Preparation

  • Setup 1:Connect Microduino-Temp&Hum to the IIC port of the Hub.
MCookie-Temp&Hum-sensor.JPG
  • Setup 2:Stack the CoreUSB, Hub and Sound together and then connect them to the computer with a USB cable.
MCookie-Sound-pc.JPG

Experiment: Detect Temp&Hum Values

  • Open Arduino IDE and copy the following code into IDE.
#include <Wire.h>
#include <AM2321.h>

void setup() {
  Serial.begin(9600);
}

void loop() {
  readByAM2321();
  delay(500);
}

void readByAM2321()
{
  AM2321 am2321;
  am2321.read();

  Serial.print("(");
  Serial.print(am2321.temperature/10.0);
  Serial.print(", ");
  Serial.print(am2321.humidity/10.0);
  Serial.println(')');
}
  • Select the right board from Tools→Serial Port in Arduino IDE and download the program.
Uploadhum.JPG
  • Open the serial monitor after download; The value displayed reflects the current temperature and humidity.
MCookie-Temp-Hum-reshum.JPG

Program Debugging

  • The program uses AM2321 temperature and humidity collection library and defines "#include <Wire.h>" and "#include <AM2321.h>" as driving files.
  • “am2321.temperature/10.0”represents the calculated temperature value and " am2321.humidity/10.0" represents the calculated humidity value.

Application

Microudino-Temp&Hum can be widely applied in HVAC system, dehumidifier, testing and detection equipment, consumer goods, automobile, automatic control, data recorder, weather station, appliances, humidity control, medical care, and other relative humidity detection control.

Video