'The Force is what gives a Jedi his power. It's an energy field created by all living things. It surrounds us, and penetrates us.'
How could we really feel the force? What really is the force?
The force lies within us, we have to identify it. The initial idea was to use combination of sensor for determining the force. I tried using IR temperature sensor(TMP006) along with an PIR sensor for the required operation. The device thus made will monitor the environment around and notify using vibration or audio when it detects any living being.
The short range operation of IR temperature sensor lead to designing of the system using PIR sensor alone which essentially could equated to motion detection/ human presence detection.
What it does?It detects the motion or essentially the 'Force' and results in vibration and audio notification (on your smartphone).
How?A passive infrared sensor (PIR sensor) measures infrared (IR) light radiating from objects in its field of view which could be equated to the force. The force detected is conveyed to particle cloud through photon.
1. Connect the PIR sensor to Particle Photon as in schematic
Note: You can use any pins that are suitable according to your specific PIR sensor (for making a neat connection using the connector that was available with I used pin D0 for Vcc(3.3V), D2 as Gnd and D1 as Digital input to read sensor Output)
2. Testing and setting PIR sensitivity: Testing of PIR is required to ascertain that it is functioning properly as number of PIR sensor are available in market with different specification and modes.
The PIR sensor used has two pots to control :
1 : Delay time adjustment
2: Sensitivity
**This project used a medium sensitivity for detecting upto 6-7 feet and very low delay time.
Still confused about how PIR works and setting it up, check this Adafruit tutorial.
3. Flash the photon code for Particle App using Particle build
4. Configuring to receive push notification using Pushbullet
Sign up on Pushbullet and get Access token (dont share your Pushbullet Access Token it is unique for your account) from setting page
Create your own channel (Channels are push notifications feeds that can be subscribed to. Anything you push to a channel will instantly go to all of the channel's subscribers. Only the owner of a channel can push to it.) Download Pushbullet App to your smartphone or even your PC/Mac.
5. Configuring the webhook in the Particle cloud
Webhooks can be configured using the Particle CLI. You can install the Particle CLI for using the particle cloud following the instructions here.
Create a Java script - webhook.json using any editor(I am using Particle dev based on Atom)
Once you have installed Particle CLI and created the java script, open a console and type:
particle webhook create webhook.json
The output of that command would look like this if it is configured successfully:
Using settings from the file webhook.jsonSending webhook request { uri: 'https://api.particle.io/v1/webhooks',method: 'POST',json:{ eventName: t',.................Successfully created webhook with ID..............
5. Power the photon -
Powering the photon setup using power bank doesn't works for a considerable time period(I used 10400 mAH PNY BE-740 which was able to run setup for 10-20 minutes but had multiple issues with PIR functioning).
Instead using a 3.7V Li-Po/ Li-ion battery input direct to Vin works better. The best solution is to use power shield by Particle
5. Get ready to feel the force!
If everything is perfect when someone walk nears the setup you would receive a push notification
So, next time you friend walks in your room and you can feel his force and say
Or if it doesn't works (PIR sensor might have some calibration problems in long run and sometimes it might not work great), you can choose the dark side and definitely be like
At last,
Comments