• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Sound Sensor Direction Circuit using Arduino

Sound Sensor Direction Circuit using Arduino

Last updated on 9 September 2025 by Admin-Lavi Leave a Comment

Sound is everywhere.

Sometimes we want to know from which side sound comes.

Example in robot or in security.

With Arduino and some sound sensor we can find sound direction.

In this circuit we used four sound sensors and one OLED display with Arduino.

OLED show which side sound comes.

This project for Sound Sensor Direction Circuit using Arduino is simple and good for Arduino beginner.

Circuit Coding:

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

int rightSensor = 8;
int topSensor = 9;
int leftSensor = 10;
int bottomSensor = 11;

void setup() {
pinMode(rightSensor, INPUT);
pinMode(topSensor, INPUT);
pinMode(leftSensor, INPUT);
pinMode(bottomSensor, INPUT);

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
for(;;);
}
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(WHITE);
}

void loop() {
int r = digitalRead(rightSensor);
int t = digitalRead(topSensor);
int l = digitalRead(leftSensor);
int b = digitalRead(bottomSensor);

display.clearDisplay();
display.setCursor(10,20);

if(r == 1) {
display.print("RIGHT");
}
else if(t == 1) {
display.print("TOP");
}
else if(l == 1) {
display.print("LEFT");
}
else if(b == 1) {
display.print("BOTTOM");
}
else {
display.print("NO SOUND");
}

display.display();
delay(100);
}

Code Explanation:

  • First we include library for OLED.
  • Then we define sensor pins.
  • In setup we set pins as input.
  • We also start OLED display.
  • In loop we read value of each sensor.
  • If sound is detected then that sensor pin becomes high.
  • Arduino checks and shows text on OLED screen according to side.

Circuit Working:

Sound Sensor Direction Circuit Diagram using Arduino

Parts List:

ComponentQuantity
Arduino UNO R4 WiFi1
MAX4466 Microphone Amplifier Module4
0.96 OLED Display (128 x 64 px)1

In the above circuit diagram when sound comes one sensor will sense it first.

Arduino will check which sensor gave signal.

If right sensor hears sound first then Arduino decides sound came from right side.

If left sensor hears first then it is from left.

Same for top and bottom.

Arduino will then show direction on OLED screen.

Formula:

Below the only simple logic formula for Sound Sensor Direction Circuit using Arduino:

Time difference between sensors tells the direction.

For example T1 is time when sensor 1 detects sound and T2 is time for sensor 2 then whichever is smaller means that side sound came from.

Direction = sensor with minimum detection time.

When sound comes it reaches one sensor first.

Every sensor gives signal at a different small time.

The one that gets sound first has minimum detection time.

So direction = that sensor side.

How to Build:

To build a Sound Sensor Direction Circuit using Arduino follow the below steps for connections:

  • Gather all the parts as shown in circuit diagram.

Connections of MAX4466 Microphone Amplifier Module:

  • VCC pins of all sensors are connected to 5V of Arduino.
  • GND pins of all sensors are connected to GND of Arduino.
  • OUT pin of right sensor connected to Arduino digital pin 8.
  • OUT pin of top sensor connected to Arduino digital pin 9.
  • OUT pin of left sensor connected to Arduino digital pin 10.
  • OUT pin of bottom sensor connected to Arduino digital pin 11.

Connection of OLED Display:

  • VCC pin connect to 5V of Arduino.
  • GND pin connect to GND of Arduino.
  • SCL pin connect to A5 of Arduino.
  • SDA pin connect to A4 of Arduino.

Testing:

  • Clap near right, left, top or bottom sensor.
  • Snap fingers or tap table close to one sensor.
  • Use small speaker or buzzer near sensor side.
  • If circuit works OLED will show that side direction.

Conclusion:

This Sound Sensor Direction Circuit using Arduino shows how easily we can detect direction of sound with Arduino using four sensors.

It is a good starting project to learn sound sensors, OLED display and Arduino programming.

We can improve it by using more sensors, better calculation or adding motors to rotate toward sound.

References:

Locating the Sound Source by using 3 Sound sensors in 2D

Filed Under: Arduino Projects, Sensors and Detectors

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « Dancing Water Fountain Circuit with Arduino

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • Alarm Circuits (33)
  • Amplifier Circuits (67)
  • Arduino Projects (36)
  • Audio Circuits (94)
  • Automobile Circuits (19)
  • Battery Charger Circuits (48)
  • Free Energy (13)
  • Heater and Temperature Controllers (10)
  • High Voltage (1)
  • Indicator Circuits (38)
  • Inverter Circuits (13)
  • LDR Circuits (15)
  • LED and Lamps (116)
  • Meters and Testers (28)
  • Motor Controllers (18)
  • Oscillator Circuits (34)
  • Power Supply Circuits (92)
  • Remote Control Circuits (6)
  • Security and Protection (25)
  • Sensors and Detectors (83)
  • Solar Circuits (17)
  • Timer Circuits (30)
  • Transistor Circuits (57)
  • Transmitter Circuit (12)
  • Tutorials (5)
  • Water Level Controller (4)

Recent Posts

  • Sound Sensor Direction Circuit using Arduino
  • Dancing Water Fountain Circuit with Arduino
  • Arduino Based Obstacle Avoidance Robot Circuit
  • Arduino Based Automatic Gate Opening and Closing Circuit
  • POV Project with LEDs and Arduino Circuit

Recent Comments

  1. Admin-Lavi on Constant Voltage, Constant Current Battery Charger Circuit
  2. Bill on Constant Voltage, Constant Current Battery Charger Circuit
  3. Admin-Lavi on Long Range FM Transmitter Circuit (2km)
  4. Sina on Long Range FM Transmitter Circuit (2km)
  5. Admin-Lavi on Long Range FM Transmitter Circuit (2km)

Copyright © 2025 | New Circuit Ideas