Software apps and online services
Hand tools and fabrication machines
A friend of mine will be going out of town for a while and needs me to watch his house. It occurred to me that it would be very useful to be able to monitor the temperature in his place as well as knowing if someone else had visited (or broken in).
I wired up the Photon that I ordered from the free store last month to an old DH11 temperature and humidity sensor and then added a PIR sensor. I used a Photon instead of an ESP8266 because the Photon lets me reprogram without actually being near the device. I can adjust it from the other side of town.
In order for the PIR to work, I had to wire it to the voltage input on the Photon (USB 5v) instead of the 3.3v output on the Photon. I also needed to put a 4.7k resistor from the data line to ground on the PIR sensor.
Schematic and code can be found below.
Then I set up IFTTT on my iPhone. The recipes are very simple. If <particle> then <notify>. I exposed Cloud variables from within the code and set the IFTTT recipe to monitor them and then alert on particular values.
I alert on Temperature greater than 80 or less than 40.
I alert on Humidity greater than 80
I alert on Motion greater than 2000.
I'm fairly sure that if you wanted to build one of these you could set the PIR sensor up on a digital line and get it to work. I used analog just because it was more interesting to look at.
If you look in one of the pictures you'll notice some deformation of the temperature sensor. That is what happened when I tested with a hot air gun that apparently had a bit too much "hot" and not enough "air." I recommend a different method of testing.
At one point I needed to test out the PIR sensor to get it to work. The two pots on the top are for sensitivity and for trigger time. I found it difficult to get those right until I wired it to the Oscilloscope.
Once wired up it was easy to look at the trace and understand what was going on. I hooked up the probe to the data line and to ground.
After I got the trace going, it was easy to adjust the trim pots to the proper sensitivity and trigger time. The Adafruit learning page on PIR sensors was extremely helpful here and I recommend you read it if you want to replicate this project.
Using IFTTT is just a matter of linking your particle and IFTTT accounts which was very self explanatory when I logged into IFTTT the first time.
It's a very simple method of having a bit of remote monitoring somewhere else.