LaserChase
A smart cat laser toy with manual or automatic movement patterns.
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
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:
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W | Main microcontroller | 40 RON |
2x SG90 Servo Motors | Control the X/Y angle of the laser | 24 RON |
Joystick Shield V1.A | Manual control of laser | 20 RON |
DC-DC Step Down Module | Voltage regulation to 5V | 13 RON |
9V Battery + Holder | Power source | 10.3 RON |
Wires | Connections between components | 8 RON |
Breadboard | Circuit prototyping | 4.5 RON |
Micro USB Cable | Power and programming cable | 4 RON |
Laser Pointer | Red colored laser | 2.6 RON |
Header Pins | Connection to breadboard | 2 RON |
Software
Library | Description | Usage |
---|---|---|
embassy | Embassy | An asynchronous executor and Hardware Abstraction Layer (HAL) designed for constructing embedded applications in Rust |
embassy-executor | Embassy Executor | Used for task scheduling and asynchronous programming |
embassy-rp | Embassy RP | Used for initializing and interacting with peripherals |
gpio | GPIO | Used for interacting with GPIO pins |
rand | Random number generation | For automatic/random movement logic |