AR-174IntermediatePremium
Arduino Talking Distance Robot: A Robot That Talks When You Come Closer (HC-SR04 + DFPlayer Mini + Speaker)
A robot that stays quiet while nobody is around and talks with a real voice when someone comes closer. The HC-SR04 measures the distance and the DFPlayer Mini plays MP3 files from a microSD card through a speaker: "Hello! I'm the BlueGrays robot." at 150 cm, "You're a bit close." at 60 cm, "Too close, step back!" at 20 cm and "See you!" when you leave. Each band has two sentences that take turns. A median filter and hysteresis stop it chattering at a border.
0.0(0)

Picture a little robot waiting on the corner of your desk: it stays quiet while nobody is around, says "Hello!" when someone comes closer, warns "Step back!" when they get too close and says goodbye when they leave. The voice comes from real MP3 files, so you can change the sentences to any language and any voice: record your own or make them with a text to speech tool. Along the way you learn ultrasonic distance measurement, filtering and how to control an MP3 module over serial.
Source Code
Premium Content
The source code, block version and FAQ of this project are open to Premium members.
- All Project Code
- Block version
- Frequently Asked Questions
