New Monitoring System: easier, wireless, more reliable

Now we’re getting somewhere!  My previous networked temperature monitoring systems were a little buggy.  My first temperature monitor had its cable chewed up by a rodent and needed to be reset frequently.  My second prototype failed on restart, making it problematic in low-power situations (a known issue for the Arduino’s Ethernet Shield), and eventually the probe itself succumbed to moisture because of a failed seal.
My new system relies on serial communication between an Arduino and a Motorola C168i cell phone, bridging data to Pachube through Twitter, and sending an e-mail to my server as a backup.  I really like this setup because it is reliable, cheap, and deployable in far more locations than ethernet or WiFi would allow.  I picked up a C168i at Goodwill for 10 dollars (and another on E-bay for $12) and it costs me $5 a month to add to my T-Mobile plan.  The system runs off a single 6-volt source, and I’m currently piecing together a solar/battery system to go completely wireless.

Weather-proof housings:
I picked up a $6 5-quart dry bag from my local sports store, and am using that to house my arduino and cell phone.  It rolls down on the cables, and is a great solution to the weather-proofing electrical connections. My sensors are connected through 1/8″ mini stereo jacks, because they’re ubiquitous.  Tear them off of any broken set of headphones.

Rather than crimping the PEX tubing housing my sensor string, I’ve switched to screwing in 1/2” pneumatic fittings with some teflon tape. The stabbing end is filled with epoxy, and the cable end is sealed with several layers of shrink-wrap tubing and high-temp hot glue.

Code, and notes on communicating with a C168i:
The C168i has a wonderful feature that aught to be on all cell phones- you can talk TTL to the audio jack!  It is presumed that internally the phone is a G-24 Lite GSM Module, and G-24 commands work on the C168i.  On the forums there are some comments about sudden communication failures and dead phones.  I think I’ve pinpointed the problem- The G-24 operates between 3.3V and 4.2V, and most USB devices, (including the Arduino) run at 4.6-5V.  The phone is obviously running hot- when you plug a USB-mounted arduino directly into the C168i its screen brightness jumps and flickers. I knocked the voltage down to 3.7V by placing four 1N4007 rectifier diodes (two pairs of two , one facing each way) on each of the communication lines (RX & TX).  I know it’s inefficient, but it’s quick, and only for when the system is being programmed/debugged.

Like this:



In the fielded system I removed the diodes and just run the power source at 6V, at which point the Arduino communicates at 4.1V.

Arduino code here
You will need SSerial2Mobile Library, New Soft Serial Library, Dallas Temp Library, and OneWire Library.

Leave a Reply

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WP Hashcash

Emergency Sanitation Workshop This Saturday

We'll be doing a 45 minute workshop on Saturday June 2nd @ 2pm at King Elementary School as part of Resilience
Cloacina Project's items Go to Cloacina Project's photostream