128
edits
No edit summary |
|||
Line 3: | Line 3: | ||
https://wiki.keyestudio.com/KS0035_Microphone_Sound_Sensor_with_Potentiometer | https://wiki.keyestudio.com/KS0035_Microphone_Sound_Sensor_with_Potentiometer | ||
Analog sound sensor includes a microphone sensor to detect ambient sounds and loudness of them. In some sources usage is recommended with an audio analyzer module(https://www.dfrobot.com/product-514.html) to differentiate different frequencies. | Analog sound sensor includes a microphone sensor to detect ambient sounds and loudness of them. In some sources usage is recommended with an audio analyzer module(https://www.dfrobot.com/product-514.html) to differentiate different frequencies. | ||
https://www.sparkfun.com/products/15569 | https://www.sparkfun.com/products/15569 | ||
Ultrasound distance sensor consists of a trigger and receiver parts, one is releasing ultrasonic waves and the other is receiving the reflected waves to calculate the distance from the duration of the bouncing time. | |||
Ultrasound distance sensor consists of a trigger and receiver parts, one is releasing ultrasonic waves and the other is receiving the reflected waves to calculate the distance from the duration of the bouncing time. The detection range is 2-40cm. | |||
'''connecting to Arduino''' | '''connecting to Arduino''' | ||
Line 13: | Line 16: | ||
To see the differences in the values, I put some track on the bluetooth speaker and moved it in front of the distance sensor. | To see the differences in the values, I put some track on the bluetooth speaker and moved it in front of the distance sensor. | ||
[[File: sd_jbl. | |||
[[File:sd_jbl.jpg|400px]] | |||
[[File:sel_loud.png|180px]] | |||
'''creating the loop''' | |||
I have added a piezzo buzzer (+ 1K resistor) to the circuit to make the process of loudness detection more cyclical. I have followed this tutorial connecting it > https://surtrtech.com/2018/01/29/how-to-use-a-buzzer-piezo-speaker-with-arduino/ | |||
[[File:sd_buzzer.jpg|400px]] | |||
added the code a condition about the distance. When the distance is smaller than 10cm, buzzer starts to buzz with the mapped values also from the sound and distance sensor. | |||
edits