Thursday, March 24, 2016

34: A Real Installation -- Practical matters

Some things I've learned since I first installed a Photon system in My granddaughter's 100' x 30' hoop house last summer:

1. The environment is tough. The temperature swing in a single day can be over 50F. Humidity often approaches 100%. UV attacks plastic, e.g.: the heat-shrink tubing over the wire splices.

2. I have wire runs over 70'. I've learned to use only stranded wire: solid conductor can break -- and it has.

3. I used a single Photon ($19) in the hoop. It's backed by a Raspberry Pi 100 miles away. Attached to the Photon are 3 temperature sensors, 2 soil moisture sensors, plus switches for an outside deer fence and irrigation valves: about $90. But the wiring cost more. I should have used multiple Photons and shorter cable runs. More complicated programming, simpler/cheaper cabling.

The Photon has been reliable. Not the rest. For my initial cabling I ran two Cat5 8-conductor cables (solid copper) to the middle of the hoop house and spliced (solder/heat-shrink/non-conductive caulk) 2 or 3 wire cables to the sensors.  That failed -- not always hard failed, some intermittent. Been replaced with straight (unspliced, more expensive) runs.

Tuesday, March 22, 2016

33: Computer Farming

If you've followed my blogs you'll know that I involved myself in the Raspberry Pi and Arduino initially help grandchildren who insist on farming. See my post 2

I've recently come across the dirtless farming work done at MIT. See--

http://openag.media.mit.edu/

and

http://www.ted.com/talks/caleb_harper_this_computer_will_grow_your_food_in_the_future?utm_source=tedcomshare&utm_medium=email&utm_campaign=tedspread

The MIT system is open source so I visited their github site and downloaded the source code. Interesting. There's a bit of overlap with my much more modest setup. I haven't finished snooping, but it appears that I have used the same sensors as they have -- temperature, humidity, soil temperature, soil moisture, irrigation switching. For testing, I have also programmed a CO2 gas sensor and photo sensor. They also have code for a pH sensor. I've been thinking about that one. There's a big range of prices.

Their system utilizes Arduino Megas and a Raspberry Pi. My system uses Particle.io Photons and a Raspberry Pi. Note: the Photon is as powerful as a Mega. Because of the Photon's "cloud" my Pi is 100 miles away.

Anyway. Their setup is worth studying.

Sunday, March 6, 2016

32: Particle.io Update

My current Particle position is: 1 Core, 5 Photons and as of yesterday, 1 Electron.

nice packaging

I didn't order during their Kickstarter campaign but right after. Today, I went to https://setup.particle.io to get started. Authorizing the SIM card seemed to go fine. My first problem was trying to connect the cell service antenna. Very tiny plug, very difficult, especially with trifocals. Finally seemed to work -- don't know how.


Left to right: USB power cable, battery, Electron, wifi connector (taped down 'cause I don't want to have to do it again), antenna wire and antenna.

Second problem: My phone shows AT&T 2 or 3 bars (probably 4G, but probably 3G as well). But as in above image, the Electron doesn't connect. The green LED just blinks.

Tuesday, January 26, 2016

31: Peltier Cool/Warm Device Experiment

See my discussion on my Raspberry Pi blog: http://dicks-raspberry-pi.blogspot.com (post 94).

I'm interested in comments about wiring the switch.

Monday, December 21, 2015

30: "Smart Home," "Internet of Things," Blah, Blah

Cnet has equipped a house as a demo Smart Home. I recently read their bit about protecting the house from water main flooding. Their article mentioned a wifi-enabled solenoid valve which could be used shut off the input supply. The suggested device was listed as $400. That figure got my attention.

Last summer, I installed a Particle Photon-based system for my granddaughter's demonstration farm. The setup includes 2 soil moisture sensors and a solenoid-operated water valve. I initially installed a 1/2" plastic valve for irrigating the 100' x 30' hoop house. That turned out to be too small so I changed it for a brass 3/4" model.

Anyway, here's my version of how to protect a home from water damage caused by a pipe breaking, water heater leak, etc. Note: Wifi and Internet are assumed in all cases.

Cnet's device--

1. Wifi-enabled solenoid water valve, 1": $400
2. Pipe adapters: $30
3. Plummer to cut it into main service pipe: $150?
4. Wifi-enabled water sensor: $50?
5. Power supplies: 5v: $5, 12v: $15?
6. Controller for house: ?
Total: $650+

My way (version 1)--
1. Solenoid water valve 1": $40
2. Pipe adapters: $30
3. Plummer: $150
4. Water sensors: $5
5. Power supplies: 5v: $5, 12v: $15?
6. Particle Photon controller: $20
Total: $250

My way (version 2)--
1. Stepper motor to rotate existing house turn off valve 90 degrees: $40
2. Motor mounting bracket + 2 limit switches: $20
3. Plummer: (not needed)
4. Water sensors: $5
5. Power supplies: 5v: $5, 12v: $15?
6. Particle Photon controller: $20
Total: $110

Sunday, December 13, 2015

29: Portable Sensors

I have ideas for several of these. The one I'm building just now will provide temperature, humidity,  dew point and soil moisture readings from a flashlight-sized device. Here's the breadboard mess:


And this is my crude wooden enclosure (soil probe not shown):


I'm using an Arduino Nano and a DHT22 temperature/humidity sensor (etc.). The readout is to a 4 digit 7-segment LED. Power from a 9-volt battery. The cheap 4-digit LED takes all of the digital pins 2 through 12. So I have just one left for the DHT (unless I use TX and RX which leads to problems). The moisture probe uses analog, luckily.

My Sketch displays each reading for a second at a time, as in-- "F 74", "h 39", d 42", "S 11" (I can fudge those 4 letters in 7 segments).

I'd really like to find a source for enclosures so I don't have to waste time building crappy ones of my own. Any suggestions?
28: More About Secure Wires

Way back in my Raspberry Pi blog (http://dicks-raspberry-pi.blogspot.com) post 59 I discussed "Bare Conductive Electric Paint." I had hoped to be able to draw circuits on paper with the stuff. Well, not quite. But it was a sort of conductive glue (slow drying, not very strong).


Anyway, the stuff has stiffened up in the tube to where it won't come out the narrow spout anymore, but now I have a new use: sticking breadboard wires M-to-F or M-to-breadboard. Just dip the wire (M) end in the "paint" and insert as usual. And after 20 minutes the connection will be pretty secure AND the contact will be good. Also, since the glue isn't too strong, you can get it out if you need to make a change.

Note that wisely, most glue is insulating, not conductive -- probably a good idea.