Arduino Forum

Forum 2005-2010 (read only) => General => Bar Sport => Topic started by: ArduinoAndy on May 19, 2010, 04:26 am

Title: A new,easy to use, RF Mesh Engine.
Post by: ArduinoAndy on May 19, 2010, 04:26 am
A new,easy to use, RF Mesh Engine.

A contractor/customer wanted his mailbox monitored (200 yards away), his outdoor shed door monitored (100 yards away) and his garage door. All mesh nodes required batteries for operation.  

We looked at XBee but found a much better solution by going with Synapse wireless. The RF engines / modules by Panasonic, California Eastern Labs, Synapse RF and the new low powered, high speed RF engine by Atmel, which makes the AVR for the Arudino, is the cat's meow of mesh wireless. All the RF engines are hardware pin and software compatible by the built-in Python language embedded into each RF engine. Over the air programming and troubleshooting is a "SNAP" using the Synapse Portal development and deployment software. The RF engines will last for years, if programmed right, on 2 AA batteries.

Connecting the RF Engine to an Arduino is easy by the 3.3 VDC GPIO pins. (RF GPIO output to Arduino input - 3.3 VDC input is a high). A 3.3 VDC level converted is necessary in the other direction. (Sparkfun)

Synapse Wireless Link: http://www.synapse-wireless.com/
8-) 8-) 8-)
   
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: pracas on May 19, 2010, 04:46 am
How is it on the cost when compared to xbees and how easy to get started with?
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: Imahilus on May 19, 2010, 05:04 am
You need to call for prices....
Oh boy, that can't be good!  :-X
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: donkahones on May 19, 2010, 05:05 am
Looks like they cost from $25 to $40 a piece.

http://www.synapse-wireless.com/?mainID=3&subID=3&type=product&prodID=3

Looks comparable in price but a with a 3 mile range..... 8-)
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: mowcius on May 19, 2010, 12:51 pm
That looks like just what I need.

What do you think the latency on one of these is?
I want to use them for my UGV control as I haven't managed to bag an RC plane controller yet.
I presume it will be better for my sensor data transfer and being that cheap with 3 mile range, I have to pick a few up.

Mowcius
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: mowcius on May 19, 2010, 12:56 pm
Code: [Select]
A new,easy to use, RF Mesh Engine.

A contractor/customer wanted his mailbox monitored (200 yards away), his outdoor shed door monitored (100 yards away) and his garage door. All mesh nodes required batteries for operation.  

We looked at XBee but found a much better solution by going with Synapse wireless. The RF engines / modules by Panasonic, California Eastern Labs, Synapse RF and the new low powered, high speed RF engine by Atmel, which makes the AVR for the Arudino, is the cat's meow of mesh wireless. All the RF engines are hardware pin and software compatible by the built-in Python language embedded into each RF engine. Over the air programming and troubleshooting is a "SNAP" using the Synapse Portal development and deployment software. The RF engines will last for years, if programmed right, on 2 AA batteries.

Connecting the RF Engine to an Arduino is easy by the 3.3 VDC GPIO pins. (RF GPIO output to Arduino input - 3.3 VDC input is a high). A 3.3 VDC level converted is necessary in the other direction. (Sparkfun)

You got any more info on what you did/how you did it?

A blog perhaps?

Mowcius
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: ArduinoAndy on May 19, 2010, 03:45 pm
First the Mailbox RF Mesh Mote:

We took the Synapse RFET Mesh Engine and put a rollerball microswitch (for the mailbox door) in series with the power source - 2 AA battery holder. On mailbox opening, the microswitch provides power to the RFET engine and does a "power on reset". The code sends a message to the portal software and also turns on a digital bit to our Arduino compatible microcontroller. The microcontroller sends this bit to the IO Bridge, on to the internet for display and logging on the IOBridge servers.

The packaging for the Mailbox RF Mesh Mote was 1 1/2" PVC pipe and end caps. We coated the RF engine carrier board with "liquid rubber tape" and put Sorb-it silica gel desiccant bags to remove any moisture in the PVC tube.

Ditto for the Shed RF Mote: Same design, same packaging and software as the Mailbox RF Mesh Mote.  

As for the Garage Door RF Mesh Mote: We gutted the Skylink garage door electronics and put
our Synapse RFET Mesh Mote inside the enclosure. (We got this garage sensor for only $7.00 USD)
The plastic rod has a magnet on it and the old electronics had a magnetic reed switch.
We tore out the reed switch, from the old sensor electronics, and RTV it to the enclosure.
Again, upon activation, the reed switch provides power to the Synapse RF Mesh Mote.
Note: We tie wrapped a 2 cell AA battery holder on to the enclosure mounting bracket.

