element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Forget Me Not Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Forget Me Not Design Challenge
  • More
  • Cancel
Forget Me Not Design Challenge
Blog Wireless Sensor Node and Gateway Design Details
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: electronichamsters
  • Date Created: 3 Aug 2014 12:43 PM Date Created
  • Views 1804 views
  • Likes 0 likes
  • Comments 3 comments
  • forget_me_not
  • mqtt
  • rfm69
  • flexible_home
  • home_automation
  • arduino
Related
Recommended

Wireless Sensor Node and Gateway Design Details

electronichamsters
electronichamsters
3 Aug 2014
  1. [INDEX]
  2. Introduction and project description
  3. Sensor Node and Gateway Design
  4. How I use OpenHAB - audio notification and dashboards
  5. Design detail for wireless sensor nodes and gateway
  6. Uber Sensor - wireless sensor for fire, smoke, gas, barking, light, movement
  7. Diaper Box Sensor
  8. Laundry Room Sensor


Wireless Sensor Node and Gateway Design Details

 

This is part of a series of blog posts related to the Forget Me Not Design Challenge.  Click here to go to my introduction and index.

 

I'm looking forward to trying out the EnOcean sensors.  While still waiting for my sensor kit to arrive, I thought I'd share more details regarding the design for my Arduino wireless sensor nodes and gateway.

 

First, my design goals for these wireless Arduino sensor nodes.

 

  • Must be cheap and scalable.  Since you could potentially have many many sensor nodes, the per unit cost of each node becomes important.  I've been able to keep the sensor node costs to under $20.

 

  • Must be energy efficient.  The required components for the sensor node need to be able to be able to sleep.  This includes the Arduino as well as the wireless transceivers.

 

  • Have good wireless range.  I ruled out a lot of wireless transceivers.  Wifi was too power hungry and expensive.  Bluetooth was too expensive and did not have enough range.  Xbee and z-wave were also expensive and the range was only mediocre for the cheaper units.  The best possibilities for wireless transceiver were either the very popular $6 nRF24L01+ or a newer wireless transceiver RFM69HW that's $4.

 

 

Wireless Transceiver Selection

 

image

 

The nRF24L01+ is pretty well known, and from testing, the range will work for most of the house.  So my first task was to test out the RFM units to see what its range looks like.  Using an Arduino with a $10 GPS module and the $4 RFM69HW transceiver, I took a walk outside. Inside the house is another Arduino with a RFM69HW transceiver connected through the serial monitor on the computer.  The portable GPS Arduino transmits the GPS coordinate to the home Arduino using the RFM69HW, and the data is saved by the computer.  This is the map that I generated from the data.  The color coding indicates signal strength.

 

image

 

As you can see, the RFM69HW can go through a couple of houses and about 700 feet.  That's pretty good range, better than the nRF24L01+.  This is partly due to the difference in frequency.  The RFM69HW uses 915MHz, while the nRF24L01+ uses 2.4GHz.  I think the 2.4GHz wavelength is also much more congested than 915MHz, so the RFM69HW seems like a good pick.

 

 

Battery Power Design

 

Next, I used a few resources on the web to come up with a strip board design for a battery powered Arduino.  Powering the Arduino using wall power is pretty easy, but I wanted my system to be flexible enough to incorporate battery powered sensor nodes.  Using a few resources online and following the JeeLab and Low Power Lab circuits, I started testing a hardware and software design that incorporated the RFM69HW.

 

image

 

Using this sketch, I was able to get a sleeping current consumption of about 100uA.  Not as low as the datasheet indicate, but it's a low enough for practical use right now.  I should be able to get over 2 years of sleep time out of 4xAA batteries using this design, if sleeping was the only thing it did.  I think there are some things I can do to further improve the sleep current (disable BOD, disconnect pull up resistors), but I really needed to move forward with the rest of the design.

 

I wanted my design to be as easy to replicate for others as possible. So I used a strip board for my battery power nodes.  Other makers won't have to get PCB's printed out.  This strip board shows a reed switch used in my Mailbox Notifier device.

 

image

image

 

 

Gateway Design

 

While the field node design was going on, I was also working on the gateway design to connect sensor node data to OpenHAB.  The sensor node data coming over the RF link had to be translated into something that OpenHAB can understand.  After some experimenting, I came up with this setup.  A RFM gateway Arduino translates the RF data.  Then an ethernet Arduino posts the data to a MQTT broker, Mosquitto.

 

image

 

This is what the data looks like when being passed from sensor node to RFM gateway to Ethernet Gateway to OpenHAB.

 

image

 

And this is what the gateway looks like in real life.  Pretty prototype board-ish image.  You see the RFM gateway top left, ethernet gateway top right, and the Raspberry Pi sitting below them.

image

 

I wanted to make the gateway fairly hands off – so once you set it up, you won't have to reprogram it when adding sensor nodes or adding sensors to existing field nodes.  This spreadsheet helps in understanding the scheme used to build MQTT topic names for any future node.  The Ethernet Gateway simply forms the topic name based on the field node properties (node address, device ID, data fields).  It doesn't have to actually know what those sensors are.  When I configure the MQTT topic to Items in OpenHAB, I do this definition.

 

image

 

 

Extensibility and Replication

 

I didn't want to just make something for myself.  I wanted to make a design that could be used by others, and document it well enough that they could easily use it.  The code for the gateways and sensor nodes are freely available on my github.  There are some variations in this design for others who want to use different components.  If you want to use nRF24L01 instead of the RFM69HW, you only need to change the wireless library and maintain a similar data struct.  Future wireless transceivers could be incorporated simply by changing the RFM gateway – the rest of the scheme could stay the same.

  • Sign in to reply
  • mcb1
    mcb1 over 11 years ago in reply to electronichamsters

    Eric

    The figures do show a distinct improvement .... and even allowing for some of the power limits in some countries, the Rx sensitivity is better than many others.

    Figures don't always tell the whole story, but your testing has shown a very good range, which is probably much more than needed in use.

     

    Pity there aren't a few more vendors for them.

     

    Thanks for the info

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • electronichamsters
    electronichamsters over 11 years ago in reply to mcb1

    I read about the NRF905.  I wonder about the range.  I don't have any units to test with, but for comparison:

    RFM69HW:  sensitivity=-120dB, output power=20dB

    NRF905:  sensitivity= -100dB, output power=10dB

     

    So the RFM69HW has an link budget of +30dB over the NRF905.  That's quite a bit of range.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 11 years ago

    Nice work.

    I like how you have integrated other sensors that may not be available to purchase, or are too expensive.

     

    You may want to look at the NRF905 range of Transceivers which can do 433, 868, 915 MHz.

    March 2014 Member of the Month: Peter Oakes uses them for something similar.

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube