Table of Contents
- Assemble the Parts
- Configure the Radio
- Wire up the Circuit
- View it!
- Use it!
Measuring temperature is a popular way to get started with analog sensing. This example uses the TMP36 low-voltage linear temperature sensor that is included in the XBee Wi-Fi Cloud Kit. The TMP36 is very easy to set up. It doesn't require any complicated circuits or tricky calculations to determine if it's hot or not.
The sensor generates a voltage output output that is directly proportional to the Celsius temperature. The hotter it is, the higher the voltage that is passed to the XBee's analog-to-digital converter (ADC). This reading is then sent via Digi Remote Manager to the XBee Wi-Fi Cloud Kit's online dashboard application where you can monitor the temperature right in your web browser.
2) Assemble the Parts
To hook up a temperature sensor you'll need:
3) Configure the Radio
You'll configure the radio using your free Device Cloud account. (Note that radios can also be configured using XCTU.)
NOTE: If your radio was recently configured by the XBee Wi-Fi Cloud Kit then the sampling rate and pin settings are already set. You can safely skip these steps.
- Log in to Device Cloud.
- Select Devices under the Device Management tab.
- Select the XBee Wi-Fi that you are configuring, then select Properties or double-click to open the Properties window for that device.
- Select Configurations, then Input and Output Settings, then confirm that DIO2/AD2/SPI_SCLK is set to Analog Input.
- On the same page, confirm that Sample Rate is set to 5000 ms which will take a sample every five seconds.
- Save your changes!
6) Use it!
Now you can see the temperature using the analog input of your XBee Wi-Fi! Try getting data from various locations, like outside on your patio or inside your freezer. You can also add a graph widget to examine data over time. Log the changes in your office to see temperature shifting from day to night. Finally you'll have the documentation to convince your boss to buy you a blanket!
Remember that this temperature sensor is designed to produce stable readings, so it may take a few minutes for the sensor to fully reflect changes from its environment. If you want to experiment with rapidly changing sensor data try building the light sensor.