Arduino Starts

I’ve now got an arduino to start on the automation of the chicken’s door. It’s only been 6 months since I put in the sliding door, and 10 months since they’ve been in the outside coop, so it’s time to do a little hacking.

Day 1, the blink example works.

Day 2, I’ve got a basic light sensor running with a random sensor from American Science and Surplus, a pull up/current limiting resistor, and the analog in ports. Helpfully enough, there’s a pretty simple example to get it all running with very little programming.

Day 3, I’m looking at the sensor levels, and trying to distinguish between dusk and night. The sensor appears to allow between 10ma and 100ma through, at an apparent resistance from to the meter of between 5k and 100 ohms. The trouble is that most of the sensitivity is in the brighter ranges, and the range where I need the resolution is in the 4.5k to 5k range, or in the 10 ma end of current. (it’s not a simple resistor, so simple approaches aren’t goign to necessarily be correct)

Using a simple voltage divider isn’t going to give me a whole lot of resolution in this range, so I may need to look at some sort of amplifier circuit (either op amp or transistor) and clip or compress the bright end of the spectrum. With one 220 resistor as the limiter, I’m seeing about 3v over the sensor at indoor night light levels, and slightly more (.1v) when covered. If I lower the resistance to 110, I’m seeing more like 3.6v across the sensor.

The basic design I’m thinking of is that if we see ‘dark’ for 15 minutes or so, I’m going to close the chicken door, and if I see ‘light’ (or increasing light) for a similar time, I’ll let it open. Thresholds and delays are TBD, since it’s going to depend on bright moons, dark rainy days, and other weather related light level issues. Also chickens. I suspect that the microcontroller has a larger brain than most of the chickens.

Other observations — I’m probably going to want another one, and probably a mini instead of an uno, so I can just drop it into a breadboard instead of using the wire sockets. On the other hand, the motor shields and comm sheids work better with the original form factor. I’m probably going to want another one to play with for lego or r/c car robotics. Or two.

No comments

No comments yet. Be the first.

Leave a reply

You must be logged in to post a comment.