Saturday, September 19, 2015

89: I Installed a LIVE System!
(after 2+ years of messing around)
-- Revised below 10/11/15 --

Until recently, I have assumed that when it came to installing a real life system I would base it on a Raspberry Pi. But then the Particle Photon came along. Three weeks ago I installed Particle Photon in my granddaughter's farm hoop house (they used to be called "green houses"). It is programmed to support 2 temperature sensors, 2 soil moisture sensors and it provides control of 2 switched devices: an electrified deer fence and a water valve for drip irrigation. Here's the smartphone web page image:

as of 10pm, September 15

Data comes from my Photon program via Particle's "cloud" interface. The electric fence is normally turned on and off by time-of-day (the cloud provides UNIX-like time functions). But that timing can be overridden by the web page above (password secured).

I originally intended to use a Raspberry Pi but the $19 Photon's simple web interface trumped the Pi's many advantages (especially the mature software development environment).

However, the Pi is not all together out of the picture: a Pi-based cron task checks on the Photon every few minutes and sends text messages if anything has gone wrong. It also accumulates statistics and provides a specialized weather report.

The Photon, sensors, switches and wiring cost under $70. My control program in C++ is about 80 lines long (originally, now expanded to 200 lines).

Does anyone know of a reliable motor setup for safely rolling the sides of the hoop house up and down (to control inside temperature)?

Revision: I've added more information on this setup (answering questions) at --

dicks-Photon-Arduino.blogspot.com

Friday, September 18, 2015

88: Battery Backup, Revised Again

After my failures with the Adafruit Powerboost 1000 I complained at an Adafruit forum. Their responce as  that I should have used a Powerboost 1000C instead. Note the subtly added letter "C". So, gritting my teeth, I paid $19.99 (plus their pricey shipping) and tried again.

has powered a Pi for 3 weeks now

I let this setup run for over 24 hours powering either a Raspberry Pi (drawing .34 amps -- using the post 87 device) or a Particle Photon (drawing 1/8th as much) and both worked fine. I could disconnect external USB without the computers noticing but pulling the battery plug caused both processors to restart. Not nice but not a deal killer.

Note input power LED in the image. If you aimed a photo sensor at it your program could detect external power failure. You would  then have time to send out a text message and shut down "gracefully" -- whatever that means.

Wednesday, September 16, 2015

87: Handy Electrical Gadget 

I got a "Charger Doctor" from Adafruit. Not a very enlightening name but a useful device.

It alternates displaying voltage and amps (a few seconds each). The 7-segment display can make a capital 'A' (main image) but can only manage a lame 'u' for 'V' (insert).


Place your 'Doctor' between the USB source and your device to be measured. The image above shows the usual 5v in plus that my Raspberry Pi B+ with USB wifi dongle uses .32 amps.