BWSN Remote Temperature Sensors

New demo video, this one is about remote temperature sensors. Check it out:

What’s great about this chapter is that you don’t need an arduino. All the remote sensors are using xbee’s and the control is coming from the Processing sketch over the serial port.

Some helpful advice:

  • After assembling your caps and chip for the voltage regulator verify it is putting out the correct voltage with a multimeter. DON’T connected anything to the voltage regulator until you verify this step.
  • Since Pin 20 (AD0) on the xbee is setup for this project as an analog read, you can verify that the xbee is transmitting by attaching its input to ground (to read the lowest possible temp) or to the 3.3v rail (to read the highest possible temp). This verifies the xbee is communicating.
  • The BWSN Basic Box from Sparkfun includes a TMP36 chip which is different from the LM335 mentioned in the book. The TMP36 is easier to setup but uses a different formula to get the actual temperature. An updated processing sketch can be found on Robert Faludi’s BWSN page referencing this: “TMP36 Instructions: Simple Sensor Network”.
  • If you are using the latest Processing, the examples in the book won’t work exactly right. They changed the way the com ports get setup.  Instead of setting the “mySerialPort” string, you have to choose the correct COM port from the “Serial.list()” array.  See the code example below.
try {
// opens your serial port defined above, at 9600 baud
// ## (2013-Aug-27) Updated Processing, now have to
// ## select the serial port from the "serial.list" array.
// ## IE "serial.list()[X]" where X is the COM port
// ## in the array.[2], 9600);
  • The Processing sketch provided on the BWSN website includes code for both the LM335 from the book and the TMP36 provided in the BWSN Basic Kit from sparkfun. Comment out the LM335 temp calculation code and comment in the TMP36 code to get the temperatures to display accurately.
This entry was posted in BWSN, Source Code. Bookmark the permalink.

4 Responses to BWSN Remote Temperature Sensors

  1. gr33nonline says:

    You say “or to the 3.3v rail (to read the highest possible temp)” to test the D0 (pin 20) input… surely that should be 1.2V, as that is the maximum analogue voltage that the XBee input can handle..? Or, if you are using the LM335, you could use 3.3V volts, by connecting the 3.3V to the top of the potential divider, so as to still end up with 1.2V at the D0 input…

  2. gr33nonline says:

    OK, this was a mis-understanding on my part, as neither the spec sheet, nor BWSN is particularly explicit about this. The analogue input can safely support voltages up to 3.3V, but can only sample up to 1.2V – anything greater is still 1024…

    Great blogs by the way, they’ve been a great help… :-)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s