[Diao Ye learns programming] Arduino hands-on (212) --- 9-in-1 expansion board to complete Arduino's 10th type of expansion experiment 4-wire sound sensor module with electret microphone

insert image description here

The reference to 37 sensors and modules has been widely circulated on the Internet. In fact, there must be more than 37 sensor modules compatible with Arduino. In view of the fact that I have accumulated some sensors and modules on hand, according to the concept of practice (hands-on try), for the purpose of learning and communication, I am going to do experiments one by one here, and will record them regardless of whether they are successful or not. It is a difficult problem, and I hope to be able to throw bricks and spark jade.

[Arduino] 168 kinds of sensor module series experiment (data code + simulation programming + graphics programming)
experiment 212: 9 in 1 multi-function expansion board DHT1 device temperature and humidity LM3 temperature 5 buzzer 1 compatible with UNO

insert image description here

Take the combination of "Arduino program code" + "Mind + graphics programming" + "Linkboy simulation programming"

Complement each other, lay a solid foundation, and promote understanding

insert image description here

Experiment catalog (Arduino hands-on)
1. LED experiment
01 Blink: D13 blue LED blinks
02 Blink2: D12, D13 red and blue LEDs blink alternately
03 Blink3: Simulate flashing alarm light
04 Breath_LED: D9 full-color LED simulates red breathing light
2. Button experiment
05 Button: D2 button controls D13 blue LED
06 Button_Lock: D3 button controls D13 blue LED self-locking experiment
3. Potentiometer experiment
07 RS232_AD: serial port reads A0 potentiometer to collect value (rotation angle 270° output 0 -3.3V/5V voltage signal potentiometer resistance value 10K)
08 Rotation_LED: A0 potentiometer controls D11 full-color LED blue terminal brightness
09 RC_Motor: A0 potentiometer controls the steering gear at the output port of D7 to control its rotation angle (the steering gear needs to be automatically Arduino needs external power supply)
4. RGB full-color LED experiment
10 LED_RGB_Text: full-color LED basic color change
11 LED_RGB: full-color LED rainbow change
5. Infrared sensor D6 experiment (infrared remote control needs to be prepared by yourself)
12 IRrelay: press infrared remote control Any key of the device can control the D13 LED switch (control distance 1-8 meters, frequency 38KHz, compatible with most infrared remote controls on the market)
13 IRrecord: The serial port displays the read infrared remote control code
6. Temperature sensor experiment
14 LM35_RS232AD: The serial port
displays the temperature read by the LM35 temperature sensor on the A2 port (it can test the indoor and outdoor temperature, the range is -50-150°C, and the sensitivity is good).
Taken temperature and humidity data (temperature measurement range 0-50°C, humidity range 20%-90%PH)
8. Brightness sensor experiment
16 Light Sensor: serial port displays the value collected by the photoresistor of port A1
17 Light_LED: control of the photoresistor of port A1 D13 LED switch (sensitive to light, suitable for teaching experiments and civilian equipment)
9. Buzzer experiment
18 Buzzer: D5 port passive buzzer to simulate an ambulance siren (can make simple music sounds, music needs to be programmed)
10 , Extended experiment
19 Analog ultrasonic ranging sensor (detection type I, IIC/I2C interface)
20 Bus DS18B20 temperature sensor (numeric type, connected to the digital D7 interface of the expansion board)
21 TM1637 four-digit digital tube (digital tube and dot matrix type, connected to Expansion board digital D7/D8 interface)
22 GY-BMP280-3.3 Atmospheric pressure altimeter sensor module (numeric type, IIC/I2C interface)
23 GY-NEO-6MV2 new flight control GPS satellite signal receiving module (numeric type, TTL interface)
24 5V low-level trigger single-channel relay module (executive type, digital D7 interface)
25 4-wire sound sensor module with electret microphone (trigger type, digital D7 interface)
26 BH1750FVI digital light intensity module light sensor (numeric type, IIC/ I2C interface)
27 Open source DFPlayer Mini TF card MP3 player module (output actuator type D7/D8 digital interface)
28 LCD1602 LCD screen module (output display type, IIC/I2C interface)
29 Human body infrared pyroelectric motion sensor module (trigger type, digital D7 interface)
30 DS1307 clock module Tiny RTC I2C module (detection sensor type, IIC/I2C interface)
31 compatible HC-06 slave Bluetooth module (communication and storage type, TTL interface)
32 0.96 inch OLED12864 LCD screen module (display type, IIC interface)

