Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Sheekar Banerjee
Published © CC0

E30 Sound Sensor Module with Arduino | Sheekar Banerjee

This project is about the interfacing of E30 sound sensor module with Arduino and visualizing the data into Serial Plotter.

IntermediateFull instructions provided239
E30 Sound Sensor Module with Arduino | Sheekar Banerjee

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Arduino E30/LM393 Sound sensor Module
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit Diagram of E30 Sensor with Arduino UNO R3

Code

Program of E30 Sensor with Arduino UNO R3

Arduino
const int OUT_PIN = 8; //sensor output pin to Arduino Digital 8 pin
const int SAMPLE_TIME = 10;
unsigned long millisCurrent;
unsigned long millisLast = 0;
unsigned long millisElapsed = 0;
int sampleBufferValue = 0;
void setup() {
 Serial.begin(9600); //Sensor streaming 9600 bits of data per second
}
void loop() {
 millisCurrent = millis();
 millisElapsed = millisCurrent - millisLast;
 if (digitalRead(OUT_PIN) == LOW) {
   sampleBufferValue++;
 }
 if (millisElapsed > SAMPLE_TIME) {
   Serial.println(sampleBufferValue);
   sampleBufferValue = 0;
   millisLast = millisCurrent;
 }
}

Credits

Sheekar Banerjee
0 projects • 6 followers
A motivated Computer Scientist & Engineer with years of experience over IoT, Robotic Systems, Machine Learning Algorithms and Software.
Contact

Comments

Please log in or sign up to comment.