When the password is 4321, perform the corresponding correct password action, otherwise it will not be performed.
(1) There are no obstacles in front of the reflective photoelectric tube, so the receiving tube does not conduct, and its output is high level. After passing through the 74LS04 inverter, the output is low level, and LED1 emits light; when there are obstacles in front of the tube When , the receiving tube is turned on, the output is high level, and LED1 does not emit light. The output terminal is connected to the T0 pin of the microcontroller.
(2) There are no obstacles in front of the through-beam photoelectric pair tube. The receiving tube can receive the spectrum emitted by the transmitting tube L1. It is in the conducting state and outputs low level. After passing through the 74LS04 inverter, the output pin is high level. LED2 does not emit light; when isolation is added between the two tubes, the receiving tube is in a cut-off state, the output pin outputs a low level, and LED2 emits light. This output pin is connected to the T1 pin of the microcontroller.
(3) Add light to the photocell, and the photogenerated electromotive force will be generated at both ends. After amplification by the 741 amplifier, it is added to pin 6 (negative input terminal) of the comparator LM339, causing the comparator to output a low level, which is passed through the 74LS04 inverter output pin. is high level, LED5 does not emit light; when there is no light, the photovoltaic cell does not generate photogenerated electromotive force, the comparator output is high level, the output pin voltage is low, and LED3 emits light. Generally, pin 7 (positive input terminal) of the comparator is left floating, or it can be connected to an adjustable power supply to adjust the sensitivity of the experimental board to light intensity by changing the comparison threshold. This output pin is connected to the INT0 pin of the microcontroller.
(4) If the photoresistor is not illuminated, its dark resistance is very high. Pin 4 (negative input terminal) of the comparator LM339 is high level, so its pin 9 output is low level, and is output after passing through a first-level inverter. The pin is high level, and then outputs low level after passing through a first-level inverter, and LED4 emits light; when light illuminates the photoresistor, its light resistance is small, and pin 4 (negative input terminal) of the comparator LM339 is low level. level, its pin 9 is high level, the output pin outputs low level, and LED4 does not emit light. Generally, pin 5 (positive input terminal) of the comparator is left floating, or it can be connected to an adjustable power supply to adjust the sensitivity of the experimental board to light intensity by changing the comparison threshold. This output pin is the INT1 pin of the microcontroller.
(5) If there are no obstacles between the transmitting tube and the receiving tube of the optocoupler, the receiving tube is turned on, and its output is low level. After passing through the first-level inverter, the output pin is high level, and LED5 does not emit light; when When there is an obstacle between the optocoupler's transmitting tube and the receiving tube, the transmitting tube does not conduct, the output pin outputs a low level, and LED5 emits light. This output pin is connected to the INT2 pin of the microcontroller.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet