DIYables Comparator Module LM393 Analog Digital Output, 5 Pack Presoldered, Arduino
Click to zoom




Quick Overview
The DIYables LM393 Comparator Module turns almost any resistive sensor into a signal your microcontroller can act on. The connected sensor forms a voltage divider whose raw level appears on the analog output (AO) pin, and that same signal is fed into an LM393 high precision comparator to produce a clean logic level on the digital output (DO) pin. The board runs on a 3.3V to 5V supply, so it drops into Arduino, ESP32, ESP8266, and Raspberry Pi projects without extra level shifting.
A built-in potentiometer sets the switching point. When the sensor resistance falls past the threshold you dial in, DO goes LOW, and it stays HIGH the rest of the time, so retuning the trigger point never means editing your sketch. Two onboard LEDs make calibration easy to watch: the power LED confirms the module is energized, and the status LED lights whenever the digital output trips. Header pins arrive presoldered and a mounting hole is provided for permanent installation.
Ideal for light sensing with an LDR or photoresistor, soil moisture and rain detection, thermistor temperature thresholds, flame and gas detection, water level alarms, and any project that needs a simple adjustable trigger alongside a raw analog reading.
Key Features
- LM393 High Precision Comparator — Onboard LM393 comparator digitizes the signal from a connected resistive sensor into a clean HIGH or LOW logic level
- Analog Output (AO) — Raw analog voltage from the sensor divider for reading with an ADC when you need the full value, not just a threshold
- Digital Output (DO) — Comparator result on a separate pin so any digital input can detect the trigger without an ADC
- Adjustable Threshold — Built-in potentiometer sets the switching point, letting you retune sensitivity without changing your code
- Wide Input Voltage — Accepts 3.3V to 5V DC, matching both 5V and 3.3V microcontroller supplies
- Power Indicator LED — Lights whenever the module is powered, giving instant confirmation of a good supply connection
- Status Indicator LED — Lights when the digital output goes LOW, so threshold calibration can be done by eye
- Mounting Hole — Onboard hole for screw mounting the module in enclosures and permanent installations
- Presoldered Header — Header pins arrive presoldered and ready for jumper wires, no soldering required
- Wide Compatibility — Works with Arduino, ESP32, ESP8266, Raspberry Pi, and any microcontroller with a digital or analog input
- 5 Pack Value Set — Five modules for multi-sensor builds, classroom sets, or spares on the workbench
- Versatile Applications — Light, moisture, rain, temperature, flame, gas, and water level detection circuits
SPECIFICATION
| Specification | Value |
|---|---|
| Product Type | LM393 Comparator Module |
| Model/Chip | LM393 dual differential comparator |
| Input Voltage | 3.3V to 5V DC |
| Output Type | Analog output (AO) and digital output (DO) |
| Digital Output Logic | LOW when sensor resistance passes the threshold, HIGH otherwise |
| Threshold Adjustment | Built-in potentiometer |
| Indicators | Power LED and digital output status LED |
| Mounting | Mounting hole for screw installation |
| Header | Presoldered |
| Package Quantity | 5 pieces |
| Compatibility | Arduino, ESP32, ESP8266, Raspberry Pi, Raspberry Pi Pico |
| Applications | Light sensing, soil moisture, rain detection, temperature thresholds, flame and gas detection |
PACKAGE
A package includes:
| Qty | Items |
|---|---|
| 5 | LM393 comparator modules |
COMPATIBLE HARDWARE
- Arduino boards (UNO, Mega, Nano, etc.) — Digital input for DO, analog input for AO, 5V supply
- Arduino Uno R4 WiFi/Minima — Digital and analog inputs, 5V or 3.3V supply
- Arduino Nano ESP32 — Digital and analog inputs, 3.3V supply
- ESP32 development boards — Digital input for DO, ADC pin for AO, 3.3V supply
- ESP8266 boards (NodeMCU, Wemos D1, etc.) — Digital input for DO, single A0 pin for AO, 3.3V supply
- Raspberry Pi (all models) — Digital GPIO input for DO, external ADC needed to read AO, 3.3V supply
- Raspberry Pi Pico — Digital GPIO for DO, onboard ADC for AO, 3.3V supply
- Any microcontroller with a digital input — Supply the module at 3.3V to 5V and match its logic level
- Resistive sensors (LDR, thermistor, soil moisture, rain, flame, gas) — Connect in place of the sensing element