Landing : Athabascau University
  • Blogs
  • SIK Guide v4.0a - Project 3C: Motion Sensor

SIK Guide v4.0a - Project 3C: Motion Sensor

 

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:

SIK v4.0a - Project 3C Motion Sensor

Ultrasonic motion sensor with adjust values:

SIK v4.0a - Project 3C Motion Sensor (altered 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.