A light sensor or photocell that detects a change in light

The photo sensor will trigger a motor tied to a pinwheel when a small animal such as a rabbit, beaver or fox approaches it.

The 2nd, 3rd, and 4th items here https://www.sparkfun.com/catalogsearch/result/?q=photo are all decent options to start with

To see how each operates click on the product page and there are links to each’s hookup guide that highlights basic use…you could use most any MCU, but since you are using the signal output to a motor/pinwheel make sure to get an MCU that has PWM output(s)

There are two different optical techniques that use what we could call a photo sensor and good for an intro project. The first would be a beam-break design like used on some elevator doors or overhead garage openers. They’re good for when the area to cover is a well defined line like a doorway threshold. These sensors often employ a reflector of some kind. In industrial applications, the term beam curtain is used for related devices/areas to make sure an operator is clear of a robot or similar. I like the figurative and literal picture it paints.

The other is an area coverage technique usually called Passive Infrared, PIR. Those are for covering an area like the hands-free faucet or grocery freezer. They take a sort of primitive photographic measurement and compare it to the prior measurement. A change in the light measured during this time means something moved. These sensors sometimes have a characteristic white dome, an inch across, here’s one:

PIR sensors are sensitive and can be triggered by, say, wind blown leaves. For OP’s project of, I assume, entertaining beavers with festive pinwheels, a beam 6 inches off the ground
and across the path could detect animals on foot but probably not most flying birds or blowing vegetation.

2 Likes