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:
Note: Code “framework” was provided free from Synapse.
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.
* 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
Years 12.23 <--- shelf life will reduce this!
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
LED_PIN = GPIO_1
# Initialize LED pin as output - GPIO 1
# Initialize all non user pins to output/low for minimum power consumption
setPinDir(BUTTON_PIN, False) # Input for Button Pin Tac switch
setPinPullup(BUTTON_PIN, True) # Pullup Button Pin switch GPIO 5
setPinDir(GPIO_7, False) # Uart 1 Input - connected on 171 board
setPinDir(GPIO_8, True) # Uart 1 Output - connected on 171 board
setPinDir(GPIO_11, True) # Analog 7
setPinDir(GPIO_12, True) # Analog 6
setPinDir(GPIO_13, True) # Analog 5
setPinDir(GPIO_14, True) # Analog 4
setPinDir(GPIO_15, True) # Analog 3
setPinDir(GPIO_16, True) # Analog 2
setPinDir(GPIO_17, True) # Analog 1
setPinDir(GPIO_18, True) # Analog 0
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
"""On the 100ms tick, pulse the LED"""
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)
# 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)