Actual Tech - AI Enabled Power Relay with Raspberry Pi 5

In this episode, Eli the Computer Guy demonstrates an AI-enabled power relay system built with a Raspberry Pi 5 that uses a wake phrase (“Hey potato”) for secure voice-activated control of devices, time queries, and simple AI interactions. He explains the project’s logic, highlights its reliability features, and showcases how just 95 lines of Python code can enable practical, expandable DIY voice automation.

In this episode of “Stupid Geek Tricks,” Eli the Computer Guy demonstrates his latest project: an AI-enabled power relay system using a Raspberry Pi 5. He has implemented a voice-activated control system that responds only to a specific wake phrase, “Hey potato,” to prevent accidental triggers from background conversations. The system is capable of recognizing commands to turn a light on or off, tell the current time, and even respond to simple AI queries such as telling a joke.

Eli explains that the system uses speech-to-text to transcribe everything he says, but it only acts on commands that include the wake phrase. For example, saying “Hey potato, light on” will turn the light on, while simply saying “light on” without the wake phrase will not trigger any action. This ensures that the device is not inadvertently activated by unrelated speech. He demonstrates this by issuing various commands and showing how the system responds appropriately only when the correct phrase is used.

The project also includes a power relay connected to the Raspberry Pi’s GPIO pins, allowing physical control of devices like lights. Eli walks through the basic logic of his Python code: it checks for errors, looks for the wake phrase, and then parses the command to determine the appropriate action. Commands like “end session” will exit the program, “what time is it?” will return the current time, and “light on” or “light off” will control the relay. If the command doesn’t match any of these, the system passes it to an AI for a response.

Eli notes some quirks in the system, such as inconsistent recognition of the “end session” command, which fails about 60% of the time depending on how he phrases it. He also added a visual indicator—a green light that blinks for half a second during each loop iteration—to confirm that the program is running and listening for commands, even if no action is taken. This helps with troubleshooting and ensures the system is responsive.

Finally, Eli emphasizes the simplicity and potential of his project. The entire system is built with just 95 lines of relatively unoptimized Python code, yet it enables voice interaction, device control, and AI responses. He encourages viewers to imagine the possibilities if they expanded the codebase further. Eli mentions that he will be demonstrating this and other projects at an upcoming Silicon Dojo class, highlighting how accessible and powerful such DIY AI projects can be with minimal coding.