We are Apogeeweb Semiconductor Electronic

WELCOME TO OUR BLOG

Home  Product Technical Articles   LM358 Comparator: IR Sensor Circuit [FAQ]

LM358 Comparator: IR Sensor Circuit [FAQ]

Author: Mia Date: 20 Feb 2021  2001

lm358 applications

I Introduction

Infrared sensor circuits have been widely used in modern life. How come? Due to its characteristics of low power consumption, high reliability, and small mutual interference. For example, a bank opens and closes automatically. When a person walks into the bank, the door opens automatically, and the door closes after leaving. Or the faucet in restaurants such as KFC. When our hands placed under the faucet, the water automatically flows out. And when our hands leave the faucet, the water automatically shuts off. All the above scenarios apply infrared sensor technology.

This blog will lead you to understand LM358 infrared sensor circuits that bring convenience to our lives.

lm358

Catalog

I Introduction

II Circuit Sructure and Woking Principle

III Circuit Design

3.1 Infrared Sensor Circuit

3.2 Sampling Comparator Circuit

3.3 Test Result

IV Ways for Infrared Sensor Circuit Debugging

4.1 Observation

4.2 Resistance

4.3 Basic Circuit Analysis

V Conclusion

Component Datasheet

FAQ

Ordering & Quantity

II Circuit Sructure and Woking Principle

The infrared sensor circuit is composed of the following circuits:

  • Infrared Sensor Circuit. Infrared sensor circuit with infrared transmitting tube D1 and infrared receiving tube D2 as the core;
  • Sampling Comparator Circuit. Sampling comparator circuit with adjustable resistance R3 and general operational amplifier LM358 as the core;
  • Sound Output and Display Circuit. A sound output and display circuit with transistor 9012, V1, V2, buzzer Y1, and light-emitting diode D3 as the core components.

The infrared sensor circuit can also realize the situation below. When the hand is close to the infrared transmitting tube and the infrared receiving tube: the buzzer will sound and the LED light will light up. When the hand is removed, the sound will stop and the LED light will go out. From this, we can find that the sensitivity of this circuit is very high. The infrared sensor circuit is applied in many life scenarios. And it is a circuit that circuit designers must master.

III Circuit Design

When we turn on the 5V power supply to the circuit, the infrared emission tube D1 turns on. If there is no obstruction, the infrared receiving tube D2 does not receive infrared light. And the infrared receiving tube D2 is still in the reverse blocking state. The voltage of the negative pole of the infrared receiving tube D2 is still high. And sent to the 3 pins of LM358. When the infrared transmitting tube D1 is approached by hand, the infrared light is blocked. And it reflected to the infrared receiving tube D2. After the infrared receiving tube D2 receives the infrared light, it is turned on immediately. So the voltage of the negative electrode of the infrared receiver tube D2 drops drastically. And this voltage is sent to the 3 pins of the LM358.

3.1 Infrared Sensor Circuit

When we turn on the 5V power supply to the circuit, the infrared emission tube D1 turns on. If there is no obstruction, the infrared receiving tube D2 does not receive infrared light. And the infrared receiving tube D2 is still in the reverse blocking state. The voltage of the negative pole of the infrared receiving tube D2 is still high. And sent to the 3 pins of LM358. When the infrared transmitting tube D1 is approached by hand, the infrared light is blocked. And it reflected to the infrared receiving tube D2. After the infrared receiving tube D2 receives the infrared light, it is turned on immediately. So the voltage of the negative electrode of the infrared receiver tube D2 drops drastically. And this voltage is sent to the 3 pins of the LM358.

3.2 Sampling Comparator Circuit

