Voice-Controlled Flashlight with Offline Speech Recognition
A battery-powered portable flashlight featuring offline voice command recognition to toggle a high-power LED.
Intermediate Project
— Integrating real-time I2S audio streaming with local machine learning inference and high-power thermal management requires a mix of digital signal processing and power electronics knowledge.
Assumptions:
- Voice recognition must be performed offline/locally for privacy and latency.
- The flashlight will use a single-cell Li-ion battery (3.7V nominal).
- A high-power LED (1-3W) is required for flashlight functionality.
- The user prefers a breadboard-friendly prototyping approach.
Bill of Materials
Compatibility Notes
- The ESP32 and INMP441 both operate at 3.3V logic levels, ensuring direct I2S compatibility.
- The FQP30N06L is a logic-level MOSFET, but its gate threshold (Vgs(th)) should be checked to ensure full saturation at 3.3V; a gate driver may be needed for higher efficiency.
- The MCP73871 output voltage (SYS) will follow the battery voltage or USB 5V, so a 3.3V LDO or buck regulator is still needed to protect the MCU.
You'll Also Need
- High-power LED (e.g. Cree XP-L or similar 1-3W component)
- Heatsink for the high-power LED
- Li-ion Battery (18650 or Li-Po pouch)
- Current-limiting power resistors (high wattage for LED)
- 0.1uF and 10uF decoupling capacitors
- Micro-USB or USB-C breakout for charging
Estimated BOM Cost: $105-120 (based on live distributor pricing)
Design Considerations
Acoustic Isolation
The microphone must be acoustically isolated from the flashlight chassis to prevent the clicking of switches or vibration from cooling fans (if any) from triggering false voice detections. Use a silicone gasket or foam around the MEMS microphone port.
Power Management
Voice recognition requires the CPU to be active, consuming 30-100mA constantly. To preserve battery, implement a 'wake word' strategy where the system stays in a light sleep mode and only fully awakens the voice engine when a specific sound threshold is met via the I2S microphone's DMA.
Thermal Management
A 3W LED generates significant heat that can degrade its lifespan and cause the flashlight body to become uncomfortable. Ensure the LED is mounted on a metal-core PCB (MCPCB) and thermally coupled to an aluminum heatsink or the flashlight casing.
False Trigger Mitigation
Background noise can cause 'phantom' light toggles. Set a confidence threshold in the inference engine (e.g., >0.8 probability) and consider using a two-stage command (e.g., 'Flashlight' followed by 'Turn On') to increase reliability.
Battery Protection
While the MCP73871 manages charging, ensure the Li-ion cell has an integrated protection circuit (PCM) to prevent over-discharge below 2.5V, as the MCU might continue to drain the battery in standby.
Want to customize this project or build something different?
Try the Project Advisor


