Difference between revisions of "Pusher"

From Kevin Darrah Wiki
Jump to: navigation, search
Line 44: Line 44:
  
 
[[File:captive.png|600px]]
 
[[File:captive.png|600px]]
 
 
### Click configure, and select the network that you Pusher to use and enter in the password.  You'll now see where you want to enter in the Pushbullet "o.xxx" access token.  Then you can give the board a name, and a trigger message.  Once that's entered in, click Save and you're all done!  You should now get a push notification to your phone (when you installed the app, make sure you gave permission).   
 
### Click configure, and select the network that you Pusher to use and enter in the password.  You'll now see where you want to enter in the Pushbullet "o.xxx" access token.  Then you can give the board a name, and a trigger message.  Once that's entered in, click Save and you're all done!  You should now get a push notification to your phone (when you installed the app, make sure you gave permission).   
  

Revision as of 14:31, 6 December 2017

...Back to Projects:

PusherHeader.png

The Pusher Board is an IoT project that does one thing - it pushes you a notification triggered by a digital input. Well, it's much more than that, but this is the inspiration. I wanted to design a WiFi board that essentially sleeps most of its life, but when that door switch, flood sensor, motion sensor, etc.. gets triggered, I just want a notification immediately on my phone. And that's about it... a perfect IoT device in the background doing its job.

Latest Release Version 4

PusherHookedUp.png

  • Simple IoT development board that was designed to trigger "Push Notifications" on a smart phone/tablet based on a trigger event.
  • Unique low-power front-end to enable sub 1uA sleep current - uses a pulse to trigger wake-up, so even if door/window/etc is opened, the same ultra low currents can be maintained. Compare to standard pull-up/down resistor based digital input designs with significantly higher leakage current.
  • The board will wake itself up once an hour to check the battery voltage - if running low, a push notification is sent to warn the user. This timer can be used to check other things as well - temperature changes, accelerometers, or other environmental sensors.
  • Based on ESP8266 WiFi Module (ESP-12S) - all source code is available for download and developed in the popular Arduino IDE.
  • Battery Input can be any Lithium Polymer 3.7V - standard micro JST connector jack is used (please double check polarity),any of these would work nicely.
  • Sensor input to trigger the "Wake Up" is a simple passive switch. Typically a standard magnetic door/window switch is used and the board can be configured to wake on the "opening" (Normally Closed) or "closure" (Normally Open) of the contact. Solder jumpers set this - Normally Closed is Default, so standard door/window switches wake the board up when opened.
  • Battery Charging On-Board via MicroUSB - set for 4.2V at 500mA. 5V input pads broken out for energy harvesting experimentation.
  • Dimensions only 0.8" x 1.6 " (20.32mm x 40.64mm)

PusherV4diagram.png

What is the Pusher Board?

coming soon...

Purchase Pusher Board

coming soon...

Pusher Board Out of the Box

The setup for getting the Pusher Board installed is very easy. The base firmware that comes loaded on the board is already setup to work with Pushbullet, so to get started, just follow these steps:

  1. Push Bullet Setup
    1. Go here: https://www.pushbullet.com and sign-in. You can do this (currently) with Facebook or Google - I use Google
    2. Download the mobile app for iOS or Android, and sign in. You can also setup push notifications for your computers as well by installing the browser plugins.
    3. Go back to your account page, click on settings, then "Generate Access Token". Copy the entire "o.xxxxx" token and save this somewhere. This is what you will use to provision the Pusher board to your Push Bullet account

PushBulletToken.png

  1. Pusher Board Setup
    1. You will need a 3.7V Lithium Battery - fully charged will be 4.2V. The battery connects to the Pusher board using a standard micro-JST connector. Any of these would work. Battery estimator calculations coming soon, but I typically use a ~1000mAh battery on all my doors/windows... that yields very long battery life.
    2. Then for the sensor input, this can be passive switch, but use magnetic door/window sensors like these and then solder the wires to the JST connector. For the JST side, I go with these. It would be nice to find magnetic switches with the JST connectors already soldered on... Also, keep in mind that by default, the board is configured to "Wake" when the contact opens. This is the normally closed mode of operation. If it is desired to wake on a closure of the contact, then see the diagram above and desolder the NC solder jumpers (ensure they are open) and solder across the NO jumpers (make sure they are closed). That default NC configuration was chosen because the magnetic door/window sensors are closed when the magnet is in proximity, so the Pusher board wakes up when the door/window is opened.
    3. Before mounting the Pusher board in it's final location, a simple bench test is helpful to make sure everything is setup. With the battery and sensor plugged in, simply bring the magnet close to the sensor, hold there for a second, then pull away. You should see the blue LED on the board go solid. If you don't have the sensor part yet or plan on using something else, just press and hold the 'wake' button on the board. Since this is the first time the board has been powered up at this location, it will need to be provisioned for your network. When that LED is ON, you have 2minutes to provision:
      1. Go to your network settings, to expose available WiFi networks. You should see "The Pusher". Go ahead and connect to this network. A captive portal window should automatically pop up:

Captive.png

      1. Click configure, and select the network that you Pusher to use and enter in the password. You'll now see where you want to enter in the Pushbullet "o.xxx" access token. Then you can give the board a name, and a trigger message. Once that's entered in, click Save and you're all done! You should now get a push notification to your phone (when you installed the app, make sure you gave permission).

Captivesetup.png

Pusher Board Operation

coming soon...

Pusher Board Base Firmware

Note! the board is preloaded with the base firmware out-of-the-box, but if you want to develop/modify your own firmware, this section will go through the steps for getting the base code to compile.

