Friday, December 31, 2010

Hydrogen Peroxide in a Spray Bottle, and Coop door updates...

You know, I give Walmart shit as much as the next guy, but they have something I haven't seen anywhere else:  Hydrogen Peroxide in a little spray bottle.  *Ding!*  Somebody gets it.  It's perfect.  can't tell ya how many times I've dumped a tablespoon of the stuff from a bottle right *next* to the cut.  Some in the cap is about the best it gets with just a bottle.  But a spray-bottle.  Boom, direct application, one can even use the spray pressure to force the peroxide into the nooks and crannies a bit, it's sterile for the most part, and it's ready to go at a moment's notice.

As previously noted, the cold weather was affecting the coop door motor/battery performance.   Because I time the motor acceleration and deceleration to avoid slamming the stops, when the weather was cold, the motor would decelerate stall out before hitting the top stop.

As previously mentioned in the blog, and because the coop-door project is all about wanton overkill, I added a TI TMP75 temperature sensor to the controller's i2c bus and am modifying the door timings based on the outside air temperature.  This has solved the problem for the moment, and as an added benefit, I get temperature I can display on the coop status page.  The new door material is excellent, although one could deduce the workings through the now-translucent door.  We haven't seen much in the way of raccoons out here so far though.  Knock on wood.

The status LED was neat for Halloween when it had the throbbing bloodshot-eyeball on it, but the eyeball eventually fell off.  The  LED, though fun and colorful, is really bright by itself.  So I came up withe some different blink patterns as well as an OFF setting and added "LEDMode" button to the page.  I'm all about configurability whenever possible.

The next task I'm working on is the sunrise/sunset time offset for the door.  Though I can manually set the open/close times for the coop door, the chickens appear to be programmed to respond to apparent dusk, taking weather .

Also made some circuit boards for prototyping, including a "chronodot"  DS3231 breakout board.

Another related project I made a few boards for is a bi-directional current shunt and voltage monitor sensor so I can monitor battery charge and discharge in real-time.  This is going well so far.  I have near perfect voltage reading with a 0.1% tolerance 1K/9K voltage divider.  My current reading is with an INA169 High-side current shunt monitor chip.  Here, I've had a few design changes.  I was going to go with the bidirectional circuit shown in the datasheet, but the diode voltage drop meant that I wouldn't get any current readings below about 100-200 milliamps or so.  Not good.  Then I realized I could just use two analog inputs and let the MCU determine direction based on which pin is rising in voltage.

Also made a bunch of little component breakout boards; SOT23-6, 0804, current-shunt, etc.  The SOT23-6's ought to be really handy because they'll work with any pincount SOT23.

That's all for now!  Stay tuned and have a Happy New Year!

Friday, December 3, 2010

Coop Updates...

Plywood Warpage:
When I started the coop project, I went with plywood - partly because I had a scrap piece that fit perfectly.  I had built in plenty of clearance for wood swelling.  Unfortunately, in addition to swelling a wee bit, after exposure to the elements, the wood released tension in the form of a warp that was too big to shim the door guides around.  I did try to shim with 3/32" rubber, which helped for a while, but ultimately the warp won out.

My advice for the door?  Avoid wood, at least for the door itself.

Fortunately, one can purchase milky-colored plastic cutting boards at various big-box outlets, and I got one that was big enough.  It was a bit thinner, and overall, a bit lighter.  The best thing?  Pretty close to dead-flat.  I could probably find bulk plastic elsewhere at a supply house, but this was convenient.

One crucial note about cutting these boards with the table-saw is to avoid meltdown:  Do it rapidly and deliberately in one solid pass.  The plastic will still get hot enough to melt.  This is just how it is.  The goal is to spread it out evenly by feeding it about as quickly as the saw will take it without bogging.   A strong table-saw and a sharp carbide blade will likely make a huge difference here.  Pre-visualize the cut and remember:  It's a whole lot easier to mind your fingers than it is to mend them.

I had to redo the top stops, but other than that, the the old latch and plexiglass fit nicely onto the new plastic door, which now works great, especially given the temporary timing fixes, which are related to the new-found problem of:

Frigid Temperatures:
The whole West Coast got blasted with arctic air for Thanksgiving.  Our Low was 11.5 F.  Brrrr!
What this meant for the door opener was that the 6v Gel battery really struggles with cold.  I found the door accelerate-decelerate timings (avoids slamming the stops) for warm weather are simply insufficient for cold weather.   The door still winches up just fine, but it does so more slowly.  After multiple open-close cycles, the door begins to operate sufficiently, but that's not how normal operation works, with just a morning opening and an evening closing.  The temporary fix was just to lengthen the door timings, allowing a longer run time before deceleration and subsequent timeout condition if the door stalls on decel before hitting the top stop.

The permanent fix (hopefully):   A Texas Instruments TMP75 I2C temperature sensor.  I'm not thrilled about the less-flexible-for-placement-purposes SOIC-8 packaging, but I2C is my data bus, and I have familiarity with the TMP75 from the Gravitech's nice 7-Segment Shield (which you'll see used in my temperature monitor project writeup soon).

As of now, the code has been written, the sensor has been prototyped and tested on an external Seeeduino, and I'm about ready to install the sensor into the drill.  I'll most likely deadbug and greenwire the TMP75 onto the Seeeduino board.   Within the door-controller, the code defines two ranges of operational timings, from hot, ie: fast-times to cold, ie: slow times,  interpolating proportionally between them depending on the temperature reading at the actual time of operation.

One nice thing about all this, is that I wanted a temperature sensor anyway that the BlackWidow WiFi board could access, to report on the the coop temperature and maybe eventually trigger a heater or whatever.  With the devices sharing the I2C bus, this should work fine.  Time will tell.  I'll fill this in with pics and updates as I have them.