meta data for this page
This is an old revision of the document!
LM393: Dual differential comparator (flame, light, sound sensors)
The LM393 is a widely used dual-channel voltage comparator IC. On modules like the Flame Sensor, BME breakout boards, or Speed Sensors, it acts as the “brain” that converts messy analog signals into clean digital high/low signals.
LM393 Technical Description
The IC contains two independent voltage comparators that can operate from a single power supply.
| Feature | Specification |
|---|---|
| Supply Voltage | 2V to 36V (Supports both 3.3V and 5V logic) |
| Output Type | Open Collector (Requires a pull-up resistor to work) |
| Channels | 2 Independent Comparators |
| Response Time | ~1.3 microseconds (Fast enough for most DIY sensors) |
| Low Power | ~0.4 mA current draw |
LM393 Module
LM393 (KY-026) Flame Sensor (IR) Module
LM393 (HW-484, KY-037, KY-038) High-Sensitivity Sound Detection Module
LM393 (FC-03, HC-89) Infrared Speed Sensor Module
LM393 (KY-024) Hall Sensor Module
LM393 Flame Sensor (IR) Module
The LM393 (KY-026) Flame Sensor is an infrared (IR) based detector specifically tuned to sense wavelengths between 760nm and 1100nm, which are typically emitted by a fire. It features an onboard LM393 comparator to provide a clean digital signal, along with a potentiometer for sensitivity adjustment.
LM393 Flame Sensor Technical Specifications
- Operating Voltage: 3.3V to 5V DC
- Spectral Range: 760nm to 1100nm
- (Infrared)Detection Angle: Approximately 60 degrees
- Detection Distance: Up to ~1 meter (0.8m for lighter flames)
- Output Type: Digital (DO: 0 or 1) and Analog (AO: voltage level)
- Comparator IC: LM393
- Sensitivity: Adjustable via onboard potentiometer
- Indicators: Power LED (Red) and Status/Signal LED (Green)
- Operating Temp: -25°C to +85°C
LM393 Flame Sensor Pinout
| Pin Label | Function | Connection to Microcontroller |
|---|---|---|
| VCC | Power Supply (3.3V – 5V) | 3V3 |
| GND | Ground | GND |
| DO | Digital Output (0 or 1) | Any Digital Pin (e.g., GP16) |
| AO | Analog Output (Voltage) | Any ADC Pin (e.g., GP26) |
- Digital Output (DO): Provides a simple logic signal. By default, it stays HIGH. When a flame is detected and exceeds the potentiometer's threshold, the signal goes LOW.
- Analog Output (AO): Sends a real-time voltage signal. The voltage decreases as the flame intensity (or proximity) increases.
- Sensitivity Adjustment: Turning the onboard potentiometer clockwise increases sensitivity (longer detection range), while turning it counter-clockwise decreases it.
Important Safety Note
The photodiode is heat-sensitive. To prevent damage, keep it at least 80 cm away from the flame, such as a standard lighter.
LM393 High-Sensitivity Sound Detection Module
The HW-484 typically refers to a High-Sensitivity Sound Detection Sensor module (similar to the KY-037 or KY-038) or, in some markets, a (LM-393) Flame Sensor module. Both versions use the LM393 comparator you just asked about to provide both analog and digital outputs.
This module employs a small electret microphone to measure ambient noise levels. It detects sound vibrations and transforms them into electrical signals. The sensitivity can be adjusted using the onboard potentiometer. Ideal applications include clap-activated switches, noise monitoring, and security alarms. It is optimized for capturing human voices and sharp sounds such as claps and knocks within the 50Hz to 20kHz frequency range.
LM393 Sound Sensor Pinout
| Pin Label | Function | Connection to Microcontroller |
|---|---|---|
| VCC | Power Supply (3.3V – 5V) | 3V3 |
| GND | Ground | GND |
| DO | Digital Output (0 or 1) | Any Digital Pin (e.g., GP16) |
| AO | Analog Output (Voltage) | Any ADC Pin (e.g., GP26) |
- Digital Output (DO): Provides a simple logic signal. By default, it stays HIGH. When a flame is detected and exceeds the potentiometer's threshold, the signal goes LOW.
- Analog Output (AO): Sends a real-time voltage signal. The voltage decreases as the flame intensity (or proximity) increases.
- Sensitivity Adjustment: Turning the onboard potentiometer clockwise increases sensitivity (longer detection range), while turning it counter-clockwise decreases it.
LM393 Infrared Speed Sensor Module
The Infrared Speed Sensor, often labelled FC-03 or HC-89, is a “fork” or “U-shaped” sensor designed to measure motor RPM, speed, or position. The LM393 module acts as an infrared counter with integrated transmitter and receiver. When an obstacle blocks the sensor, it sends a signal to the microcontroller. This configuration is ideal for use with a microcontroller in applications like motor speed measurement, pulse counting, and setting positioning limits.
LM393 Hall Sensor Module
The KY-024 Hall Sensor module detects magnetic fields using a linear Hall-effect sensor and an LM393 comparator. It provides both analog and digital outputs to indicate magnetic strength and presence. When a magnet is nearby, the output varies with the field strength or a set threshold.
Sensor topics on lamaPLC
This page has been accessed for: Today: 16, Until now: 18