Sylink Garage Door Sensor Link - for ref. only:
http://www.google.com/imgres?imgurl=http://ecx.images-amazon.com/images/I/31jBnUY7X9L._SL500_.jpg&imgrefurl=http://housealarms.co.cc/skylink-gm-318t-household-alert-garage-door-monitor-sensor/&usg=__Xo0evnSkQq4ShR9TldpEJrWayhw=&h=500&w=368&sz=11&hl=en&start=6&um=1&itbs=1&tbnid=jTOHYj-uffBJDM:&tbnh=130&tbnw=96&prev=/images%3Fq%3Dskylink%2Bgarage%2Bdoor%26um%3D1%26hl%3Den%26sa%3DN%26tbs%3Disch:1



----------------
Python Code:
----------------
Note: Code "framework" was provided free from Synapse.

Code: [Select]
"""
Demo of accessing the "pin wakeup" capabilities of different SNAP ports.
This script just blinks an LED, and provides a sleepTest() function.
See also pinWakeup.py in the synapse subdirectory.

This mailbox mote is connected to the mailbox by a microswitch
tied to the power for the RFET. On activation, or door opening,
this mote sends a message to the portal "MailBox Mote 8C:FB Has Mail! "
Also, the mailbox mote in 30 seconds goes back to sleep or by mailbox door closure,
power is again disconnected from the mailbox mote.

Note:
      * To minimize power consumption remove all RS232 jumpers, and use VBAT power input.
      * Default all unused pins to output/low for minimum power consumption.
     
     
     
Battery Capacity:          2700 mAh   (2 @ ~ 1.6 VDC ea. = 3.2 VDC) (RFET Voltage range 2.7 - 3.4 VDC max)
Alseep Current:               0 mA
Awake Current                65 mA + 1 VDC ref. for battery monitor <--- recompute below figures!

Time Asleep seconds:      86400
Time Awake  seconds:         30
Sleep/Wake Cycle seconds: 86430
Average Current mA:        0.03

Battery Life (hours)      105631.45
Days                        4401.31
Months                       146.71
Years                         12.23 <--- shelf life will reduce this!



Author: ArduinoAndy
Date: 4/18/2010
Revision: 1.0.b


"""

from synapse.pinWakeup import *
from synapse.platforms import *

sleepCounter  = 0
secondCounter = 0
BUTTON_PIN    = GPIO_5

portalAddr = '\x00\x00\x01' # hard-coded address for Portal

# Since there are currently no ZIC2410 based SNAP Engines,
# there are currently no GPIO on ZIC2410, just plain IO.
if platform == "ZIC2410":
   LED_PIN = 1
else:
   LED_PIN = GPIO_1
   

@setHook(HOOK_STARTUP)
def start():
   global BUTTON_PIN
   
   # Initialize LED pin as output - GPIO 1
   setPinDir(LED_PIN, True)
   writePin(LED_PIN, False)
   
   # Initialize all non user pins to output/low for minimum power consumption
   setPinDir(GPIO_0, True)
   writePin(GPIO_0, False)
   
   setPinDir(GPIO_2, True)
   writePin(GPIO_2, False)
   
   setPinDir(GPIO_3, True)
   writePin(GPIO_3, False)
   
   setPinDir(GPIO_4, True)
   writePin(GPIO_4, False)
   
   setPinDir(BUTTON_PIN, False)     # Input for Button Pin Tac switch
   setPinPullup(BUTTON_PIN, True)   # Pullup Button Pin switch GPIO 5
   
   setPinDir(GPIO_6, True)
   writePin(GPIO_6, False)
   
   setPinDir(GPIO_7, False)         # Uart 1 Input - connected on 171 board
   #writePin(GPIO_7, True)
   
   setPinDir(GPIO_8, True)          # Uart 1 Output - connected on 171 board
   writePin(GPIO_8, False)
   
   setPinDir(GPIO_9, True)
   writePin(GPIO_9, False)
   
   setPinDir(GPIO_10, True)  
   writePin(GPIO_10, False)
   
   setPinDir(GPIO_11, True)         # Analog 7
   writePin(GPIO_11, False)
   
   setPinDir(GPIO_12, True)         # Analog 6
   writePin(GPIO_12, False)
   
   setPinDir(GPIO_13, True)         # Analog 5
   writePin(GPIO_13, False)
   
   setPinDir(GPIO_14, True)         # Analog 4
   writePin(GPIO_14, False)
   
   setPinDir(GPIO_15, True)         # Analog 3
   writePin(GPIO_15, False)
   
   setPinDir(GPIO_16, True)         # Analog 2
   writePin(GPIO_16, False)
   
   setPinDir(GPIO_17, True)         # Analog 1
   writePin(GPIO_17, False)
   
   setPinDir(GPIO_18, True)         # Analog 0
   writePin(GPIO_18, False)
   
   eventString = "MailBox Mote 8C:FB Has Mail! " # Message sent to Portal on POR from switch off/on from mailbox
   rpc(portalAddr, "logEvent", eventString)
   GPIO_0_ON(); # Turn on status bit to Gator
       
