Chip-cn-dat/denovocn-dat/MSM261S4030H0R-dat/2024-12-26-15-04-51.png
... ...
Binary files /dev/null and b/Chip-cn-dat/denovocn-dat/MSM261S4030H0R-dat/2024-12-26-15-04-51.png differ
Chip-cn-dat/denovocn-dat/MSM261S4030H0R-dat/2024-12-26-15-05-41.png
... ...
Binary files /dev/null and b/Chip-cn-dat/denovocn-dat/MSM261S4030H0R-dat/2024-12-26-15-05-41.png differ
Chip-cn-dat/denovocn-dat/MSM261S4030H0R-dat/MSM261S4030H0R-dat.md
... ...
@@ -0,0 +1,12 @@
1
+
2
+# MSM261S4030H0R-dat
3
+
4
+- https://www.denovocn.com/sites/default/files/MSM261S4030H0R.pdf
5
+
6
+![](2024-12-26-15-04-51.png)
7
+
8
+## SCH
9
+
10
+![](2024-12-26-15-05-41.png)
11
+
12
+- [[I2S-dat]]
... ...
\ No newline at end of file
Chip-dat/InvenSense-dat/INMP441-dat/2024-12-26-15-08-01.png
... ...
Binary files /dev/null and b/Chip-dat/InvenSense-dat/INMP441-dat/2024-12-26-15-08-01.png differ
Chip-dat/InvenSense-dat/INMP441-dat/INMP441-code.ino
... ...
@@ -0,0 +1,108 @@
1
+
2
+/*
3
+ESP32 I2S Microphone Sample
4
+esp32-i2s-mic-sample.ino
5
+Sample sound from I2S microphone, display on Serial Plotter
6
+Requires INMP441 I2S microphone
7
+
8
+Faranux Electronics
9
+*/
10
+
11
+// Include I2S driver
12
+#include <driver/i2s.h>
13
+
14
+// Connections to INMP441 I2S microphone
15
+#define I2S_WS 25
16
+#define I2S_SD 33
17
+#define I2S_SCK 32
18
+
19
+// Use I2S Processor 0
20
+#define I2S_PORT I2S_NUM_0
21
+
22
+// Define input buffer length
23
+#define bufferLen 64
24
+int16_t sBuffer[bufferLen];
25
+
26
+void i2s_install()
27
+{
28
+ // Set up I2S Processor configuration
29
+ const i2s_config_t i2s_config = {
30
+ .mode = i2s_mode_t(I2S_MODE_MASTER | I2S_MODE_RX),
31
+ .sample_rate = 44100,
32
+ //.sample_rate = 11025, if you like
33
+ .bits_per_sample = i2s_bits_per_sample_t(16),
34
+ .channel_format = I2S_CHANNEL_FMT_ONLY_LEFT,
35
+ //.communication_format = i2s_comm_format_t(I2S_COMM_FORMAT_STAND_I2S),
36
+ .communication_format = i2s_comm_format_t(I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB),
37
+ .intr_alloc_flags = 0,
38
+ .dma_buf_count = 8,
39
+ .dma_buf_len = bufferLen,
40
+ .use_apll = false};
41
+
42
+ i2s_driver_install(I2S_PORT, &i2s_config, 0, NULL);
43
+}
44
+
45
+void i2s_setpin()
46
+{
47
+ // Set I2S pin configuration
48
+ const i2s_pin_config_t pin_config = {
49
+ .bck_io_num = I2S_SCK,
50
+ .ws_io_num = I2S_WS,
51
+ .data_out_num = -1,
52
+ .data_in_num = I2S_SD};
53
+
54
+ i2s_set_pin(I2S_PORT, &pin_config);
55
+}
56
+
57
+void setup()
58
+{
59
+
60
+ // Set up Serial Monitor
61
+ Serial.begin(115200);
62
+ Serial.println(" ");
63
+
64
+ delay(1000);
65
+
66
+ // Set up I2S
67
+ i2s_install();
68
+ i2s_setpin();
69
+ i2s_start(I2S_PORT);
70
+
71
+ delay(500);
72
+}
73
+
74
+void loop()
75
+{
76
+
77
+ // False print statements to "lock range" on serial plotter display
78
+ // Change rangelimit value to adjust "sensitivity"
79
+ int rangelimit = 3000;
80
+ Serial.print(rangelimit * -1);
81
+ Serial.print(" ");
82
+ Serial.print(rangelimit);
83
+ Serial.print(" ");
84
+
85
+ // Get I2S data and place in data buffer
86
+ size_t bytesIn = 0;
87
+ esp_err_t result = i2s_read(I2S_PORT, &sBuffer, bufferLen, &bytesIn, portMAX_DELAY);
88
+
89
+ if (result == ESP_OK)
90
+ {
91
+ // Read I2S data buffer
92
+ int16_t samples_read = bytesIn / 8;
93
+ if (samples_read > 0)
94
+ {
95
+ float mean = 0;
96
+ for (int16_t i = 0; i < samples_read; ++i)
97
+ {
98
+ mean += (sBuffer[i]);
99
+ }
100
+
101
+ // Average the data reading
102
+ mean /= samples_read;
103
+
104
+ // Print to serial plotter
105
+ Serial.println(mean);
106
+ }
107
+ }
108
+}
... ...
\ No newline at end of file
Chip-dat/InvenSense-dat/INMP441-dat/INMP441-code/INMP441-code.ino
... ...
@@ -1,108 +0,0 @@
1
-
2
-/*
3
-ESP32 I2S Microphone Sample
4
-esp32-i2s-mic-sample.ino
5
-Sample sound from I2S microphone, display on Serial Plotter
6
-Requires INMP441 I2S microphone
7
-
8
-Faranux Electronics
9
-*/
10
-
11
-// Include I2S driver
12
-#include <driver/i2s.h>
13
-
14
-// Connections to INMP441 I2S microphone
15
-#define I2S_WS 25
16
-#define I2S_SD 33
17
-#define I2S_SCK 32
18
-
19
-// Use I2S Processor 0
20
-#define I2S_PORT I2S_NUM_0
21
-
22
-// Define input buffer length
23
-#define bufferLen 64
24
-int16_t sBuffer[bufferLen];
25
-
26
-void i2s_install()
27
-{
28
- // Set up I2S Processor configuration
29
- const i2s_config_t i2s_config = {
30
- .mode = i2s_mode_t(I2S_MODE_MASTER | I2S_MODE_RX),
31
- .sample_rate = 44100,
32
- //.sample_rate = 11025, if you like
33
- .bits_per_sample = i2s_bits_per_sample_t(16),
34
- .channel_format = I2S_CHANNEL_FMT_ONLY_LEFT,
35
- //.communication_format = i2s_comm_format_t(I2S_COMM_FORMAT_STAND_I2S),
36
- .communication_format = i2s_comm_format_t(I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB),
37
- .intr_alloc_flags = 0,
38
- .dma_buf_count = 8,
39
- .dma_buf_len = bufferLen,
40
- .use_apll = false};
41
-
42
- i2s_driver_install(I2S_PORT, &i2s_config, 0, NULL);
43
-}
44
-
45
-void i2s_setpin()
46
-{
47
- // Set I2S pin configuration
48
- const i2s_pin_config_t pin_config = {
49
- .bck_io_num = I2S_SCK,
50
- .ws_io_num = I2S_WS,
51
- .data_out_num = -1,
52
- .data_in_num = I2S_SD};
53
-
54
- i2s_set_pin(I2S_PORT, &pin_config);
55
-}
56
-
57
-void setup()
58
-{
59
-
60
- // Set up Serial Monitor
61
- Serial.begin(115200);
62
- Serial.println(" ");
63
-
64
- delay(1000);
65
-
66
- // Set up I2S
67
- i2s_install();
68
- i2s_setpin();
69
- i2s_start(I2S_PORT);
70
-
71
- delay(500);
72
-}
73
-
74
-void loop()
75
-{
76
-
77
- // False print statements to "lock range" on serial plotter display
78
- // Change rangelimit value to adjust "sensitivity"
79
- int rangelimit = 3000;
80
- Serial.print(rangelimit * -1);
81
- Serial.print(" ");
82
- Serial.print(rangelimit);
83
- Serial.print(" ");
84
-
85
- // Get I2S data and place in data buffer
86
- size_t bytesIn = 0;
87
- esp_err_t result = i2s_read(I2S_PORT, &sBuffer, bufferLen, &bytesIn, portMAX_DELAY);
88
-
89
- if (result == ESP_OK)
90
- {
91
- // Read I2S data buffer
92
- int16_t samples_read = bytesIn / 8;
93
- if (samples_read > 0)
94
- {
95
- float mean = 0;
96
- for (int16_t i = 0; i < samples_read; ++i)
97
- {
98
- mean += (sBuffer[i]);
99
- }
100
-
101
- // Average the data reading
102
- mean /= samples_read;
103
-
104
- // Print to serial plotter
105
- Serial.println(mean);
106
- }
107
- }
108
-}
... ...
\ No newline at end of file
Chip-dat/InvenSense-dat/INMP441-dat/INMP441-dat.md
... ...
@@ -3,6 +3,12 @@
3 3
4 4
https://invensense.tdk.com/wp-content/uploads/2015/02/INMP441.pdf
5 5
6
+
7
+## Pins
8
+
9
+![](2024-12-26-15-08-01.png)
10
+
11
+
6 12
## wiring to ESP32
7 13
8 14
![](2024-12-26-14-41-42.png)
... ...
@@ -12,3 +18,7 @@ https://invensense.tdk.com/wp-content/uploads/2015/02/INMP441.pdf
12 18
- [[INMP441-code.ino]]
13 19
14 20
21
+
22
+## ref
23
+
24
+- [[I2S-dat]]
Tech-dat/Interface-dat/I2S-dat/I2S-dat.md
... ...
@@ -24,9 +24,9 @@ This makes I2S a popular choice for high-speed data transfer applications.
24 24
25 25
## Solution
26 26
27
-I2S Output Digital Microphone - [[INMP441-dat]] - [[ICS-43434-dat]] - [[SPH0645-dat]]
27
+I2S Output Digital Microphone - [[INMP441-dat]] - [[ICS-43434-dat]] - [[SPH0645-dat]] - [[MSM261S4030H0R-dat]]
28 28
29
-- [[WM8960-dat]]
29
+- [[WM8960-dat]] - [[WM8978-dat]]
30 30
31 31
- [[PCM5102-dat]] - [[AMP1006-dat]]
32 32
... ...
@@ -36,10 +36,14 @@ I2S Output Digital Microphone - [[INMP441-dat]] - [[ICS-43434-dat]] - [[SPH0645-
36 36
37 37
- [[bt-audio-dat]] - [[ESP32-DAC-dat]] - [[ADC-dat]]
38 38
39
-- [[ES9023-dat]] - [[MPC1111-dat]]
39
+- [[ES9023-dat]] - [[MPC1111-dat]] - [[ES9018-dat]]
40 40
41 41
- [[PCM1808-dat]]
42 42
43
+- audio amplifer - [[MAX98357-dat]]
44
+
45
+
46
+
43 47
## ref
44 48
45 49
https://en.wikipedia.org/wiki/I%C2%B2S