Sunday, 18 March 2012

Wireless sensor node - enclosure mark 2 (13)

My previous attempt to pack all the parts of my base station into an enclosure ended in failure. I previously attempted to find an alternative box on the Hobbycraft website but was underwhelmed by the 6 search results in their online store. I was therefore not expecting much when I went to my local Hobbycraft store this weekend.



I was actually really impressed! Hobbycraft had 2 entire rows of boxes of various sizes and colors! I bought three sizes - a medium one for storage, a smaller one to hold my base station parts and the smallest one to potentially hold a wireless sensor node. It turns out that my previous search results were simply the result of a poor query. I had searched for "plastic box". If I had searched for "really useful box" I would have found 100 products! The full range of really useful boxes can be seen here.

I spent some time re-arranging my breadboards and wiring and produced the following circuit which fit neatly in the base station box. The components here are as follows.
  • 5V 16MHz Arduino Pro Mini on the left inserted into a small breadboard.
  • USB mini breakout board for power on the bottom. This is attached to the box by four screws and I cut a hole in the side of the box to allow a cable to be plugged in.
  • SD card breakout board with 2GB card in middle.
  • 315MHz RF receiver on the right.
  • Bluesmirf silver Bluetooth module in the bottom right.
This is all contained in a 0.35L Really Useful Box.




To work with the base station over Bluetooth I installed a new Windows Serial client - Termite. After powering on my base station the first thing which my code requires is that I set the real time offset. This approach allows me to record a reasonably accurate time for sensor readings without needing a real time clock module. To set the time I have been using the Epoch Converter page. I use the results of this page to construct a command to send to the base station e.g. set_time_1332111967. Once this is done the base station successfully receives a reading every 5 minutes from my wireless sensor node. Yay!

Unfortunately I did hit one problem. For some reason my base station seemed unable to receive any sensor data while I was connected over Bluetooth. This surprised me as the Bluetooth frequency is 2.4GHz and I therefore don't expect it to interfere with my 315MHz transmitter on my receiver.