Phone

    00852-6915 1330

How LM393 Comparator Applied in Circuits? (Examples Analysis)

  • Contents

I Introduction

The LM393 is a dual voltage comparator. this means that it accepts 2 inputs for comparison.

The output load resistance of LM393 comparator can be connected to any power supply voltage within the allowable power supply voltage range, and is not limited by the voltage value of the Vcc terminal. This output can be used as a simple open circuit to ground SPS (when the load resistor is not used), the sink current of the output part is limited by the β value of the driver and the device that can be obtained. When the limit current (16mA) is reached, the output transistor will exit and the output voltage will rise quickly.

In this blog, we will discuss 3 ways to use the LM393 comparator to build circuits, including: Infrared Obstacle Avoidance Module, Ni-Cd Battery Charger, and PWM Modulation Circuit.

LM393 images are for reference only.

LM393 comparatorFigure 1. LM393 Comparator


Catalog

I Introduction

II LM393 Based Infrared Obstacle Avoidance Module

2.1 Module Description

2.2 Description of Module Parameters

2.3 Module Interface Description

III LM393 Ni-Cd Battery Charger

IV LM393 PWM Modulation Circuit

Ordering & Quantity


II LM393 Based Infrared Obstacle Avoidance Module

LM393 circuit

Figure 2. LM393 Infrared Obstacle Avoidance Module

2.1 Module Description

The sensor module has strong adaptability to ambient light. It has a pair of infrared emitting and receiving tubes. The transmitting tube emits infrared rays of a frequency. When it encounters an obstacle (reflecting surface) in the detection direction, it will be reflected back and received by the receiving tube.

After the received infrared light is processed by the comparator circuit, the green indicator light will light up, and the signal output interface outputs a digital signal (a low-level signal). The detection distance can be adjusted by the potentiometer knob. The effective distance range is 2-30cm, and the operating voltage It is 3.3V-5V.

The detection distance of the sensor can be adjusted by a potentiometer, which has the characteristics of small interference, easy assembly and convenient use. It can be widely used in many situations such as robot obstacle avoidance, obstacle avoidance trolley, pipeline counting and black and white line tracking.

2.2 Description of Module Parameters

  • When the module detects an obstacle signal in front, the green indicator on the circuit board lights up, and the OUT port continuously outputs a low-level signal. The detection distance of this module is 2~30cm, and the detection angle is 35°. In addition, the detection distance can be adjusted by the potentiometer: By adjusting the potentiometer clockwise, the detection distance increases; By adjusting the potentiometer counterclockwise, the detection distance decreases;
  • The sensor is active infrared reflection detection, so the reflectivity and shape of the target is the key to the detection distance. Among them, the black detection distance is small and the white is large; the distance of small areas is small, and the distance of large areas is large;
  • The output port OUT of the sensor module can be directly connected to the IO port of the single-chip microcomputer, or it can directly drive a 5V relay; connection mode: VCC-VCC; GND-GND; OUT-IO;
  • The LM393 comparator has the characteristics of stable operation;
  • 3-5V DC power supply can be used to power the module. When the power is turned on, the red power indicator lights;
  • has 3mm screw holes for easy fixing and installation;
  • Circuit board size: 3.2CM*1.4CM;
  • The module has adjusted the threshold comparison voltage through the potentiometer. Unless under special circumstances, please do not adjust the potentiometer at will.

2.3 Module Interface Description

  •  VCC external 3.3V-5V voltage (can be directly connected to 5v microcontroller and 3.3v microcontroller);
  •  Connect GND externally to GND;
  •  OUT small board digital output interface (0 and 1);
  •  The working current is within 10ma;

Barrier sensor module as shown in Figure 3.

infrared reflective sensor module

Figure 3. Infrared Reflective Sensor Module

III LM393 Ni-Cd Battery Charger

The cost-effective nickel-cadmium battery charger formed by LM393 comparator is shown in Figure 4, which has the following characteristics:

LM393 circuit

Figure 4. Nickel-Cadmium Battery Charger

  • Constant current charging is interspersed with large current discharge. The constant current charging current is about 300mA, and the discharge current increases as the battery voltage increases. When the battery is nearly full, the discharge current reaches 400mA. Charge for 1.5 seconds and discharge for 0.5 seconds at intervals. After the high current charging is completed, there is about 5mA trickle charging.
  • The battery voltage is detected during discharge. Because the voltage during charging is always higher than the voltage during discharging. If there is an error between the detection and the actual working state of the battery during charging, the detection can more reflect the capacity of the battery when discharging.
  • The number of rechargeable batteries can be 1 to 4. For 500mAh nickel-cadmium batteries, the charging time is about 2 hours, which can meet the general needs.

IV LM393 PWM Modulation Circuit

We know that PWM generally requires a sawtooth wave and a control voltage to be compared with a comparator to obtain a PWM pulse. The comparator 2 of LM393 votage comparator will be used as a PWM comparator, whose non-inverting input end is the control voltage input end, and the inverting input end is the sawtooth wave input end. The output terminal (pin 7) is used as the output terminal to send the PWM dimming signal to the IRN pin of the IRS2540/1 via the isolation diode VD.

The LM393 circuit of PWM Modulation is shown in Figure 5 below.

LM393 circuit

Figure 5. PWM Modulation Circuit

The generation of the sawtooth wave is realized by the comparator 1 of LM393. If you do not look at the capacitor C1, the comparator 1 is a multivibrator with a square wave output. In order to obtain the sawtooth wave, a capacitor C1 is connected in parallel with the COM end of the output end of the comparator 1.

This is actually the charging process of the output terminals R1 and C1 of the comparator 1. If the capacitance of this capacitor is large enough, but because the charging of C1 requires R1, and the discharge of C1 is the output transistor of the comparator, then the rise and fall of the voltage at the output of the comparator will be asymmetric, which will form an oscillating sawtooth wave.

oscillating sawtooth waveFigure 6. Oscillating Sawtooth Wave

Due to the VBUS application of the power supply of the circuit in the figure, it needs to be stepped down with RS, and the voltage regulation of VD2 and the power supply bypass capacitors C3 and C4 are required.

 

After reading the blog, have you better understand LM393? If you are also interested in how to DIY your solar tracking car by using LM393 , you may wish to browse right here right now!

Finally, if you have any questions about LM393, please do not hesitate to leave a message in the comment section below!

Kynix

Kynix was founded in 2008, specializing in the electronic components distribution business. We adhere to honesty and ethics as our business philosophy and have gradually established an excellent reputation and credibility in our international business. With the accurate quotation, excellent credit, reasonable price, reliable quality, fast delivery, and authentic service, we have won the praise of the majority of customers.

Join our mailing list!

Be the first to know about new products, special offers, and more.

Leave a Reply

We'd love to hear from you! Feel free to share your thoughts and comments below. Rest assured, your email address will remain private.

Name *
Email *
Captcha *
Rating:

Kynix

  • How to purchase

  • Order
  • Search & Inquiry
  • Shipping & Tracking
  • Payment Methods
  • Contact Us

  • Tel: 00852-6915 1330
  • Email: info@kynix.com
  • Follow Us

authentication

Kynix

© 2008-2026 kynix.com all rights reserved.