Grumpy Cat

by ifaj_h in Circuits > Arduino

115 Views, 0 Favorites, 0 Comments

Grumpy Cat

Grumpy Cat

This project is a moody robotic cat that reacts to how you pet it. Pet it wrong, rush it, or annoy it too long, and it hisses in protest. Stroke it gently and in rhythm, it stays calm, wagging its tail with bright green eyes, and then hisses in protest. There is no winning with this cat. It is one grumpy cat.

The system uses an Arduino to read sensor input and control the outputs. An ultrasonic distance sensor measures the position of the user’s hand above the surface, allowing the program to detect the motion of a petting stroke across a defined distance range. A pressure plate confirms that the user is actually touching the object, so only intentional strokes are counted. The servo motor drives the tail, which continuously sways back and forth during idle. The timing of this motion sets the rhythm the user is hinted at to follow while petting. The LED eyes communicate the creature’s state, appearing green when calm and turning red when irritated. If strokes are off-beat or inconsistent, or if the interaction continues too long, the system triggers a response: the tail stops, the eyes turn red, and a buzzer emits a short hiss before the system resets to idle. At the start of each new interaction cycle, the system randomly rerolls the tail-sway speed and the allowed interaction duration, so the expected rhythm and tolerance for petting change slightly each time.


Supplies

Core Electronics

  1. Arduino board (Uno / Nano / similar)
  2. Ultrasonic distance sensor (HC-SR04)
  3. Used to detect hand position during strokes
  4. Servo motor (micro servo, e.g., SG90)
  5. Drives the tail motion
  6. Piezo buzzer
  7. Produces the hiss sound
  8. Pressure plate, homemade from tinfoil
  9. Detects when the user is actually pressing the cat

Lighting

  1. 2 × Green LEDs (eyes)
  2. 2 × Red LEDs (eyes)
  3. 4 × current-limiting resistors (≈220–330 Ω)
  4. One for each LED

Wiring / Breadboard

  1. Breadboard
  2. Jumper wires (male–male and male-female)

Power

  1. USB power from Arduino
  2. or
  3. External 5V supply

Materials

  1. Cardboard
  2. Hot glue

Tools

  1. Hot glue gun
  2. lasercutter

Laser Cut

lasercut.png

Cut the parts from a sheet of cardboard using your laser cutter. After, remove all pieces from the sheet and keep them organized for assembly.

The Head

cat head.png

Use the laser-cut pieces for the head and slot them together to form the box structure shown. Secure the joints with hot glue.

Insert the LED eyes and buzzer into the holes on the front face, and mount the ultrasonic distance sensor (UDS) inside the head so it faces toward the back of the cat.

The Back

cats back.png
stroke.png

Create the pressure plate using two small cardboard plates. Cover the inside faces of both plates with tinfoil and attach a wire to each foil surface. When the two foil surfaces touch, the circuit closes and the Arduino detects a press.

To assemble it, glue one edge of the plates together while holding them slightly open. This creates a simple hinge. Once the glue cools, its slight flexibility allows the plates to compress when pressed, letting the foil surfaces touch and complete the circuit.

The Tail

cat tail.png

Place the servo motor between the cardboard layers in the tail mount so it is tightly sandwiched in place. The layered cardboard pieces hold the servo securely without additional hardware.

Attach the tail piece to the servo arm so it moves when the servo rotates. Once installed, the servo will drive the tail’s swaying motion during operation.

The Body

cats body.png

Slot the laser-cut cardboard panels together to form the body structure.

Place the Arduino on the bottom layer of the body and the breadboard on the top layer. The layered structure keeps the electronics organized and leaves space for wiring between components.

The Wiring

thwiring.png
20260306_185714.jpg

Connect all components according to the wiring diagram.

Wire the ultrasonic sensor, LED eyes, buzzer, pressure plate, and servo motor to the Arduino through the breadboard. Use resistors for the LEDs and connect power and ground rails on the breadboard to the Arduino’s 5V and GND pins.

Ensure all connections match the tinkercad diagram

https://www.tinkercad.com/things/6EL4ha9GQZG-swanky-gaaris-kup/editel?returnTo=https%3A%2F%2Fwww.tinkercad.com%2Fdashboard&sharecode=YrXGYrwMWxjSBiEj2JKTTgKT_RnHf6nqXq1vAL9HLOY

Putting It All Together

car guts.png
20260306_171950.jpg

Place all assembled sections into the body: the head with sensors and LEDs, the pressure plate back, and the servo tail module. Route the wires neatly through the interior and connect them to the breadboard and Arduino as shown in the wiring diagram.

Once everything is secured inside the body, close the structure and plug the Arduino into an IDE to program it.

Here is our script

Pet

20260306_172036.jpg

Pet the cat

Conclusion

This project explored how simple sensors and actuators can be combined to create an interactive object that reacts to touch. The system uses an ultrasonic sensor to track the movement of a hand along the cat’s back, a pressure plate to confirm contact, and LEDs, a servo tail, and a buzzer to communicate the creature’s state.

A significant portion of the work involved improving the stroke detection logic. Because the ultrasonic sensor only measures distance, the code had to interpret a petting gesture from a sequence of changing readings instead of a single input. Early versions of the program often misinterpreted movement or triggered unintentionally, so I modified the distance thresholds, stroke direction logic, and rhythm tolerance several times. This process highlighted how sensitive interactive systems can be to small parameter changes.

Fabrication also introduced several difficulties. The cardboard construction worked well for quickly prototyping the body and mounting components, but some parts needed iteration to function reliably. The tinfoil pressure plate, for example, needed adjustments to balance sensitivity and stability. If the plates were too close together the circuit stayed closed, while too much separation made it difficult to trigger. Mounting the servo within the cardboard layers also needed careful spacing to ensure the tail could move freely without shifting the motor.

Another issue during development was interference in the ultrasonic readings. Because the sensor was mounted close to the body of the cat, it could occasionally detect nearby surfaces or parts of the structure. This required additional tuning in the code to ignore extreme or inconsistent readings. Similarly, combining multiple components in the circuit introduced bugs where the timing of one action affected another, validating the importance of testing each subsystem before integrating them.

Through this process, the project demonstrated how interactive prototypes often require iteration across both hardware and software. Adjustments to the physical structure, sensor placement, and code logic all influenced the final behavior. While the system still feels experimental, the process provided insight into how gesture detection, timing, and physical design coordinate within an embedded system. Future versions could improve reliability by using a more robust pressure sensor, better internal mounting for components, and additional filtering or smoothing of the ultrasonic data.