Posted on Leave a comment

IR Remote Controlled Laser Cat Toy

IR Cat Toy

The IR Remote Controlled Laser Cat Toy is now complete. 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.

Wiring Schematics:

Arduino Project source code:

#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();
  }
}

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.

For the full parts list please visit my project on Arduino’s Project Hub:
https://create.arduino.cc/projecthub/woodwarddigital/ir-control-laser-cat-toy-de65e6

Please contact me if you have any comments or suggestions: [email protected]

Posted on Leave a comment

Arduino – Elegoo Starter kit

Arduino Digital Thermometer

Arduino is an open-source electronics platform. It is a perfect way to make an introduction to electronics and coding, a good way to get started is with a starter kit like the Elegoo Starter kit contains everything you need.

You might think that there is just one type of Arduino broad. No, there are tons the choice can be overwhelming, an official branded board currently costs around £23. With Arduino being an open-source electronics platform, they make their PCB designs freely available, so it is possible to get a generic Arduino board for much less.

I choose the ELEGOO UNO R3 Project Super Starter Kit as a good all-around kit at a low price, it has everything you need to get started and is great for beginners young and old who are interested.

Amazon Affiliate Link (Paid) – ELEGOO UNO R3 Project Super Starter Kit: https://amzn.to/2QUPxKt

ELEGOO UNO R3 Project Super Starter Kit

The included instructions and tutorials which are included on the disk are also available to download, by visiting: https://www.elegoo.com/pages/arduino-kits-support-files

Before you get started you will also need to install the Arduino IDE which is available for Windows, Mac or Linux. Arduino IDE Download: https://www.arduino.cc/en/software

You will quickly find yourself with a good understanding of the basics of electronics and coding by experimenting with an Arduino.

Arduino Digital thermometer
Digital thermometer
Joystick controlled servo motor
Joystick controlled servo motor

As this kit contains a wide variety of components, you can browse the Arduino Project Hub for more ideas and free tutorials.

Arduino Project Hub: https://create.arduino.cc/projecthub