Tuesday, November 2, 2010

Sensors part 2 - Environmental Sensors

Temperature Sensors
These are most common found in air-conditioning unit to lower the room temperature to the temperature set by the remote controller.  They are widely used in a lot of electrical appliance and PC motherboard to measure the temperature. There are analog and digital version of the sensors. The common ones are the LM35 (analog) and DS18B20 (digital) and thermistor.

I've compared three temperature sensors ( LM35, DS18B20 and DHT11 ) and my findings are as follows :-


DS18B20 1-wire parasite power

DS18B20 - These are the best, most expensive and harder to find locally. The DS18B20 uses a 1-Wire bus for data transfer (another wire for ground) and can be daisy chained together to draw power directly from the 1-wire bus "parasite power" with a 4K7 ohm pull-up (5V) resistor. They only use 1 digital pin on the Arduino and can support a lot of these sensors on a single pin as all the DS18B20 have unique address in them. Just need to load the libraries and call the function to retrieve the temperature from each of the sensors. Since the data is digital, these sensors are not dependent on voltage level and can go a further distance.


LM35 - These sensors are very common and easily found locally. They are analog sensor and need to be connected to Arduino analog pin to get the voltage level. If the power supply are not regulated at 5V and fluctuating between 4.8-5.5V,  these analog sensors could give a wrong readings as they are dependent on the voltage level. Even when I use analogReference(INTERNAL) using the internal 1.1V for the temperature calculations, with different power source, regulated 5V and USB 5V power, the temperature reading are off by 1C between them. In terms of accuracy, they are 0.5- 1.0C higher than the DS18B20 so you might need to do minor adjustment in the temp calculations. If you think the temp reading are off, always use a multimeter to check the power supply voltage.


A cheaper way to measure temperature is to use a thermistors together with a 10K resistors.

Gas Sensors

Smoke and gas sensors

These different sensors that can detect different gasses like CO, CO2, alcohol, LPG, smoke and air quality. A smoke detector usually works in conjunction with an alarm detect smoke using optical or ionization methods.

Relative Humidity Sensors
Humidity sensors also known as hygrometer, measure the relative humidity in the air. It measures both the air temperature and moisture. It is express as a percent, is the ratio of actual moisture in the air to the highest amount of moisture air at that temperature can hold. The warmer the air is, the more moisture it can hold, so relative humidity changes with fluctuations in temperature. 

DHT11 sensors

These sensors are always combined with a temperature sensors and give digital readings. The common ones are DHT that sense both relative humidity and temperature with digital output.

I've tested this sensor, DHT11, they are relatively cheaper than the SHT-11. The sensor are from Aosong AM2303 with range of 0 - 100% Relative Humidity and Temperature range of -40 to 125 Celsius. The accuracy are +/- 2% RH. The output from the sensor are digital but they are connected to an Analog pin from the Arduino. After initialising the sensor, you call a function to get four values from the sensor, relative humidity in percentage, temperature and the checksum. I find the temperature value is 1C higher than DS18B20.

1 comment:

  1. Really your post is really very good and I appreciate it. It’s hard to sort the good from the bad sometimes, but I think you’ve nailed it. You write very well which is amazing. I really impressed by your post.
    Home Alarm Installation



Related Posts Plugin for WordPress, Blogger...