Project tutorial
IR Control Laser Cat Toy

IR Control Laser Cat Toy © MIT

Laser Cat Toy, is this idea sold on you yet?

  • 106 views
  • 0 comments
  • 0 respects

Components and supplies

Necessary tools and machines

Hy gluegun
Hot glue gun (generic)

Apps and online services

About this project

I used an Arduino Uno, IR remote, IR receiver, Laser Diode and two servos to create an IR remote controlled laser cat toy.

WARNING!Lasers can cause permanent eye damage, ensure that you follow these safety measures:Only use a low-Wattage laser i.e. 5mw or less.Never shine a laser at a reflective surface.Never shine a laser in to anyone's eyes i.e. Cats, Dogs, Jedi's, Humans etc.

Don't forget, cats can get easily frustrated when playing with a Laser as they can not actually catch it. Make sure you switch over to a toy they can catch.

Wiring Schematics:

For more info please visit:

https://woodward.digital/ir-remote-controlled-laser-cat-toy

Code

IR Controlled Laser Cat ToyArduino
Configure Values for IR Remote and upload to your Arduino.
#include <IRremote.h>
#include <Servo.h>
int IRPin = 11;
const int ServoXPin = 9;
const int ServoYPin = 10;

int XValue;
int YValue;
int X_Pos = 90;
int Y_Pos = 90;

IRrecv irrecv(IRPin);
decode_results results;
Servo ServoX;
Servo ServoY;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn();
  ServoX.attach(ServoXPin);
  ServoY.attach(ServoYPin);
  ServoX.write(X_Pos);
  ServoY.write(Y_Pos);
}
void loop()
{
  if (irrecv.decode(&results))
  {
    int value = results.value;
    Serial.println(value);
    switch (value)
    {
      case 25245: //Keypad button "Vol +"
        Serial.println("Move Up");
        Y_Pos = Y_Pos - 15;
        ServoY.write(Y_Pos);
    }
    switch (value)
    {
      case -22441: //Keypad button "Vol -"
        Serial.println("Move Down");
        Y_Pos = Y_Pos + 15;
        ServoY.write(Y_Pos);
    }
    switch (value)
    {
      case 8925: //Keypad button "Pre Track"
        Serial.println("Move Left");
        X_Pos = X_Pos + 15;
        ServoX.write(X_Pos);
    }
    switch (value)
    {
      case -15811: //Keypad button "Next Track"
        Serial.println("Move Right");
        X_Pos = X_Pos - 15;
        ServoX.write(X_Pos);
    }
    irrecv.resume();
  }
}

Schematics

Wiring Diagram
Wiring Diagram
ir_controlled_laser_cat_toy_-_diagram_BSsvOpcJtJ.fzz

Comments

Similar projects you might like

LazerDazer: Arduino Laser Cat Toy

Project tutorial by RobotGeek Projects Team

  • 12,339 views
  • 1 comment
  • 27 respects

How to Make a Laser Turret for Your Cat

Project tutorial by MisterBotBreak

  • 17,716 views
  • 5 comments
  • 40 respects

Remote Controlled Pet Feeder

Project tutorial by Amal Mathew

  • 17,089 views
  • 6 comments
  • 53 respects

Arduino Cat laser toy DIY

Project tutorial by Seafox_C

  • 3,014 views
  • 1 comment
  • 8 respects

Servo Motor Control with Remote

Project showcase by Alfa

  • 30,078 views
  • 5 comments
  • 44 respects
Add projectSign up / Login