Cat Exorcisor

Posted on 26/09/2012 by ollyr
Modified on: 13/09/2018
Project
Press to mark as completed
Introduction
This is an automatic import from our previous community platform. Some things can look imperfect.

If you are the original author, please access your User Control Panel and update it.

I bought a pair of PIR detectors 'tother week, however have been pretty busy recently. This afternoon i got them on board! So the PIR sensors are mounted on a box, pointing at 90degrees to each other. They are effectivley covering a "left quadrent" and a "right quadrent". i have arranged the code so that if the Left PIR sensor is activated, the Horizontal constrains are rewritten as "centre, to "rightmost limit". If the Right PIR sensor is activated, the constraints are rewritten at "centre, to left-most" So ...


Cat Exorcisor

I bought a pair of PIR detectors 'tother week, however have been pretty busy recently.

This afternoon i got them on board!

So the PIR sensors are mounted on a box, pointing at 90degrees to each other. They are effectivley covering a "left quadrent" and a "right quadrent".

i have arranged the code so that if the Left PIR sensor is activated, the Horizontal constrains are rewritten as "centre, to "rightmost limit". If the Right PIR sensor is activated, the constraints are rewritten at "centre, to left-most"

So in summary, the laser now wiggles in one of two boxes, one on the left or one on the right: the one the cat ISNT in.

it works with me wandering around the room, so now i need to go and find a cat.....

 

(im quite tempted to solder this project up on veroboard as a "shield" :) im pretty pleased with it.

though if i soldered it up, i wouldnt be able to "add features" as easily anymore)

 

**************** ^ ^ Update ^ ^ ******************

Having run the batteries down on a cheapo laser pen, i decided to break it up and pinch the laser diode. The cat LOVES (Hates) it.

So i took a Model sized servo, and onto the Arm, glued a mini servo, which i got with my Oomlout ARDX kit. Onto the mini servos arm, i attatched the Laser LED.

Now i have a two axis pointer thingy! It has gone through many itterations, and ive learnt alot! starting off just getting it to move! moving onto:

  • "random" movement
  • variable speed movement (rather than as fast as the servo can)
  • adding "constraints" to the motion within the program
  • referenceing potentiometer values for the constrains
  • adding an Xbox thumbstick controller to move the pointer

  • modifying the thumbstick code, so that rather than returning to centre upon stick release, it stays where it is (like a FPS game)
  • Toggle between two modes using button (thumbstick) press

and finally!

Now it starts at centre, static. Clicking the stick toggles to "constrain mode (1)". In this mode, you draw a box (using the thumb stick), and then clicking the stick, returns it to "random movement cat annoyance mode (0)", which makes random movements, at random speeds with random delays, while staying within the constrains defined in mode 1.

I reccomend this as a good beginner project, as getting it going is easy, but every addition makes it more and more complex!

also, unlike the rover, it doesnt require any batteries to be constantly charged and recharged, or space to drive around on.

Exorcises our Cat

  • Actuators / output devices: 2 servos, led's, red laser
  • Control method: Random, manual calibration
  • CPU: arduino uno
  • Power source: 9v battery, USB power for Arduino
  • Programming language: Arduino C++
  • Target environment: desktop
LikedLike this to see more

Spread the word

Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post