Jarvis Offline
Voice-Controlled Light
A completely offline AI voice assistant that controls your light with voice commands, speaks back with prerecorded responses, and shows animated expressions on an OLED display. No Wi-Fi, no internet, no cloud.
How the System Works
Jarvis is a fully offline voice assistant powered by the XIAO ESP32-S3 Sense. Everything runs on-device — no Wi-Fi, no internet, no cloud services.
Wake Word Detection
The onboard microphone on the XIAO ESP32-S3 Sense listens for the wake word "Jarvis". Once detected, it starts recognizing the following voice command.
Command Recognition
Say "Jarvis, turn on the light" or "Jarvis, good night". The ESP32-S3 recognizes the command entirely on-device — no internet needed.
Light Control
The ESP32-S3 changes the signal on D0 to activate the relay and switch the bulb on or off. The relay stays off when the board starts up.
Voice & OLED Feedback
Prerecorded voice clips play through the MAX98357A amplifier and 2W speaker. The 1.3-inch OLED shows Jarvis's animated face and expressions.
100% Offline: All voice recognition, wake word detection, and command processing happens directly on the ESP32-S3. No Wi-Fi connection, no internet, no cloud service is required at any point.
Touch Sensor Control: The TTP223 touch sensor provides manual control. Tapping it changes the light's state without speaking a command. Jarvis still plays a voice response when the light is switched using the touch sensor.
Components Required
Everything you need to build this Jarvis offline voice-controlled light.
| Component | Purpose | Buy |
|---|---|---|
| Seeed Studio XIAO ESP32-S3 Sense | Main controller with microphone | Buy → |
| 1.3" OLED Display | Jarvis face & expressions | Buy → |
| MAX98357A Amplifier | Audio output to speaker | Buy → |
| 5V Relay Module | Switches AC bulb | Buy → |
| TTP223 Touch Sensor | Manual light control | Buy → |
| 2-Watt Speaker | Voice responses | Buy → |
| 5V Boost & Charging Module | Powers the build | Buy → |
| 3.7V Li-Po Battery | Portable power | Buy → |
| Jumper Wires | Connections | Buy → |
| Breadboard Hookup Wire | Clean wiring | Buy → |
| 2× Mini Breadboard | Component mounting | Buy → |
Pin Connections
Every connection for the Jarvis voice-controlled light, mapped to the XIAO ESP32-S3 Sense pinout.
| Component | Component Pin | XIAO ESP32-S3 Pin | Notes |
|---|---|---|---|
| OLED Display | SDA | D4 | I²C Data |
| OLED Display | SCL | D5 | I²C Clock |
| MAX98357A Amplifier | LRC | D10 | Left/Right Clock |
| MAX98357A Amplifier | BCLK | D9 | Bit Clock |
| MAX98357A Amplifier | DIN | D8 | Digital Audio Data |
| MAX98357A Amplifier | GAIN | GND | Sets 9dB gain |
| MAX98357A Amplifier | SD | 3V3 | Shutdown — pull high to enable |
| 5V Relay Module | IN | D0 | HIGH = ON, LOW = OFF |
| TTP223 Touch Sensor | Signal | D3 | Touch input |
| All Components | GND | GND | Common ground rail |
| All Components | VCC | 3V3 / 5V | Per component spec |
Safety Warning — AC Mains: The relay's contacts switch the household bulb's AC power circuit. Those AC connections must be fully insulated and kept off the breadboard. Never touch AC wiring while powered.
Relay Power Note: In this working build, the relay module operates reliably when powered from 3.3V. Powering the module from 5V was the cause of the earlier switching problem — use 3.3V for the relay VCC.
Voice & Touch Commands
Control Jarvis with natural voice commands or use the touch sensor for manual control.
| Voice Command | Action |
|---|---|
| "Turn on the light" | Turns the light on |
| "Turn off the light" | Turns the light off |
| "Good night" | Turns the light off |
| "Toggle the light" | Changes the light to the opposite state |
Wake Word
Say "Jarvis" to activate command listening.
Touch Sensor
Manual toggle — Jarvis speaks confirmation.
OLED Face
Expressions change with actions; mouth animates while speaking.
Voice Responses
3 wake clips play in sequence, then repeat from the first.
Circuit Diagram
Complete pin connection diagram for the Jarvis Offline Voice-Controlled Light.
Circuit Diagram: Click the image above to open the full-resolution 4K pin connection diagram.
Full Video Tutorial
Complete build walkthrough — component overview, wiring, firmware flashing, AC connections, and demonstration.
Watch for detailed assembly techniques — including breadboard wiring, amplifier connections, AC relay connections, and web flasher firmware installation.
Code
No Arduino IDE needed — use the web flasher to install the Jarvis firmware directly to your XIAO ESP32-S3 Sense.
Flashing Steps: 1) Connect the ESP32 to your laptop. 2) Click the button above to open the web flasher. 3) Select your ESP32 board. 4) Click Connect & Install Firmware. 5) Choose the COM port of your board. 6) Select Simple Circuits Jarvis Offline Light Firmware, enable Erase device before install, and click Install. Keep the board connected until flashing completes.
Assembly Steps
Prepare the Breadboards
Place two mini breadboards side by side to hold all the components. Arrange them so the OLED, amplifier, relay, and touch sensor have clean wire routing.
Mount the XIAO ESP32-S3 Sense
Insert the XIAO ESP32-S3 Sense with its expansion board into the breadboard. Ensure the microphone and camera area are not obstructed.
Connect the OLED Display
Wire the 1.3" OLED: SDA → D4, SCL → D5, VCC → 3V3, GND → GND. This displays Jarvis's animated face and expressions.
Wire the MAX98357A Amplifier
Connect LRC → D10, BCLK → D9, DIN → D8, GAIN → GND, SD → 3V3, VIN → 5V, GND → GND. Attach the 2W speaker to the amplifier's output terminals.
Connect the Relay Module
Wire the relay IN → D0, VCC → 3V3 (not 5V — see safety note), GND → GND. The relay's NO and COM terminals will switch the AC bulb circuit.
Add the Touch Sensor
Connect the TTP223 signal pin → D3, VCC → 3V3, GND → GND. This gives you manual light control without voice commands.
Wire the AC Bulb Circuit
Connect the plug's live wire to one side, then from the other side to the bulb holder. Route the bulb holder's second terminal and the plug's neutral wire to the relay's NO and COM terminals. Insulate all AC connections — keep them off the breadboard.
Power with the Boost Module
Connect the 3.7V Li-Po battery to the 5V boost & charging module. The module's output powers the breadboard rails. Verify all grounds are shared.
Flash the Firmware
Connect the ESP32 to your laptop. Use the web flasher above to install the Jarvis Offline Light Firmware. Keep the board connected until flashing completes.
Test & Enjoy
Power on and test: say "Jarvis, turn on the light" or tap the touch sensor. Jarvis will respond with voice and OLED animations. Fully offline — no Wi-Fi needed.
AC Safety Note: When wiring the household bulb through the relay, always disconnect mains power before making connections. Insulate all AC terminals completely. Keep the AC circuit off the breadboard — only low-voltage DC should be on the breadboard. Never touch AC wiring while powered.
Design Your Own PCBs with Altium
For designing professional PCBs — like a custom board for this Jarvis voice-controlled light — I use Altium. It makes electronics design faster, cleaner, and production-ready.
Students get free access via Altium Student Lab — sign up with your university email for step-by-step PCB courses and industry certifications.
This project is brought to you by SimpleCircuits — DIY electronics for makers and builders. All components, code, and designs are shared for educational purposes. Affiliate links may be present. Firmware developed by SimpleCircuits.
Comments
Post a Comment