Wireless Temperature and Humidity

This product and tutorial has been replaced, please go here

Introduction

In this project I will show you how to build a wireless temperature and humidity sensor. The sensor transmits the temperature and humidity over RF to the Wireless Base Station Receiver. This sensor will work seamlessly with the PrivateEyePi system, or you can use it for your own purposes. The temperature and humidity signals, that are received by the wireless base station receiver, are sent over the serial interface in clear text so it is very easy to write you own code to receive the data. We supply a sample Python program that show you how to read the data from the serial interface. 


Parts List

The parts are available from our store in a kit. Note that these are only the parts below and and not include the RF receiver (Wireless Base Station Receiver).

1. 9V battery connector. We have chosen to power the sensor using a 9V battery which is converted to a regulated and constant 3.3V by the power POD (no. 9 in the part list). Both the DHT22 sensor (no. 2) and the RF Transmitter (no. 11) need 3.3V. 

2. DHT22 Temperature and Humidity Sensor

3. Developer Board - Dimensions are 3.13' x 2.40' x 0.06' or 79.5mm x 61mm x 1.6mm. A very versatile project board. It has plenty of room for electronic parts that can be soldered in the prototyping area which has horizontally connected rows of pads similar to a bread board. The top left hand section is specially designed to connect RF modules (no.11) or any other RF module that has an XBee footprint. 

4. 0.1uf Capacitor.

5. 2 x 10 way 2mm sockets that connect the RF module to the developer board.

6. 6 pin FTDI style header to perform program uploads via a serial interface (not required for this project, but very useful if you want to get into some of your own sensor programming). 

7. 3 resistors (10k, 100k and 1M).

8. Jumper wire use to connect various parts on the develop board.

9. Power POD capable of taking a 4.4v to 16v input to give a 3.3v regulated output. It's often used to power 3.3v devices from 4 AA batteries, 6 to 12v PSU's etc. We've chosen to use a 9V battery to power this sensor but you can use any power supply that is between 4.4V and 16V.

or

Another option for power is to power the sensor with a single AA battery. This needs a different power POD (NCP1402) and a couple battery clips that can be soldered onto the developer board.

Battery life expectancy:

The sensor uses 30.5mA every 5 minutes and sleeps in between transmissions (using .005mA while sleeping). A transmission takes 1 second so you can expect the following battery life:

9V (0.5 Ah)  - 288 Days (0.56 Year)
AA (2 Ah)    - 819 Days (2.25 years)

10. Two 10 pin connector for the RF module.

11. The RF Module that interfaces with the DHT22 sensor and transmits the temperature and humidity.


Figure 1 - Wireless Temperature and Humidity Sensor Parts List

Build Instructions

Step 1 - Connect the RF Module

There are two ways to connect the RF module. You can either use the 2mm sockets (part no. 5) and 10 pin connectors (part no.10) so that the RF modules can plug in and out of the sockets or you can solder the RF module directly to the board, in which case you won't be needing the sockets or connector parts. My preference is to solder the RF module directly to the board because it's much easier and much less soldering work. The advantage of using the connectors is you can easily remove the RF module and plug in a different module.

Depending on your choice follow one of the two following sub-steps:

Step 1.1 - Connecting the RF Module directly onto the developer board

Soldering the RF module directly to the board requires a technique. I find it easiest to put a small amount of solder on each of the 20 pads (labelled by the two orange arrows in Figure 2), before placing the RF module on the board. The orange arrows in Figure 2 show the 20 connections that need to be soldered (10 on each side of the RF module). Take your time doing this step and be very meticulous about making sure the module is positioned perfectly to the board. If you make mistakes now it will be a lot of work later to diagnose and correct mistakes. 

Then place the RF module onto the developer board as shown in Figure 2. Tape the module in place to that it does not move during the soldering. 

Solder the corners to anchor the module to the board. You do this by melting the solder you placed on each pad, one by one, using an upward movement of the soldering iron to connect the solder from the developer board on to the side of the RF module. Each of the RF module pads a have a grove that will guide the soldering iron upwards. This helps you not bridge solder onto the adjacent RF module pads. Once you have the module anchored and each pad on the board lines up nicely with each half pad of the module then solder the remaining 16 connections in a similar manner. Carefully inspect each connection and make sure there is a good contact with no bridges.

Figure 2 - Soldering the RF module directly to the develop board

