กลับไปหน้ารวมไฟล์
whack-a-mole-07b548-en.md

I made a Whack-A-Mole for a cat using an Arduino with BLE (Bluetooth Low Energy). This project, "Feline-Mole," is a sophisticated exploration into Cross-Species HMI (Human-Machine Interface). Designed specifically for domestic cats, it bridges mobile app-based decision logic with physical mechatronic movement.

Three servomotors connected to the Arduino are controlled from a smartphone via Bluetooth. By utilizing a low-latency Bluetooth Low Energy (BLE) link, an Android device serves as the game controller, triggering randomized "Mole" eruptions via a 3-axis servo array.

Technical Deep-Dive

  • BLE GATT Profile Forensics:
    • Universal Unique Identifiers (UUIDs): The system establishes a custom BLE Service with specific Characteristics for servo indexing. The Android app acts as the GATT Client, writing byte-level instructions (e.g., [ServoID, State]) to the Nano node.
    • Latency Mitigation: BLE’s low-power architecture is optimized for short-burst data transfer. The firmware implements a non-blocking serial-to-servo buffer, ensuring that the kinetic "Mole" burst occurs within milliseconds of the mobile trigger, essential for maintaining pet engagement.
  • Servo Kinetic Harmonics & 50Hz PWM:
    • Multi-Channel Actuation: Managing three SG90 servos concurrently requires precise 20ms pulse-width modulation cycles. The Arduino Nano distributes these signals via a dedicated Servo.h abstraction, ensuring jitter-free movement across the 180° rotational arc of the "Moles."
    • The Attack Phase: To simulate prey-like movement, the servos are driven to their target positions using maximum angular velocity, followed by a randomized delay before retracting, creating an unpredictable and challenging interaction for the cat.
  • Bio-Safe Mechatronic Design:
    • The Protective Envelope: The 3D-printed chassis is engineered to isolate the electrical components and servo horns from the pet. Only the non-abrasive "Mole" tops protrude through the frame, utilizing smooth-radius geometries to prevent injury.

Engineering & Implementation

  • System Architecture (Android-to-Nano):
    • Frontend: An Android Studio-developed interface provides the operator with manual and automated "Mode" toggles.
    • Data Link: Uses standard BLE Advertising and Connection protocols to establish a secure, low-energy handshake.
    • Backend: The Nano parses the incoming hex-packets, maps them to the corresponding digital pins, and executes the high-current servo sweeps.
  • Power Rail Isolation:
    • Because servos generate significant inductive back-EMF, the 6V servo rail is decoupled from the Nano's sensitive 5V logic via a shared ground but separate power sourcing, preventing system resets during peak "Whack" activities.

Source code and 3D printing data is available on GitHub.

I used Arduino IDE 1.8.13 for Arduino development and Android Studio 4.0 for Android app development.

I used to focus on completing services inside the server and the smartphone, but this kind of IoT development is also interesting! Feline-Mole demonstrates the potential of IoT in Animal Enrichment. By mastering BLE Data Bridging and Dynamic Kinetic Actuation, developers can build immersive, reactive environments that challenge and stimulate biological agents through robust embedded forensics and mechatronic design.


Feline Kinematics: Mastering pet-centric HMI through BLE forensics.

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Android Studio"
author: "toyonaga"
category: "Gadgets, Games & Toys"
components:
  - "1x Arduino Nano R3 (Embedded Logic Node)"
  - "1x Bluetooth Low Energy (BLE) Module (GATT Bridge)"
  - "3x SG90 Micro Servos (Kinetic Actuators)"
  - "1x Custom 3D Printed 'Mole' Chassis (Bio-Safe Frame)"
  - "1x 6V Battery Pack (Dedicated Servo Power)"
description: "A digital-physical interaction platform for domestic animals, featuring BLE GATT profile forensics, 3-axis servo kinetic harmonics, and Android-offloaded game logic."
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles:
  - "https://projects.arduinocontent.cc/b7c59c32-ca81-4af3-bc77-530cfffa5298.ino"
  - "https://projects.arduinocontent.cc/b7c59c32-ca81-4af3-bc77-530cfffa5298.ino"
encryptedPayload: "U2FsdGVkX19Urt9CnPZyGprqzdC5dfkpXU1ocm4Llj8Vcx0ErVgHoikofiEArBk5cQ3sGJtmAfcYEYYS+e3QJdT4zLVwiZyj5hXeDuu2Rg4="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/whack-a-mole-07b548_cover.jpg"
lang: "en"
likes: 1
passwordHash: "cfbb6ac720cd2a41a32aad5e1e7cf9591153f89ef5d28ed266033cc877b30ded"
price: 299
seoDescription: "Build a DIY Whack-A-Mole for cats using Arduino and BLE. Source code and 3D printing files available on GitHub."
tags:
  - "pet-robotics"
  - "ble-gatt-protocols"
  - "servo-kinematics"
  - "iot-interaction"
  - "3d-printed-robotics"
  - "android-integration"
title: "Feline-Mole: BLE Servo-Kinetic Pet HMI"
tools:
  - "3D Printer"
  - "Android Studio (Mobile App Frontend)"
videoLinks:
  - "https://www.youtube.com/embed/53kR-B51iNw"
views: 6801