Skip to main content
Version: ACS CC

LaserChase

A smart cat laser toy with manual or automatic movement patterns.

info

Author: Ghiță Alexandru
GitHub Project Link: GitHub

Description

LaserChase is a smart, interactive laser toy for cats, powered by a Raspberry Pi Pico 2W. The laser is mounted on two servo motors that allow it to move across two axes, with the capability to be turned on and off by pressing the joystick. It can operate in automatic mode - following random or pre-programmed motion patterns - or in manual mode, controlled by the joystick. Mode and pattern switching is done via button presses, making the experience more dynamic and engaging. The goal is to mimic the unpredictable movement of real prey, keeping your cat entertained and active.

Motivation

I wanted to create something practical and enjoyable for use at home. As a cat owner, I thought this project would be a perfect blend of utility and fun-bringing joy to my pet while allowing me to experiment with hardware and software in an engaging way. Building LaserChase has given me the opportunity to explore electronics, real-time control, and embedded programming, all while making my cat happy.

Architecture

Architecture

The main software components of the project include:

  • Control Module: Handles manual input from a joystick and button presses to switch modes and patterns.
  • Mode Manager: Keeps track of the current operating mode and interprets input accordingly.
  • Movement Generator: Generates movement signals, either random/predetermined (automatic mode) or from joystick (manual mode).
  • Servo Driver: Sends PWM signals to the two servo motors to move the laser pointer.
  • Laser Pointer Control: Interfaces with hardware to manage the laser's power state (ON/OFF).

These components interact as follows:

  • Input (buttons/joystick) -> Control Module -> Mode Manager -> Movement Generator -> Servo Driver -> Laser

Log

Week 5 - 11 May

TODO

Week 12 - 18 May

TODO

Week 19 - 25 May

TODO

Hardware

  • Raspberry Pi Pico 2W: LaserChase uses a Raspberry Pi Pico 2W as the main controller.
  • SG90 Servo (x2) + Laser Pointer: Two SG90 servos are used to move the laser pointer on two axes.
  • Joystick Shield: Control is done via a joystick shield and mode switching through push buttons.
  • 9V Battery + Holder + DC-DC Step Down Module: Power is supplied through a 9V battery regulated by a step-down module.
  • Breadboard + Wires: Components are connected using wires and a breadboard.

Schematics

Here is presented the KiCad schematic: KiCad

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2WMain microcontroller40 RON
2x SG90 Servo MotorsControl the X/Y angle of the laser24 RON
Joystick Shield V1.AManual control of laser20 RON
DC-DC Step Down ModuleVoltage regulation to 5V13 RON
9V Battery + HolderPower source10.3 RON
WiresConnections between components8 RON
BreadboardCircuit prototyping4.5 RON
Micro USB CablePower and programming cable4 RON
Laser PointerRed colored laser2.6 RON
Header PinsConnection to breadboard2 RON

Software

LibraryDescriptionUsage
embassyEmbassyAn asynchronous executor and Hardware Abstraction Layer (HAL) designed for constructing embedded applications in Rust
embassy-executorEmbassy ExecutorUsed for task scheduling and asynchronous programming
embassy-rpEmbassy RPUsed for initializing and interacting with peripherals
gpioGPIOUsed for interacting with GPIO pins
randRandom number generationFor automatic/random movement logic
  1. Similar project
  2. Controlling SG90 with PWM in Rust
  3. SG90 2-axis 3D print design