Topview Logo
  • Create viral videos with
    GPT-4o + Ads library
    Use GPT-4o to edit video empowered by Youtube & Tiktok & Facebook ads library. Turns your links or media assets into viral videos in one click.
    Try it free
    gpt video

    Human Detection Alarm System with Raspberry Pi AI Kit + Maker Pi PICO #RaspberryPiAI #pico

    blog thumbnail

    Human Detection Alarm System with Raspberry Pi AI Kit + Maker Pi PICO #RaspberryPiAI #pico

    If you've ever dreamed of diving into the world of neural networks, AI, and machine learning on your Raspberry Pi 5, the newly released Raspberry Pi AI kit is your gateway. Crafted in collaboration with Hyo, this AI kit seamlessly integrates high-performance, power-efficient inferencing into a multitude of exciting applications. This kit features the Hyo 8l AI accelerator module, which delivers impressive performance with 13 tera operations per second (TOPS) and claimed efficiency at three TOPS per watt.

    For comparison, the popular Google Coral TPU, widely used with previous-gen Raspberry Pis, offers four TOPS but at a higher power consumption of two TOPS per watt. With the Raspberry Pi AI kit, you get not only a performance boost but also improved energy efficiency, making it a superior choice for edge AI applications.

    Introducing the Maker Pi Pico W, an addon board by Satron that enhances digital projects by adding features like a built-in SD card slot for storage, a 3.5 mm audio jack for external speakers, and built-in RGB LEDs.

    Today, we're going to create our first Raspberry Pi AI kit project—a human notification system—integrated with the Satron Maker Pi Pico. We will show you how to detect a person and trigger audio and visual notifications using these tools. Let's get started!

    Components Needed

    First, let’s take a closer look at the components you’ll need for this project:

    • Raspberry Pi 5
    • Raspberry Pi AI kit
    • Raspberry Pi camera for visual input
    • Maker Pi Pico
    • Speaker for audio notifications
    • SD card for audio storage
    • (Optionally) NVMe SSD with a USB to M.2 adapter for faster operations

    System Architecture Overview

    The system architecture for our human notification system includes:

    • Raspberry Pi 5 running the AI kit for real-time object detection using the Hyo 8l AI accelerator with YOLO V6.
    • Raspberry Pi Camera Module 3 to capture the video feed.
    • A server running on Raspberry Pi 5 that detects persons through the camera feed and sends notifications to the Maker Pi Pico.
    • The Maker Pi Pico triggers audio and visual alerts using the speaker and built-in RGB LEDs respectively.

    Bash Background Processing Script

    This script runs the object detection model and monitors the output for any person detections. When a person is detected, it updates a file that the server code monitors.

    Key parts:

    • Running the object detection model with specific parameters and piping output to a temporary file.
    • Continuously monitoring the output for person detections and updating the objects.text file.
    • Ensuring cleanup for temporary files and background processes.

    Python Server Code on Raspberry Pi 5

    The server continuously monitors the object detection results from the camera feed. When a person is detected, it sends a notification to the client code running on the Pico W.

    Key parts:

    • Setting up the server socket to listen for connections on a specified port.
    • Monitoring object detection results by reading from a file updated by the background processing script.
    • Sending a notification to the client when a person is detected.

    CircuitPython Client Code on Maker Pi Pico W

    This code connects the Maker Pi Pico W to a Wi-Fi network and communicates with the server. When the server detects a person, the Pico W lights up the RGB LEDs and plays an audio alert stored on the SD card.

    Key parts:

    • Setting up the Wi-Fi connection using SSID and password.
    • Configuring the NeoPixel LED for visual notification.
    • Setting up the audio output using the built-in SD card reader and the 3.5 mm audio jack for external speakers.
    • Checking for messages from the server and triggering notifications.

    Setup Instructions

    1. Insert the SD card into the Maker Pi Pico and connect the speaker using the 3.5 mm audio jack.
    2. Attach the Raspberry Pi Camera Module to the Raspberry Pi 5 via the CSI cable.
    3. Connect the Maker Pi Pico to the Raspberry Pi 5 via USB.

    For detailed instructions, visit the Satron tutorial page.

    Cloning the Repository and Configuration

    Clone the necessary project files:

    git clone <repository_url>
    

    Navigate to the folder and configure the client side to communicate with the server:

    1. Copy and paste code.py into your Raspberry Pi Pico W.
    2. Replace the SSID, password, and server IP variables with your Wi-Fi network details and the server’s IP address.
    3. Save the changes.

    Server Side Configuration

    1. Make the camera monitor script executable and start the server.
    2. Run the Python server script:
      python3 server.py
      
    3. Execute the camera monitor script in another terminal window.

    Running and Testing

    1. Open THON IDE, connect to the Raspberry Pi Pico W, and run code.py to initiate the system.
    2. The system should now detect a person and trigger notifications through the RGB LED and audio interface.

    Conclusion

    Congratulations! You've successfully created a human notification system using the Raspberry Pi AI kit and Satron Maker Pi Pico. This project demonstrates the seamless integration of advanced AI capabilities with enhanced hardware features. Stay tuned for more exciting projects, and happy making!


    Keywords

    • Raspberry Pi 5
    • AI Kit
    • Hyo 8l AI Accelerator
    • Maker Pi Pico W
    • YOLO V6
    • Object Detection
    • Wi-Fi Network
    • Audio and Visual Notifications

    FAQ

    Q: What is the Hyo 8l AI Accelerator? A: The Hyo 8l AI Accelerator is a high-performance module featured in the Raspberry Pi AI kit, delivering 13 TOPS of performance with a claimed efficiency of 3 TOPS per watt.

    Q: How does the Maker Pi Pico W enhance the Raspberry Pi PW? A: The Maker Pi Pico W adds cool features like a built-in SD card slot for storage, a 3.5 mm audio jack for external speakers, and built-in RGB LEDs.

    Q: Which object detection model is used in this project? A: The YOLO V6 model is used for real-time object detection in this project.

    Q: What programming languages are used for the server and client codes? A: The server code is written in Python, while the client code on the Maker Pi Pico W is written in CircuitPython.

    Q: Can I use an NVMe SSD for this project? A: Yes, optionally an NVMe SSD with a USB to M.2 adapter can be used for faster operations.

    Q: Where can I find detailed instructions for this project? A: Detailed instructions are available on the Satron tutorial page.

    One more thing

    In addition to the incredible tools mentioned above, for those looking to elevate their video creation process even further, Topview.ai stands out as a revolutionary online AI video editor.

    TopView.ai provides two powerful tools to help you make ads video in one click.

    Materials to Video: you can upload your raw footage or pictures, TopView.ai will edit video based on media you uploaded for you.

    Link to Video: you can paste an E-Commerce product link, TopView.ai will generate a video for you.

    You may also like