Envico_Humidity.php 8244 Bytes 12-02-2018 11:22:53
ENVICO®light
Humidity Adapter
|
|
Top side, MC9808, ±0.25°C |
Bottom side, CC2D35, ±2%RH, (±0.3°C) |
✈ Circuit Description
This board allows a lot of different assembly options. You mayst want to measure tempereature with a TMP101, an MCP9808 or with an CC2D35.
The humidity is measured with a CC2D35, located on the bottom side of the pcb. The unpopulated SO8 is for an eeprom to hold sensor
name and calibration data as well as alarm and warning levels (professional version). In order to be independant of the supply voltage,
an MCP1703 5 V regulator (SO-23) has been added as well.
✈ Downloads
✈ Arduino Sketch - The TEST - Code
Double click on code to select ...
/*
* EGG-DUINO V1.0
* 12.04.2016 ALEXANDER C. FRANK
*
*/
#include <Wire.h>
#include <SPI.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(9, 8, 7, 6, 5, 4);
// Pin declarations
int LED = 13 ;
int SA = 3 ;
int SB = 2 ;
// Constants declarations;
byte Eeeprom = 0x50 ;
byte LuxSensor = 0x44 ;
byte Barometer = 0x60 ;
byte HumidityAddress = 0x28 ;
byte TemperatureAddress = 0x18 ;
// Global Variables declaration
float humidity = 0 ;
float temperature = -99 ;
void setup()
{
Wire.begin();
Serial.begin(9600);
pinMode(LED, OUTPUT);
pinMode(SA, OUTPUT);
pinMode(SB, OUTPUT);
pinMode(A2, OUTPUT);
lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(0,0);lcd.print("GRUEZI :-)");
lcd.setCursor(0,1);lcd.print("EGG-DUINO V1.0");
delay(6789);
}
void loop()
{
lcd.clear();
// Select DSUB K6, SD_0 and SC_0 (MC14052)
digitalWrite(SA, LOW);
digitalWrite(SB, LOW);
digitalWrite(A2, LOW);
// TEMPERATURE, MCP8908
Wire.beginTransmission(TemperatureAddress);
Wire.write(0x05);
Wire.endTransmission();
Wire.requestFrom(TemperatureAddress,2);
byte temp_hi = Wire.read();
byte negative = temp_hi & 0x10;
temp_hi = temp_hi & 0x0F ;
byte temp_lo = Wire.read();
int temp = (( temp_hi << 8 ) | temp_lo ) ;
temperature = temp / 16.0 ;
if (negative >= 1) temperature -= 256 ;
lcd.setCursor(0,0);lcd.print("TEMP: ");
if (temperature > -45.0 ) { lcd.print(temperature,1); lcd.print(" ");
lcd.print((char)223); lcd.print("C "); }
else { lcd.print("NESCIO "); }
// HUMIDITY, CC2D35
Wire.beginTransmission(HumidityAddress);
Wire.write(0x00);
Wire.endTransmission();
Wire.requestFrom(HumidityAddress,2);
int hum_hi = Wire.read();
int hum_lo = Wire.read();
int humi = (( hum_hi << 8 ) | hum_lo ) & 0x3FFF ;
int ok = ( humi & 0xC000 ) >> 14 ;
humidity = humi * 100.0 / 16384 ;
lcd.setCursor(0,1);lcd.print("HUMI: ");
if (humidity > 0 ) { lcd.print(humidity,1); lcd.print(" %RH "); }
else { lcd.print("NESCIO "); }
delay(3456);
}
✈ Share your thoughts
The webmaster does not read these comments regularely. Urgent questions should be send via email.
Ads or links to completely uncorrelated things will be removed.
Your Browser says that you allow tracking. Mayst we suggest that you check that DNT thing ?