@setHook(HOOK_100MS)
def timer100msEvent(currentMs):
   """On the 100ms tick, pulse the LED"""
   global secondCounter
   global sleepCounter
   pulsePin(LED_PIN, 75, True)
   sleepCounter += 1
   secondCounter += 1
   if secondCounter >= 250: # In 25 seconds
       secondCounter = 0
       #eventString = "Test from 8C:FB "
       #rpc(portalAddr, "logEvent", eventString)
       pass
   
   # In 30 seconds - sleep forever or wakeup on Button pin press GPIO 5
   if sleepCounter >= 300:
       sleepCounter = 0
       GPIO_0_OFF(); # Turn off status bit to Gator
       writePin(LED_PIN, False) # Turn off LED
       sleepTest(0,0,BUTTON_PIN,True)  # power conserving mode 0 , wakeup ticks = 0 - wakeups on button press or POR

def sleepTest(mode, ticks, pin, enable):
   wakeupOn(pin, enable, False)
   sleep(mode, ticks)

def GPIO_0_ON():
   writePin(GPIO_0, True)

def GPIO_0_OFF():
   writePin(GPIO_0, False)
   
-----------------------------------------------------------------------------------------  

8-) 8-) 8-)
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: ArduinoAndy on May 19, 2010, 05:09 pm
Synapse RF Mesh Design Additional Info.

#1. We bought the Synapse EK2100 development kit ($99.00 USB) which includes the Portal development software and one SN171 RF development protoboard with RF and one USB SNAP Stick which is a USB RF bridge to the PC. In all, this kit contained two RF Mesh Modules. All you need is ~ +3 VDC to power the units if your RF Mesh use is external to the PC.

#2. Some RF Mesh Engines are 3 miles "LOS" - "Line of Sight" This range could be extended by just having many distributed RF mesh engines powered up in the idle state.

#3. We included a battery monitor circuit in our RF Mesh Motes to indicate battery life.
   See Synapse forum for more info.

#4. There is no need for RF Mesh central coordinators in the Synapse RF mesh network.

#5. The nodes are immediately able to communicate with each other.

#6. No PC software required - there is no need for software installed on a PC to coordinate the
nodes, they can think for themselves.

#7. Any node can talk to any other node - There is no central coordinator node with SNAP.

#8. There is a max. buffer packet limitation which you cannot exceed. You cannot send video due to this RF limitation.  
8-) 8-) 8-)
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: mowcius on May 19, 2010, 05:19 pm
Quote
There is a max. buffer packet limitation which you cannot exceed. You cannot send video due to this RF limitation.  

>:(

But sending images would be ok? 640x480, probably only 320x240

How fast do you think I could send an image?

Mowcius
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: pracas on May 19, 2010, 05:22 pm
the python code looks easier than the API part of Xbee but how steep is the learning curve to use this with an arduino(given that i'm at the lowest rung on networks and wireless communication ). perhaps a quick tutorial would help.
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: mowcius on May 19, 2010, 05:24 pm
Quote
the python code looks easier than the API part of Xbee but how steep is the learning curve to use this with an arduino(given that i'm at the lowest rung on networks and wireless communication ). perhaps a quick tutorial would help.

Indeed that would help.

The xbee can be very easy for simple stuff (just sending serial data) so even just a simple tutorial for this would be very much appreciated.

Mowcius
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: Imahilus on May 19, 2010, 05:28 pm
Thats a pretty good price, considering what you get and its capabilities.
Nice project =)
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: mowcius on May 19, 2010, 05:31 pm
Quote
"...it was my 12-year old son who set it up"
- Andy Griffis, CEO, StrongWatch Sensor

Just saw this flash up on Synapse Wireless home page so I presume it must be easy!  ;D
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: ArduinoAndy on May 19, 2010, 05:51 pm
Quote
the python code looks easier than the API part of Xbee but how steep is the learning curve to use this with an arduino(given that i'm at the lowest rung on networks and wireless communication ). perhaps a quick tutorial would help.


Download the EK2100 manual and the Synapse Ref. Manual. As for the Python scripts, there are
many to choose from - check the web-site.
BTW - I think they even allow you to download the PC Portal software.

8-) 8-)
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: ArduinoAndy on May 19, 2010, 06:19 pm
Quote
But sending images would be ok? 640x480, probably only 320x240
How fast do you think I could send an image?
Mowcius


The IEEE 802.15.4 specification limits packet sizes to 127 bytes.

BTW ... All docs, software, scripts, examples, projects, user Q/A can be found under Support /Synapse SNAP forum.
8-) 8-) 8-)
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: mowcius on May 19, 2010, 07:17 pm
Quote
The IEEE 802.15.4 specification limits packet sizes to 127 bytes.