Base Firmware Downloads:

Released 12/02/17

Base Firmware Developed on Arduino V1.8.3 - can download here

Then you'll find that the code does not compile and that's because you need several libraries and the board manager installed. Here's what you need:

First, go to File>>Preferences and add this URL to to the "Additional Boards Manager URL". http://arduino.esp8266.com/versions/2.3.0/package_esp8266com_index.json

BoardManagerURL.png

Now, the ESP8266 boards will be available for installation. Go to Tools>>Board>>Boards Manager... Search for ESP8266, and go ahead and click install. Note, I'm using v2.3.0

ESP8266Install.png

After the boards are installed, you can select any of the ESP8266 boards out there from the Board Selection. For the Pusher board, I have been using the Adafruit Huzzah, here are my settings. Note that I always upload as fast as possible:

Pusher Huzzah Settings.png

Next, you'll need to install the specific Arduino Libraries I'm using in the base code. The first one is is the WiFi Manager by tzapu - the easiest way to install the library is to go to Sketch>>Include Library>>Manage Libraries. Then type in WIFImanager. Go ahead and install the library - note I'm using v0.12.0

WiFiManager.png

Do the same for the Arduino JSON library by Benoit Blanchon - can just search for JSON. I'm using v5.11.1

ArduinoJSON.png

Then that should be it - the other libraries are automatically installed with the ESP8266 board manager.

See the "Testing and Programming" section below for information on loading the code over a wired USB-Serial connection. The other option is to load code wirelessly "OTA - Over the Air". In the "Pusher Board Operation" section this is shown.


Pusher Board Projects

coming soon...

Pusher Projects

coming soon...

Testing and Programming

Note that it may take a few tries to get it to upload, so don't give up if it fails after a few tries.

Also, for development, the USB connector for charging can also power the board - here's an example setup:

PusherDevSetup.png

Version 1

Screen Shot 2017-06-04 at 1.38.08 PM.png

Very first prototype board

  • Mostly through hole components for easy testing and assembly
  • ESP8266 based (ESP-12S module)
  • Wake on regular timer interval - set for 1hr during my testing.
  • Wake on Digital Input - Normally Closed type contact, so works nicely with door sensors.
  • Tested sleep current <1uA that's years and years of battery life.
  • Max Battery Voltage is ~4.2VDC, so designed to be used with standard Lithium Batteries.
  • Note: this board does require re-work in order to exercise all of the functionality. Please watch assembly videos below for detailed information

Here's a quick demo!

Installed on my door for testing:

PusherOnDoor.png

Schematic

PusherV1SCH.png

Purchase

given to Patrons

Parts

Parts list HERE

Assembly

Soldering the board together:

The rework changes:

Battery Voltage Measurement Circuit Change:

Tutorials

Programming and Testing the board:

That Sample Code HERE

Pusher Board Sending Push Notifications with Pushbullet and hardware walkthrough

I'm using Pushbullet for the Notifications:  https://www.pushbullet.com  (~$40/yr for unlimited pushes - 500/mo for free version)
That's nice because you don't need to develop your own app or anything.  Just set up an account with them and you're good to go.  Go to settings, account, and API - generate your token and copy that whole thing into the code - should be something like o.xyz...
THE CODE HERE
Richard's Channel: https://www.youtube.com/channel/UCLgqthbPlZGr8DuHDKKr9EA
And where I found the Pushbullet API code:  https://steve0hh.github.io/2016/12/04/how-to-send-push-notifications-using-esp8266.html
 Update 7/28/17 I did have two instances where the board failed to go back to sleep after wake.  I had to unplug the battery to resolve

And if you're having problems getting the Arduino IDE setup, check out this video:

The .json url  HERE

Version 2

PusherV2gerb.png

Changes to V2:

  • Fixed up the issues from V1 - mostly the circuit to pulse-wake the board
  • Added in support for Normally Open style contacts, so now with an on-board switch, the board can either be woken up from a contact closing or opening.
  • JST connectors for battery and sensor input - can use these

Schematic

PusherV2sch.png

Parts

Parts list HERE

Assembly

Soldering the board is pretty much the same as V1.

The Q4 Rework Change:

Version 3

PusherV3front.png PusherV3back.png

  • Miniaturized version - all surface mount components
  • Dimensions only 0.8" x 1.6 " (20.32mm x 40.64mm)
  • Optimized circuit design from V2
  • Battery Charging on board via MicroUSB connector

Schematic

PusherV3schemo.png

Parts

Parts list HERE

Ordering Stencils Tutorial
Ordering Parts Tutorial

Assembly

Since this board is all surface mount - a top paste stencil is recommended. HERE is the file to get this made.

I usually get my stainless stencils from Electrodragon, but you can go with PCBway or you could even get a plastic stencil from Pololu. I would only recommend a stainless stencil for this job though.

Before you take start the assembly, check this video out I made a while back

Tools I use:

Soldering Station Hakko FX888D and I like a these tips
Hot Air Station here: https://www.amazon.com/gp/product/B00ITMPQS2/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1
Solder Paste: SMD291SNL10 (I keep mine refrigerated when not in use, then sit out for an hour or so before I need it)
https://www.digikey.com/product-detail/en/chip-quik-inc/SMD291SNL10/SMD291SNL10-ND/2057272
Get a decent Loupe
Quality tweezers
And some good Flux

This board is so tiny and dense that I couldn't place the silk screen designators, so here's where all of the parts go:

PusherV3topASSY.png PusherV3botASSY.png

Full Assembly Video:

Programming

Pusher V3 Sample