Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO Based Ultrasonic Distance Measurement with Audio Feedback

Image of Arduino UNO Based Ultrasonic Distance Measurement with Audio Feedback

Circuit Documentation

Summary

The circuit in question is designed to interface an Arduino UNO with an HC-SR04 Ultrasonic Sensor and a DFPlayer MINI MP3 module, which is connected to a Loudspeaker for audio output. The Arduino UNO serves as the central microcontroller, managing sensor data and controlling the DFPlayer MINI. The HC-SR04 sensor is used for distance measurement, while the DFPlayer MINI is responsible for audio playback through the Loudspeaker. The circuit is powered by the Arduino UNO's 5V output, which is distributed to the other components.

Component List

Arduino UNO

  • Description: A microcontroller board based on the ATmega328P.
  • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D0-D13

HC-SR04 Ultrasonic Sensor

  • Description: An ultrasonic distance sensor.
  • Pins: VCC, TRIG, ECHO, GND

DFPlayer MINI

  • Description: A small and low-cost MP3 module with a simplified output directly to the speaker.
  • Pins: VCC, BUSY, RX, TX, DAC_R, DAC_L, SPK1, SPK2, GND, and others for control and interfacing.

Loudspeaker

  • Description: An electroacoustic transducer that converts an electrical audio signal into a corresponding sound.
  • Pins: pin1, pin2

Wiring Details

Arduino UNO

  • 5V connected to:
    • DFPlayer MINI VCC
    • HC-SR04 VCC
  • GND connected to:
    • HC-SR04 GND
    • DFPlayer MINI GND
  • D12 connected to DFPlayer MINI TX
  • D11 connected to DFPlayer MINI RX
  • D10 connected to HC-SR04 ECHO
  • D9 connected to HC-SR04 TRIG

HC-SR04 Ultrasonic Sensor

  • VCC connected to Arduino UNO 5V
  • TRIG connected to Arduino UNO D9
  • ECHO connected to Arduino UNO D10
  • GND connected to Arduino UNO GND

DFPlayer MINI

  • VCC connected to Arduino UNO 5V
  • TX connected to Arduino UNO D12
  • RX connected to Arduino UNO D11
  • GND connected to Arduino UNO GND
  • SPK1 connected to Loudspeaker pin2
  • SPK2 connected to Loudspeaker pin1

Loudspeaker

  • pin1 connected to DFPlayer MINI SPK2
  • pin2 connected to DFPlayer MINI SPK1

Documented Code

Arduino UNO Code (sketch.ino)

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Note: The provided code is a template and does not contain any functional implementation. It is expected that the user will add the necessary setup and loop code to interact with the HC-SR04 sensor and control the DFPlayer MINI module.