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!


Anonymous said...

Hey man, I caught your door video on YouTube last year when I was contemplating some kind of control for my coop door (a drawbridge style door), and I heard you say "seeduino" - and scanned back, listened again ... what? Google... seeduino led me to arduino, and now I am hooked. I have now built a controller from a single BlackWidow board. I built the controller software completely from scratch, using a garage door opener logic system - and while it worked, when I got my BlackWidow the code was very slow and made the web serving function useless - ping ack times were > 1sec.
I then looked to Mark Patel's QPID smoker control app as the core of my controller, and finally got it working solidly last week. Now I have the board syncing it's date/time, and calculating sunrise/sunset. I recently ran into a number of memory related issues and had to really scramble to get the controller to run without crashing the BlackWidow, but it's much better now.
I also scavenged a drill for the task, but as luck would have it the drill I used had a PWM trigger controller built in, so I just wired it with a transistor driver and a relay to reverse, and it is working very well.
I never saw why you were using the Seeduino and BlackWidow. Were you running out of memory?
I am using a Matrix Orbital LK220-25-V display (which is also AVR based) over I2C, and Dallas 1-wire temp sensor - and will be adding a dallas quad A/D converter for things like water level and feed level sensors, while using a minimum of pins. The Matrix Orbital controller has a 5x5 keypad interface, I2C bus, and even Dallas 1-wire support that I can off-load from the BlackWidow, which makes it really versatile.
Fun, fun, fun!
Thanks for the inspiration and ideas - I am standing on your shoulders, and appreciate your posting your ideas.
Brian - bsbrum at gmail dot com

slinky said...

comment test

slinky said...

Well, now that I can comment and not lose fifteen minutes of typing...

Thanks Brian! Glad to be of inspiration, especially to someone who has taken the idea and exceeded my own plans!

As to why the Seeeduino and BlackWidow vs. just the BlackWidow alone, it was primarily because I was running out of I/O inputs on the BlackWidow, given that the WiFi module eats up five pins. I also wanted to make sure that the door was still functional even if the webserver portion of the project wedged.

The other reason is that I do PWM on the motor controller in order to provide a speedy-up-motion and a slow down-motion (don't wanna injure the hens!). Because of this, I need to run a pretty tight loop on the door controller. The WiFi board seems to hog the processor at times, so I didn't want the door motor to keep happily spinning along while the WiFi decided to re-init.

I love your idea of a separate A/D converter for external inputs. I've got a few extra inputs for now, but as I add features, I may yet need more analog inputs.

Even though our two hens have no problem returning to the coop before closing time, when we get new chicks, I'm thinking of ways to auto-train them. One way would be to install a noisy auto-feeder that operates maybe 20 minutes before door close. It would make enough food-related noise that the birds would be attracted back to the henhouse, and then the door would close. Go Pavlov!

Curious, how did you calculate sunrise/sunset?

I found a list of standard times and created a 365-day table of offsets. Since the rise/set offsets are so close, I just used the same offset for both rise and set. (I may shift the lookup by a few days to make up for the small difference).

Thanks again for your encouraging post. I love it when I can be of inspiration to others and they can inspire me back.

Keep up the great work!