BTW ... All docs, software, scripts, examples, projects, user Q/A can be found under Support /Synapse SNAP forum

Yeah but I gotta register to look at that...  :P

Mowcius
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: ArduinoAndy on May 19, 2010, 07:52 pm
Quote
Yeah but I gotta register to look at that...  

The same way you registered on this forum ... use any username you want ... no purchase necessary.
;)
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: ArduinoAndy on May 19, 2010, 08:06 pm
Quote
Looks like they cost from $25 to $40 a piece.
Looks comparable in price but a with a 3 mile range.....


We are still waiting on Atmel for their special RF Mesh Engine
The Atmel one - 2 Meg speed @ 18 ma. max. transmit current <--- This is the cat's meow.
The RF200P81 model RF Engine is also available in June with a MSRP of $18 (USD). It uses a low cost antenna without a powered amplifier, reaching LoS distances of up to 2000 feet.
8-) 8-) 8-)
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: mowcius on May 19, 2010, 08:06 pm
Quote
The same way you registered on this forum ... use any username you want ... no purchase necessary.


Yeah I know. I'm just lazy :P

I will go and register now :)

Mowcius
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: jcwoltz on Jan 09, 2011, 07:43 pm
@ArduinoAndy

Thank you for your post. This is what lead me to the RF Engine. I really think other arduino users would like these. Especially if they do a side by side comparison between XBees. This biggest downside to me is they are only available at future electronics. There are too many good points and advantages to list.

Price wise:
The lowest power module is $24 right now. http://www.futureelectronics.com/en/technologies/semiconductors/wireless-rf/rf-modules-solutions/802154-zigbee/Pages/2270387-RF100P86.aspx
The amplified version with an F antenna is $35 right now. http://www.futureelectronics.com/en/technologies/semiconductors/wireless-rf/rf-modules-solutions/802154-zigbee/Pages/6691737-RF100PC6.aspx
Then the amplified version with an RP-SMA connection is $39 right now. http://www.futureelectronics.com/en/technologies/semiconductors/wireless-rf/rf-modules-solutions/802154-zigbee/Pages/7782840-RF100PD6.aspx

For comparison the xbee pro rp-sma is $44.95 at sparkfun. http://www.sparkfun.com/products/8768

I used to use an arduino/Xbee combination everywhere I needed wireless data. Now I can just put a SNAP RF Engine in some of those places without the arduino. It is nice to reprogram the RF Engines over the air.

For some reason, the arduino community does not seem very interested in the RF Engines.  They have filled a need for me. They have also  created some needs for me. I couldn't find a cheap breakout board. So I made one. It is what pushed me to learn eagle and make my first PCB. (for anyone interested http://www.jcwoltz.com/2010/10/synapse-breakout-boards-available-for-sale/)

Beyond that, I needed to run RF Engines from a rechargeable battery. I have made a PCB with another guy, Serge Sozonoff begin_of_the_skype_highlighting     end_of_the_skype_highlighting begin_of_the_skype_highlighting     end_of_the_skype_highlighting, to charge LIPO batteries from a solar panel. An image:

The detail of the first batch are at:  http://www.jcwoltz.com/2010/11/pcbs-back-and-next-steps/

The details haven't been written up, but the latest board:

All these designs and more are released under a CC BY-SA at: http://code.google.com/p/jctc-electronics/source/checkout

If someone wants an arduino shield, I have started one. They could either ask to have some made, or take the design and make their own. An image:

