Reply to topic  [ 1 post ] 
AM2315 I2C Temperature & Humidity Sensor (HCSENS0043) 
Author Message
Site Admin

Joined: Sun Aug 05, 2012 4:02 pm
Posts: 682
Post AM2315 I2C Temperature & Humidity Sensor (HCSENS0043)
[IMAGE TBA]




The Aosong AM2315 is a wall mountable temperature and humidity sensor (HCSENS0043) based on the AM2315 capacitive digital sensor. It provides a two wire digital I2C output suitable for interfacing to most 3.3V and 5V microcontrollers and can be powered from a 3.5V to 5.5V (5V recommended) power supply. The sensor is encased in a durable ABS plastic case and comes supplied with 2x wall brackets for both horizontal or vertical location (includes fixing screws and wall plugs).


Image Image

If you plan to use this sensor with an Arduino microcontroller please checkout our exclusive HCAM2315 Arduino library available for download from our support forum (see download section of this post).




Image




Specification:

Product code: HCSENS0043
Supply Voltage: 3.5 to 5.5V (5V recomended)
Interface: 2 wire I2C (SDA, SCL) interface (external pullups required)
Temperature resolution: 0.1 oC
Temperature Accuracy: +/-1 oC (Max)
Temperature range: -40 to 125 oC
Humidity resolution: 0.1 %RH
Humidity Accuracy: +/-2 %RH
Sensor Length: 97.4mm
Sensor Diameter:15.8mm



Image




Example Sketch:

Code:
/* FILE:    HCAM2315_Library_Example
   DATE:    24/01/18
   VERSION: 0.1
   AUTHOR:  Andrew Davies
   
24/01/18 version 0.1: Original version

This example sketch uses the HCAM2315 library to read the current temperature and humidity
from a AM2315 device. The sketch repeatedly reads the sensor once a second and outputs the
result to the serial UART.

Hobby Components (HobbyComponents.com) products currently supported by this library:

Aosong AM2315 I2C Digital Temperature & Humidity Sensor (HCSENS0043)

More information about the library can be found in the software section of our support
forum here:

http://forum.hobbycomponents.com/software


You may copy, alter and reuse this code in any way you like, but please leave
reference to HobbyComponents.com in your comments if you redistribute this code.
This software may not be used directly for the purpose of selling products that
directly compete with Hobby Components Ltd's own range of products.
THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
REASON WHATSOEVER.
*/


#include <HCAM2315.h>       //Include the HCAM2315 library.

#define I2CADD 0x5C         //I2C address of the AM2315.

HCAM2315 HCAM2315(I2CADD);  //Create an instance of the library.

void setup()
{
  Serial.begin(9600);       //Initiliase the Arduino serial library.
 
  HCAM2315.init();          //Initiliase the library.

}

void loop()
{
  //Trigger a temperature & humidity measurement and read back the results.
  HCAM2315.Read(); 

  //If there are no errors output the results to the serial UART.
  if(HCAM2315.CheckCRC())
  {
    Serial.print("Temp (oC): ");
    Serial.print(HCAM2315.Temp());
    Serial.print("\tHumidity (%RH): ");
    Serial.println(HCAM2315.Hum());
  }else
  {
    Serial.println("CRC ERROR!");
  }

  //Wait a second before taking another measurement.
  delay(1000);
}




Image

The HCAM2315 Arduino compatible library can be downlaoded from the software section of this forum here:

http://forum.hobbycomponents.com/viewforum.php?f=58

Attachment:
AM2315_HCSENS0043_Datasheet.pdf





Disclaimer: Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do not provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.


You do not have the required permissions to view the files attached to this post.


Tue Jan 30, 2018 10:24 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Thank you to phpBB.com & phpBB.ro.
Design created by Florea Cosmin Ionut.
© 2011 All contents of this site are © Hobby Components LTD