Skip to main content

Adding a Humidity Sensor to Sun SPOT

Posted by lucastorri on January 8, 2008 at 9:02 AM PST

Happy new year for everybody!

Last month I got a Sun SPOT from a friend that came back from US and I can say that the kit is very cool. Now, in my way to learn more about it I decided to add a Humidity Sensor to the board.

This was my first experience on extending the SPOT hardware so in the beginning I was a little petrified but the process showed to be very simple. I got a free sample Humidity Sensor from Sensirion . I didn't imagined it was so little.

After wiring up the sensor and adding the necessaries resistor and capacitor I powered it, but there was no way to know if it was working, so I started to implement the Sensor communication protocol using Java. The component has 4 connectors: VDD, for power supply; GND for ground; DATA , for bidirectional data transfer and for last SCK that is clock signal for controlling the transfer. I decided to use +3V and GND available in the SPOT board and D0 e D1 for SCK and DATA respectively. The result program you can download here. This program is responsible for achieving the Sensor data and convert it using the formulas given by Sensirion.

07012008(007).jpg

Then, I connect the wires of the Sensor circuit to the SPOT board, programmed the software and surprisingly I got the expected results, showing that current temperature is near 29 Celsius degrees and the relative humidity is in 79%. SOrh and SOt are the values got directly from the Sensor.

Captura_da_tela-Terminal-1.png

All this got me less than 2 hours. Using the Sensor Data Sheet and SPOT Javadoc and documentation as reference I can say that this task was incredibly easy to do.

08012008.jpg