insert image description here

10. Extended experiment
25 4-wire sound sensor module with electret microphone (trigger type analog A3 and digital D7 interface)

Knowledge points: The sound sensor module
is a sensor that can detect, measure and display sound waveforms. It is widely used in daily life, military, medical, industry, territorial waters, aerospace, etc., and has become an indispensable part of the development of modern society. The sound sensor acts like a microphone (microphone). It is used to receive sound waves and display the vibration image of the sound, but it cannot measure the intensity of the noise. The transducer incorporates a sound-sensitive condenser electret microphone. Sound waves vibrate the electret membrane inside the microphone, causing a change in capacitance, which produces a corresponding change in tiny voltage. This voltage is then converted into a voltage of 0-5V, which is accepted by the data collector after A/D conversion and sent to the Arduino uno, which is mainly used for sound detection and voice control.

insert image description here
Features of the sound sensor module
(1) The electret microphone is used, which is characterized by small size, simple structure, wide frequency response, high sensitivity, vibration resistance, and low price.
(2) It can detect the volume of sound, whether there is sound, whistle, and the sound intensity can be detected; but it cannot identify special frequencies (3) The
module uses LM393 voltage comparator chip for AD conversion to reduce interference and standardize the digital output waveform
(4) Working voltage 3.3V-5V DC power supply
(5) The module has two output forms:
AO analog output, which outputs the voltage signal of the microphone in real time, and can be
used as a simple decibel sensor directly using DO digital switch output. When the sound intensity reaches a certain When the threshold is reached, high and low level signals are output
(6) Threshold inversion level output, adjustable sensitivity (blue digital potentiometer adjustment in the figure)
(7) There is a power indicator and a status indicator for comparator output
(8) There are 3mm fixing bolt holes for easy installation
(9) This module is more suitable for ordinary voice-activated switches, with photosensitive sensors for sound and light alarms, and for simple sound amplification and sound detection.

insert image description here

Sound sensor module interface definition
(1) AO: sensor analog output
(2) DO: digital output (comparator output)
(3) GND: ground
(4) VCC: power input, range: 3V-24V

insert image description here
insert image description here
Instructions for use
(1) The sound module is most sensitive to the sound intensity of the environment, and is generally used to detect the sound intensity of the surrounding environment.
(2) When the ambient sound intensity of the module does not reach the set threshold, the DO port outputs a high level, and when the external ambient sound intensity exceeds the set threshold, the module D0 outputs a low level; (3) Small board digital output
D0 It can be directly connected to the single-chip microcomputer, and the high and low levels can be detected by the single-chip microcomputer, so as to detect the sound of the environment; (
4) The digital output DO of the small board can directly drive the relay module, thus forming a voice-activated switch.
insert image description here

Eagler8 series experiment program list
Tenth extended experiment
25 4-wire sound sensor module (trigger type analog A3 and digital D7 interface)
Project 1: Test A3 analog interface, serial port to read environmental sound waveform

Arduino experiment open source code

/*
Eagler8系列实验程序列表
第十类 扩展实验
25 4线制声音传感器模块(触发类模拟A3与数字D7接口)
项目一:测试A3模拟接口,串口读取环境声音波形
*/

void setup()
{
    
    
  Serial.begin(9600);
  pinMode(A3,INPUT);
}

void loop()
{
    
    
  Serial.println(analogRead(A3));
  delay(100);
}

Experimental serial port return

insert image description here
Eagler8 series experiment program list
Tenth extended experiment
25 4-wire sound sensor module with electret microphone (trigger type digital D7 interface)
Project 2: Digital D7 interface, sound trigger control onboard D12 LED light on and off

Arduino experiment open source code

/*
Eagler8系列实验程序列表
第十类 扩展实验
25 带驻极话筒4线制声音传感器模块(触发类数字D7接口)
项目二:数字D7接口,声音触发控制板载D12 LED灯亮暗
*/

void setup()
{
    
    
    pinMode(7,INPUT);
    pinMode(12,OUTPUT);
}

void loop() {
    
    
  if (digitalRead(7)) {
    
    
    digitalWrite(12, HIGH);
  }
  else {
    
    
    digitalWrite(12, LOW);
  }
}

Experimental open source graphics programming (Mind+, programming while learning)

insert image description here
Experimental open source simulation programming (Linkboy V5.33)

insert image description here
insert image description here
insert image description here
Arduino experiment scene diagram

insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/weixin_41659040/article/details/132463974