Notice the two rows of pads either side of the RF module. Each of these pads are connected to it's corresponding pin on the module. You will use these pads later on to connect the DHT22 sensor to the RF module. If you have a circuit tester then use it to test each of the 20 outer connections pads connect to their respective pin on the RF module. 

Also look carefully at the top left hand corner of the RF module, you will see a small "1" written on the developer board. This is showing you that the top left pin is pin number 1. The pin numbering goes from top left starting at 1 and going to 10 on the bottom left, then from bottom right (pin 11) to top right (pin 20). I will use these numbers later to refer to the pins of the RF module. 

Step 1.2 - Connecting the RF Module to the developer board using connectors

Start by soldering the two 10 pin sockets (part no. 5) to the developer board. Use some tape to make sure that they are at right angles to the board as shown in Figure 3.

Figure 3 - Position the sockets using some tape

Once the two sockets are soldered to the board connect the two 10 pin connectors (part no. 10) to the sockets and then place the RF module between the two 10 pin connectors so that each of the 10 pins wither side line up with the connectors on the RF module, as shown in Figure 4.

Figure 4 - Solder the RF module to the two 10 pins connectors

Now solder the RF module to the two 10 pins connectors. Try to use a little solder as possible on each pin so that you don't bridge any of the pins. Take your time. Making mistakes now will cost you a lot of time later with diagnosing and fixing problems.


Step 2 - Connect the DHT22 Sensor

Next you will use the prototyping area of the developer board to connect the DHT22 to the RF module and to power. The prototype area has two columns of 5 pads. Each of the 5 pad rows are connected to each other (similar to a breadboard). Solder the DHT22 to the developer board as shown in figure 5. Solder the 10k resistor to pins 1 and 2 of the DHT22 also shown in Figure 5. Solder from the underside of the board. 

Figure 5 - Connect the DHT22 and 10k resistor to the developer board

Next use jumper wire to connect pin 1 on the DHT22 to pin 15 of the RFu-328 and pin 4 of the DHT22 to GND as shown in Figure 6 & 7. 



Figure 6 - Wireless Temperature & Humidity Sensor Wiring Diagram



Figure 7 - Wireless Temperature & Humidity Sensor Wiring Diagram

Step 3 - Connect the Power POD

Next you will connect the power POD that will convert the 9V power to a regulated 3.3V. The developer board has an area specially designed to connect power pods. You will use some bare jumper wire, or some off-cuts from the 10k resistor you connected earlier, to connect the power pod to the developer board. Line up the holes in the power pod with the 4 holes for the power pod in the developer board, as shown in Figure 6. Put a small piece of wire through each of the four hols and solder both the top and bottom so that the pads on the power pod connect with the pads on the developer board.

Step 4 - Connect the DHT22 sensor to the RF module

Connect pin 2 of the DHT22 sensor to pin 9 of the RF module as shown in figure 6.

Step 5 - Connect pin 7 to pin 19 of the RF Module

Next connect pin 7 to pin 19 of the RF Module as shown in Figure 7.

Step 6 - Connect the 9V battery connector

Connect the 9V battery connector to the pads labelled "+" and "-" on the developer board as shown in figure 7.

Step 6 - Connect the capacitor

Locate the two small holes just below the RF module and solder in the capacitor (part no. 4). It does not matter which way round the capacitor is inserted. See figure 6.

Step 7 - Voltage monitor

In order for your sensor to send the voltage level of the battery you need to build a voltage divider circuit which will pass the current level to one of the analog input of the RF module (pin 14). This is required so you can monitor the voltage of your sensor on the dashboard. The voltage divider consists of two resistors (1M and 100k included in the parts) connected in series that go between +VE of the battery and Ground. You will connect Pin 14 in between each of the resistors. Use some free space on the developer board to build the circuit shown in figure 8.


Figure 8 - Voltage divider circuit

Step 8 - Attach an antennae

Cut a piece of single core wire (any wire will do) to exactly 8.2cm (3.2") and solder it to the antennae pad on the RFu-328 shown in figures 6 & 7.



Congrats, now that you have your sensor built set up your dashboard by following these steps.

Firmware Updates
See the following link for instructions on how to load new firmware to the RFu-328.

14/12/14 - V2.0 Rfu-328 DHT22 (right click, save link as) - This update will improve battery life. If you bought your kit before this date then it would have had older firmware loaded.


Comments