I'm sorry for repeating some of this information. The RF Engines have allowed me to do what needs to be done quickly. I have done some basic testing and I'm able to reprogram an arduino wirelessly using RF Engines.
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: mowcius on Jan 09, 2011, 11:05 pm
Blimey, this thread's been around a while now.

I just got my hands on some XBee-Pro ZB Modules (2 mile range) which as they have gone down in price are now very similar priced to these modules (possibly slightly cheaper now for the range), I haven't done any further comparisons yet though...

From a quick look, I think the features on the XBees still exceed these but not by a lot :P

Possibly other users would like them but until this thread, I had never heard of them. Everyone who knows anything about wireless data has heard of XBees.

Quote
Especially if they do a side by side comparison between XBees.

Any chance you could do a comparison between these and the XBee Pro-ZB modules?

Mowcius
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: 48X24X48X on Jan 10, 2011, 02:51 am
IMHO, vendors like Dust Network, Synapse, and Greenpeak (just to name a few) are more eager to sell their products to larger cooperation. Furthermore, their modules are geared towards single chip (or single module) solution whereby the are promoting the use of the their software to configure and program. What I'm disappointed is at times, the sales guy always ask questions like how much is your consumption per year and how big is your company, etc. No doubt, the Synapse products are awesome products, I just wish that they have a wider distribution network like the XBee.  :-[
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: jcwoltz on Jan 10, 2011, 03:18 am
Quote
What I'm disappointed is at times, the sales guy always ask questions like how much is your consumption per year and how big is your company, etc. No doubt, the Synapse products are awesome products, I just wish that they have a wider distribution network like the XBee.  Embarrassed


I've never dealt with Synapse Sales. Agree 100% about wanting a wider distribution network. The arduino is the perfect platform that enabled me to learn and get running quickly. The RF Engines are sort of like that for wireless. Yes, there are things about Synapse Wireless that irk me to no end. This is not the place for that.

I strongly believe that this product can and will help out arduino users in many, but not all situations. For example, in a multi-room thermostat or other home control center, some node can be a RF engine and temp sensor and motion detector. Instead of an arduino, xbee, temp sensor, and motion detector. Yes, there are many other ways to accomplish this situation. That is a very basic use of the RF Engine.

The ability to run code on the RF engine helps me. I think it can help others too. The ability to make rpc calls to other nodes or portal make complicated things possible. Portal is software you can run on your computer. An example where I use this is a node can ask portal the current time. Portal then responds and the node sets the time in a RTC.
The code I run on portal is available at: http://jctc-electronics.googlecode.com/svn/trunk/SNAPpy/JC-portalrtc.py

The code I run on a node is available at: http://jctc-electronics.googlecode.com/svn/trunk/SNAPpy/PCF2129A.py
The important piece of that is the getPortalTime(). That will call the setRFTime function on portal. Portal will then call the writeClockTime function on the node that called it with the current time.

Although these are basic examples. I am fairly new to arduino, electronics, and wireless. IMO it is more than you can do with an xbee. Yes, you can use api mode on an xbee, but the common xbees do not allow you to run code on them.
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: andywatson on Jan 10, 2011, 03:41 am
I'm designing a wireless sensor network that will need to operate in a mesh layout.  I came across the Synapse RF engines a few weeks ago and they look like they're a really easy way to throw a bunch of nodes out and have them create a mesh automatically.  I'll need an arduino at each location anyway, so maybe it's overkill and I could go with the XBees instead.  Are the Xbee units easy to set up in a mesh for a noob like me, or should I go with the Synapse ones since they also have the Portal software and the USB snap stick which gives me a pretty good headstart?
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: Divyanshu on Jan 10, 2011, 06:55 am
Is this like the XBee?
Title: Re: A new,easy to use, RF Mesh Engine.
Post by: mowcius on Jan 10, 2011, 10:23 am
Quote
I'm designing a wireless sensor network that will need to operate in a mesh layout.  I came across the Synapse RF engines a few weeks ago and they look like they're a really easy way to throw a bunch of nodes out and have them create a mesh automatically.  I'll need an arduino at each location anyway, so maybe it's overkill and I could go with the XBees instead.  Are the Xbee units easy to set up in a mesh for a noob like me, or should I go with the Synapse ones since they also have the Portal software and the USB snap stick which gives me a pretty good headstart?

Do some research, I can't tell you what's best for your application. The XBees are easy to set up in a mesh network and easy to configure with X-CTU but I have never used these Synapse modules.

Quote
Is this like the XBee?

Haha  ;D
I saw that coming!
Umm, in that it's an RF wireless module which can do mesh networks etc, yes. There are differences though...

Mowcius