I had a lot of fun creating this project from the SIK guide 4.0a (I didn't see a similar project in the v3.3 guide). I didn't actually try using it on my cats but I bet it would've worked like a charm.
The distance sensed by the ultrasonic (US) transmitter / receiver had to be adjusted since there seemed to be a very small window where the LED would turn yellow and at first I had to be extremely close just to set off the servo motor and turn the LED red. I eventually edited the amount that the servo would move in an attempt to make the paper image more animated.
Ultrasonic motion sensor:
Ultrasonic motion sensor with adjust values:
In hindsight I should have added some additional delays in so that the LED wouldn't flicker as much if the distance was right on the edge. Actually a better solution would be to add hysterisis but I couldn't figure out how I would go about doing this. This would have made it so that there wouldn't be such a hard line between each distance (so the LED wouldn't be flickering between yellow and green for example when the US sensor was detecting around 19 to 21 inches in distance). The hysterisis would make it so that if the last LED change was to yellow, there there would be an additional 2 inches or so on either end of the distance limits (in this case it was >10 and <20 inches) so it would have to pass ~22 inches just to turn green. That was somwhat hard to explain but hopefully that makes sense to everyone else reading this. If you have any suggestions please let me know.
The Landing is a social site for Athabasca University staff, students and invited guests. It is a space where they can share, communicate and connect with anyone or everyone.
Unless you are logged in, you will only be able to see the fraction of posts on the site that have been made public. Right now you are not logged in.
If you have an Athabasca University login ID, use your standard username and password to access this site.
We welcome comments on public posts from members of the public. Please note, however, that all comments made on public posts must be moderated by their owners before they become visible on the site. The owner of the post (and no one else) has to do that.
If you want the full range of features and you have a login ID, log in using the links at the top of the page or at https://landing.athabascau.ca/login (logins are secure and encrypted)
Posts made here are the responsibility of their owners and may not reflect the views of Athabasca University.