Stufin
Home Quick Cart Profile

M5 Stick Microphone Unit (LM393)

Buy Now on Stufin

Type

Low Noise Operational Amplifier (LM393)

Sensitivity

High sensitivity, capable of detecting faint sounds

Frequency Response

50 Hz to 15 kHz, with a flat frequency response curve

Impedance

2.2 k

### Amplifier

Gain

Adjustable gain setting, allowing for customization of the signal amplification

Noise Floor

Extremely low noise floor, ensuring a high signal-to-noise ratio (SNR)

### Module Specifications

Operating Voltage

3.3 V to 5 V

Current Consumption

Typically 2 mA, with a maximum of 5 mA

Interface

Compatible with 3.3 V and 5 V logic systems

Dimensions

19.5 mm (L) x 14.5 mm (W) x 8.5 mm (H)

### Additional Features

Analog Output

The module provides a direct analog output of the amplified audio signal

Power Indicator

An onboard LED indicator shows the module's power status

Header Pins

Convenient header pins for easy connection to a breadboard or PCB

Applications

--------------

The M5 Stick Microphone Unit (LM393) is suitable for a wide range of IoT applications, including

Smart home devices and automation systems

Wearable devices and fitness trackers

Robotics and autonomous systems

Industrial monitoring and control systems

Conclusion

----------

The M5 Stick Microphone Unit (LM393) is a highly sensitive and accurate microphone module, ideal for various IoT applications. Its compact design, low power consumption, and adjustable gain setting make it a versatile solution for capturing and amplifying audio signals in a wide range of environments.

Pin Configuration

  • M5 Stick Microphone Unit (LM393) Pinout Guide
  • The M5 Stick Microphone Unit (LM393) is a compact, high-sensitivity microphone module designed for various IoT applications. This documentation provides a detailed explanation of each pin and its connection guidelines.
  • Pinout Structure:
  • The M5 Stick Microphone Unit (LM393) has a total of 4 pins, labeled as follows:
  • 1. GND (Ground)
  • 2. VCC (Power Supply)
  • 3. OUT (Audio Output)
  • 4. SCP (Signal Control Pin)
  • Pin Description and Connection Guidelines:
  • ### 1. GND (Ground)
  • Purpose: Provides a common ground reference for the microphone module.
  • Connection: Connect to the ground pin of your microcontroller or development board.
  • ### 2. VCC (Power Supply)
  • Purpose: Supplies power to the microphone module.
  • Connection: Connect to a power source providing 3.3V to 5V DC. Ensure the voltage supply meets the recommended operating voltage range.
  • ### 3. OUT (Audio Output)
  • Purpose: Outputs the amplified audio signal from the microphone.
  • Connection:
  • + Connect to an analog-to-digital converter (ADC) pin on your microcontroller or development board.
  • + Use a capacitor (e.g., 10uF) in series with the OUT pin to filter out high-frequency noise, if necessary.
  • ### 4. SCP (Signal Control Pin)
  • Purpose: Enables or disables the microphone output signal.
  • + When SCP is connected to GND, the microphone output is enabled.
  • + When SCP is connected to VCC, the microphone output is disabled.
  • Connection:
  • + Connect to a digital output pin on your microcontroller or development board to control the microphone output.
  • + Leave the SCP pin floating or connect to GND if you want the microphone to be always enabled.
  • Connection Example:
  • To connect the M5 Stick Microphone Unit (LM393) to an Arduino board, follow this example:
  • GND -> Arduino GND
  • VCC -> Arduino 3.3V or 5V
  • OUT -> Arduino A0 (or any available analog input pin)
  • SCP -> Arduino Digital Pin (e.g., D2) or GND (to keep the microphone always enabled)
  • Remember to adjust the connections according to your specific microcontroller or development board. Ensure proper voltage and signal levels to avoid damage to the microphone module or other components.

Code Examples

M5 Stick Microphone Unit (LM393) Documentation
Overview
The M5 Stick Microphone Unit (LM393) is a compact, high-sensitivity analog microphone module designed for various IoT applications. It features the LM393, a low-noise, low-voltage, and high-gain amplifier, which allows for accurate sound detection and amplification. This module is compatible with the M5Stick series of development boards.
Technical Specifications
Microphone type: Analog
 Sensitivity: -40 dB
 Frequency response: 100 Hz - 10 kHz
 Amplifier: LM393
 Operating voltage: 3.3V - 5V
 Interface: Analog output
pinout
VCC: Power supply (3.3V - 5V)
 GND: Ground
 OUT: Analog output
Code Examples
### Example 1: Basic Sound Detection using Arduino
In this example, we will use the M5 Stick Microphone Unit to detect sound levels and output the values to the serial monitor.
Hardware Requirements
M5Stick (e.g., M5StickC)
 M5 Stick Microphone Unit (LM393)
 Breadboard and jumper wires
Software Requirements
Arduino IDE
Code
```c++
const int micPin = A0;  // Connect microphone output to A0
void setup() {
  Serial.begin(115200);
}
void loop() {
  int soundValue = analogRead(micPin);
  Serial.print("Sound level: ");
  Serial.println(soundValue);
  delay(50);
}
```
In this example, we read the analog output from the microphone module using `analogRead()` and print the values to the serial monitor. You can adjust the threshold value to detect various sound levels.
### Example 2: Sound-controlled LED using MicroPython
In this example, we will use the M5 Stick Microphone Unit to control an LED based on sound levels.
Hardware Requirements
M5Stick (e.g., M5StickC)
 M5 Stick Microphone Unit (LM393)
 LED
 Breadboard and jumper wires
Software Requirements
MicroPython
Code
```python
import machine
import utime
mic_pin = machine.ADC(machine.Pin(32))  # Connect microphone output to Pin 32
led_pin = machine.Pin(2, machine.Pin.OUT)  # Connect LED to Pin 2
while True:
    sound_value = mic_pin.read_u16()
    if sound_value > 500:  # Adjust threshold value as needed
        led_pin.value(1)  # Turn on LED
    else:
        led_pin.value(0)  # Turn off LED
    utime.sleep(0.1)
```
In this example, we read the analog output from the microphone module using `machine.ADC()` and control the LED based on the sound level. You can adjust the threshold value to detect various sound levels.
Additional Resources
For more information on the LM393 amplifier, refer to the [Texas Instruments LM393 datasheet](https://www.ti.com/lit/ds/symlink/lm393.pdf).
 For M5Stick development board documentation, refer to the [M5Stack documentation](https://docs.m5stack.com/en/).
Troubleshooting
Ensure proper connection of the microphone module to the development board.
 Adjust the gain of the amplifier by adding a potentiometer or a fixed resistor to the output stage.
 Use a shielded cable to connect the microphone module to the development board to reduce noise interference.