The voltage of pin 2 of LM358 depends on the adjustable resistor R3. We can adjust the adjustable resistor R3 to a suitable value (the voltage is about 2.5V. So that it can be ensured that the voltage of pin 3 of LM358 is greater than that of pin 2 of LM358. When V+>V-, pin 1 of LM358 will output a high level. And this will be sent to the bases of PNP transistors V1 and V2 through the current limiting resistor R4, causing the transistors V1 and V2 to be cut off. The buzzer Y1 does not sound, and the LED D3 goes out.

If the voltage of pin 3 of LM358 drops to a voltage lower than that of pin 2,it will be a different situation. When V+ <V-, pin 1 of LM358 will output low level and send it through current limiting resistor R4 to PNP transistors V1 and V2. The base makes the transistors V1 and V2 conductive.

lm358

3.3 Test Result

With the above circuit design and analysis, the circuit is ready for the sensing effect. When the hand moves to the top of the infrared emitter D1 and infrared receiver D2, the buzzer sounds and the light-emitting diode lights up. When the hand leaves the top of D1 and D2, the buzzer stops sounding and the light-emitting diode goes out. So far, this infrared sensing circuit design has achieved the effect we wanted!

IV Ways for Infrared Sensor Circuit Debugging

4.1 Observation

Check whether each component is installed correctly. Here, we should pay special attention to the following points:

  1. Positive and negative poles of infrared emitting diode;
  2. Positive and negative poles of infrared receiving diode;
  3. The pin sequence of LM358;
  4. The pin sequence of the transistor 9012.

4.2 Resistance

Check whether the line is connected normally according to the schematic diagram. Here, a multimeter can be used to detect whether each circuit is on. We mainly check the following two places:

  1. Check whether each GND is connected to the negative terminal of the power supply;
  2. Check whether each VCC is connected to the power connector.

4.3 Basic Circuit Analysis

4.3.1 Maintenance of Infrared Transmitting Circuit

The infrared light emitted by the infrared emission circuit is invisible to human eyes. How can we see infrared light? You can use the camera function of your mobile phone. During the maintenance process, you can use the mobile phone to check whether the infrared light-emitting circuit is normal. Here, we mainly check the following two places:

  1. Resistance of current limiting resistor;
  2. Whether the positive and negative polarity of the infrared LED is installed correctly.

4.3.2 Maintenance of Infrared Receiving Circuit

Use a multimeter to measure the cathode of the infrared receiving diode. Here, we need to observe two voltage values:

  1. Observe the voltage value (whether it is a low level) when the infrared emission tube is placed by hand;
  2. The voltage value when the infrared receiver tube is removed by hand (whether it is a high level).

4.3.3 Maintenance of Voltage Sampling Circuit

Test whether the voltage value of the third leg of the adjustable resistor R3 is around 2.5V. Also, when rotating the adjustable resistor, is the voltage value variable?

4.3.4 Maintenance of Voltage Comparator Circuit

Mainly use a multimeter to measure the voltage of pin 1 of LM358. Here, we need to observe two voltage values:

  1. Observe the voltage value of pin 1 of LM358 (whether it is a low level) when the infrared transmitter tube is placed by hand;
  2. Observe the voltage value of pin 1 of LM358 (whether it is a high level) when the hand is removed from the infrared receiving tube.

lm358 comparator circuitFigure 1. LM358 Comparator Circuit

4.3.5 Maintenance of Alarm Circuit and LED Display Circuit

You can directly add the power ground to the base of V1 and V2 to see if the alarm and LED are on. The damaged components may be 9012 and light-emitting diodes.

V Conclusion

This blog has designed a simple and usable infrared sensor circuit. The design of it not only based on the LM358 chips and technology but also using the knowledge of digital and analog circuits. It can also increase the radiation distance by adjusting the resistance of the potentiometer so that the circuit can be used as an alarm.

Of course, this circuit still has some defects. This LM358 infrared sensor circuit is considered to be used in a relatively good external environment. That means, there is not much research on the safety and stability of the circuit, and some protective components are omitted. However, it can be seen from the design process and debugging method of the entire circuit that the circuit is very simple and easy to understand whether it is the basic principle, the complexity of the chip used, the number of various components, and the final wiring layout. Moreover, the devices are very commonly used, cheap, and worthy of promotion.


Component Datasheet

LM358 Datasheet


FAQ

  • What is lm358 op amp?

LM358 is a dual op-amp IC integrated with two op-amps powered by a common power supply. It can be considered as one half of LM324 Quad op-amp which contains four op-amps with common power supply. The differential input voltage range can be equal to that of power supply voltage.

  • What is lm358 used for?

LM358 can be used as transducer amplifier, DC gain block etc. It has large dc voltage gain of 100dB. This IC can be operated on wide range of power supply from 3V to 32V for single power supply or from ±1.5V to ±16V for dual power supply and it also support large output voltage swing.

  • Why lm358 is used in IR sensor?

IC Lm358 is used as a comparator when IR receiver senses IR radiations. When the o/p of lm358 goes high, then LED connected at the o/p turns ON. The output pin of the IC LM358 is used to interface with PIC microcontroller.

  • How does an lm358 work?

IC LM358– LM358 consists of two independent, high gain operational amplifiers in one package. Important feature of this IC is that we do not require independent power supply for working of each comparator for wide range of power supply. LM358 can be used as transducer amplifier, DC gain block etc.

  • What is the difference between lm358n and lm358p?

The suffix denotes the manufacturer's packaging code. The 'N' is used by most manufacturers for the plastic 8-pin package. The 'P' is used by a few manufacturers for the plastic 8-pin package. Raven Luni is right, there is NO difference between the two devices, just the mfgrs.

  • How do I know if my lm358 op amp is broken?

Measure the DC voltage at the +input. then measure the DC voltage at the output. if the results are significantly different, the opamp is most likely shot. if they are the same, the opamp is most likely ok and the problem is something else.

  • What is the difference between lm386 and lm358?

The LM386 is a complete audio power amplifier, the LM358 is a dual operational amplifier. When using the LM358 e.g. as a pre-amplifier, you will have to supply a separate power amplifier.

  • What is a dual op amp?

With a dual supply op amp, the V+ terminal of the op receives a positive voltage and the V- terminal connects to negative voltage. Therefore, any input signal fed into the op amp can swing from the positive voltage supply to the negative voltage supply.

  • What is LM series?

The following is a list of LM-series integrated circuits. ... The LM series originated with integrated circuits made by National Semiconductor. The prefix LM stands for linear monolithic, referring to the analog components integrated onto a single piece of silicon.

  • How to import lm358 into LTspice?

1. Download model file and unzip.
2. Place .cir file in same folder as schematic.
3. Place "opamp2" symbol on schematic.
4. Change "opamp2" value to LMX58_LM2904.
5. Place directive on schematic ". lib LMx58_LM2904. CIR" without quotes.

Ordering & Quality

Photo Mfr. Part # Company Description Package PDF Qty Pricing
(USD)
LM358ADR LM358ADR Company:Texas Instruments Remark:IC OPAMP GP 2 CIRCUIT 8SOIC Package:8-SOIC (0.154", 3.90mm Width)
DataSheet
In Stock:52500
Inquiry
Price:
2500+: $0.09540
5000+: $0.09010
12500+: $0.08215
25000+: $0.07685
62500+: $0.06890
Inquiry
LM358ADR2G LM358ADR2G Company:ON Semiconductor Remark:General Purpose Amplifier 2 Circuit 8-SOIC Package:8-SOIC (0.154"", 3.90mm Width)
DataSheet
In Stock:On Order
Inquiry
Price:
1+: $0.40000
10+: $0.30000
25+: $0.27080
100+: $0.14760
250+: $0.14268
500+: $0.12792
1000+: $0.09840
2500+: $0.08856
5000+: $0.08364
12500+: $0.07626
25000+: $0.07134
62500+: $0.06642
Inquiry
LM358ADT LM358ADT Company:STMicroelectronics Remark:IC OPAMP GP 2 CIRCUIT 8SO Package:8-SOIC (0.154", 3.90mm Width)
DataSheet
In Stock:7500
Inquiry
Price:
2500+: $0.11082
5000+: $0.10368
12500+: $0.09510
25000+: $0.09152
62500+: $0.08938
125000+: $0.08580
Inquiry
LM358AMX-NOPB LM358AMX-NOPB Company:Texas Instruments Remark:IC OPAMP GP 2 CIRCUIT 8SOIC Package:8-SOIC (0.154", 3.90mm Width)
DataSheet
In Stock:25000
Inquiry
Price:
2500+: $0.32940
5000+: $0.31720
12500+: $0.30500
25000+: $0.30012
62500+: $0.29280
Inquiry
LM358AN-NOPB LM358AN-NOPB Company:Texas Instruments Remark:IC OPAMP GP 2 CIRCUIT 8DIP Package:8-DIP (0.300", 7.62mm)
DataSheet
In Stock:3661
Inquiry
Price:
1+: $0.90000
10+: $0.80800
25+: $0.76720
100+: $0.58910
250+: $0.52060
500+: $0.49320
1000+: $0.38360
2500+: $0.36442
5000+: $0.35072
Inquiry
LM358D LM358D Company:Texas Instruments Remark:Operational Amplifiers - Op Amps Dual Linear Package:N/A
N/A
In Stock:On Order
Inquiry
Price:
1+: $0.41000
10+: $0.30100
100+: $0.16800
500+: $0.15400
1000+: $0.11600
2500+: $0.10900
5000+: $0.10200
10000+: $0.09400
25000+: $0.09000
Inquiry
LM358DR LM358DR Company:Texas Instruments Remark:IC OPAMP GP 2 CIRCUIT 8SOIC Package:8-SOIC (0.154", 3.90mm Width)
DataSheet
In Stock:52500
Inquiry
Price:
2500+: $0.08100
5000+: $0.07650
12500+: $0.06975
25000+: $0.06525
62500+: $0.05850
Inquiry
LM358DR2G LM358DR2G Company:ON Semiconductor Remark:IC OPAMP GP 2 CIRCUIT 8SOIC Package:8-SOIC (0.154", 3.90mm Width)
DataSheet
In Stock:37500
Inquiry
Price:
2500+: $0.08120
5000+: $0.07308
12500+: $0.06496
25000+: $0.06090
62500+: $0.05481
Inquiry
LM358DT LM358DT Company:STMicroelectronics Remark:IC OPAMP GP 2 CIRCUIT 8SO Package:SOIC8
DataSheet
In Stock:92500
Inquiry
Price:
2500+: $0.10296
5000+: $0.09724
12500+: $0.08866
25000+: $0.08294
62500+: $0.07436
125000+: $0.07150
Inquiry
LM358M LM358M Company:Texas Instruments Remark:General Purpose Amplifier 2 Circuit 8-SOIC Package:8-SOIC (0.154"", 3.90mm Width)
DataSheet
In Stock:On Order
Inquiry
Price:
1+: $1.23000
10+: $1.10300
25+: $1.04720
100+: $0.80410
250+: $0.71060
500+: $0.67320
1000+: $0.52360
2500+: $0.49742
5000+: $0.47872
Inquiry

Related Articles

TL431 Shunt Regulator: 8 Simple Circuits for Beginners

Iggy 20 Feb 2021  2420

I DescriptionThis blog will introduce 8 simple and easy to understand circuits that using TL431 as the main component. Such as TL431 Precision Reference Voltage Circuits, TL431 Adjustable Regulated Po...

Continue reading »

CR2032 Lithium Cell: Equivalent, Uses, Dimensions [FAQ]

Mia 19 Jan 2021  86

CR2032 is a coin cell battery, also known as a lithium energizer, which is mainly used in high-powered devices such as hearing aids, glucose monitors and car keyless entry transmitters. It provides a...

Continue reading »

A Detailed Introduction to CR2025 Lithium Cell [FAQ]

Mia 25 Jan 2021  83

A CR2025 battery is a lithium coin or “button” cell that is 20mm diameter x 2.5mm thickness. The CR2032 battery has a high voltage of 3V, a capacity of upto 170mAh, and is also disposable/...

Continue reading »

LM393 Comparator: A Detailed Introduction

Irene 18 Jul 2020  890

IntroductionThe LM393 comparator can be regarded as equivalent to the most popular version of the LM358 operational amplifier. Although any operational amplifier can be used as a voltage comparator, t...

Continue reading »

LM2596 Circuit: Adjustable Regulated DC Power Supply

Mia 14 Oct 2020  564

I DescriptionThis blog has designed a step-down DC switching power supply (its voltage can be adjusted from 0V) for neutron tube storage. The power supply adopts the BUCK topology, and the r...

Continue reading »

0 comment

Leave a Reply

Your email address will not be published.

 
 
   
 
Rating:

# 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z