Thursday, January 29, 2009

Oops...

Electronic components are very sensitive. Anything beyond the tolerable range within a fraction of a second is enough to destroy most of them. I learned this lesson in the hard way. A tiny piece of exposed metal of a hanging wire touched the high voltage side of the voltage regulator and destroyed the OLED 20x2 LCD Display (I bought this from eBay for $20) and the SHT11 Humidity Sensor (I got this free but worth more than $40). I can live without the display since there are alternatives but loosing the humidity sensor is a real blow. Buying a new one at this moment is very unlikely. It seems I have to postpone (abandon ?) my weather station. I was about to finish it by adding the barometer module using an atmospheric pressure sensor.

But hey... I got a new project... this time, I have to be extra cautious because it involves 230v. A small mistake can be deadly. Will post the details later...

Friday, January 09, 2009

Humidity Sensor

SHT11 is a humidity + temperature sensor developed by the Sensirion. They had a sample give away program sometime back and I also got one. Since it is SMD (surface mount device) and really small (7.49mm x 4.93mm), it took a long time for me to play with it. Usually I don't use PCBs (printed circuit boards) simply because I don't have the facility to make them. Instead, I use vero board (strip board) for my circuits which has copper strips with pin holes in specific distances. These boards can only be used with through hole devices; not with SMDs. But this SHT11 is too good to be dumped. So I decided to 'mount' the device on the strip 'surface' . I found that the width of one strip is eqaul to width of two pins of the device (One strip is roughly 1mm wide and the distance between two pins is 1.27mm). The device has 4 pins in the same side consuming the width of two strips. I split each strip into two which matched perfectly with the 4 pins in the device. The hardest part was the soldering. SHT11's datasheet has specific instruction for soldering. For manual soldering, contact time must be limited to 5 seconds at up to 350C. One needs a steady hand and sharp eyes to do this kind of a job. Somehow I managed to solder it without any problem. After soldering the device, it has to be stored at 75% relative humidity for 12 hours to re-hydrate. I kept it inside a plastic container with a wet piece of wool to maintain the humidity.

These pictures show how small it is...





After that I had to wait another couple of weeks for the LCDs to arrive. I bought (actually I won) a 20x4 LCD character display from eBay for $9.5 including shipping. Since the program is a bit heavy, I had to use PIC16F88 which has 4k of memory. First I tested the display and it worked fine. Then I attached the SHT11 according to the guidelines given in the data sheet (with pull-up resistor and conditioning capacitor). At first it didn't work but after several attempts it worked and displayed the temperature and relative humidity. To verify the temperature figure, I hooked up another temperature sensor; DS18B20; one-wire device from Dallas. Wrote a quick and dirty procedure to display the temperature along with the rest. The difference between the temperature figures of two sensors are almost negligible. It didn't exceed 1C anytime. Based on this I assume the Relative Humidity is also correct.

Temperature & Humidity


Temperature from two devices and Humidity


Temperature, Humidity and Dew Point