33- Illumination intensity detection based on 51 single chip microcomputer (photosensitive resistance)

Specific realization function

The system is composed of STC89C52 single-chip microcomputer + four-digit digital tube display + photoresistor + ADC0804 and so on.

Specific functions:

①The photoresistor collects the ambient light value in real time;

②Adopt ADC0804 to convert analog value into digital quantity;

③The four-digit digital tube displays the current light value (00.0-60.0).

 

design background

With the development of electronic technology and the expansion of digital circuit applications, in today's society, product intelligence and digitization have become a trend that people are pursuing, and the performance, price, and development space of equipment have attracted people's attention. Electronic equipment with good performance has high requirements for peripheral protection circuits, especially precision instruments that require higher equipment such as light requirements, in order to extend the service life of the equipment. Therefore, in the protection of enterprise equipment, it is particularly important to design an intelligent photoelectric detection circuit.

The light intensity detection design is mainly made according to the characteristics of the photoresistor. The photoresistor value changes with the light intensity (the greater the light intensity, the smaller the resistance value). When the photoresistor is connected to the circuit, different light intensity causes the value of the photoresistor to change, so the voltage on the photoresistor changes, causing the output voltage of the circuit to change accordingly. According to the voltage-illuminance function relationship, the light intensity value is calculated from the voltage, and then output in the form of a visual interface (LED digital tube display) for users to view the results.

Among them, the characteristic of the photoresistor is that the resistance value of the photoresistor changes with the change of the light intensity. The stronger the light intensity, the smaller the resistance, and the lower the voltage obtained in the voltage divider circuit. According to this feature, combined with the relationship between the light intensity and the output analog voltage, the corresponding analog voltage under a certain light intensity can be obtained. The analog voltage is converted into a digital voltage by an AD converter for easy computer processing. Then the digital voltage is converted into illuminance.

hardware design

Take AT89S52 single-chip microcomputer as the core, complete data storage and processing functions inside the single-chip microcomputer, complete the conversion and input of analog signals to digital signals through the digital-to-analog conversion chip, and then store the data in the memory chip, and then perform data processing on the single-chip microcomputer. The displayed digital signal is decoded and displayed on the four-in-one seven-segment digital display. The power supply of each chip is connected with a coupling capacitor. When the capacitor is charged to 2V, this capacitor serves as the power supply to provide the circuit with operating voltage. The RESET port of the single-chip microcomputer provides power supply and self-starting, and the X1 and X2 ports provide a 12MHZ crystal oscillator to support the operation and startup of the single-chip microcomputer. The system has completed the collection function, storage function, data processing function, measurement data display function, and has reached the basic requirements of the design.

software design

To complete the light intensity detector, the system needs to realize the basic functions of light intensity signal acquisition and A/D conversion, data processing, data display, and data output. Functionally, it can be divided into four major parts: light intensity signal acquisition and A/D conversion, data processing, human-computer interaction, and execution for design.

Schematic diagram

The system schematic design adopts Altium Designer19, as shown in the figure.

program

This design uses KEIL5 software to realize the program design, as shown in the figure.

Simulation implementation

This design uses protues8.7 software to realize the simulation design, as shown in the figure.

All information

All materials include programs (notes), AD schematic diagrams, protues simulation, reference papers, program explanations, simulation explanations, simulation videos, schematic explanations, introduction to the use of materials, etc., the most complete in the entire network!

For information, please follow the WeChat public account "Electronic Engineer Growth Diary", and reply the key word: "Information"!

 

Guess you like

Origin blog.csdn.net/weixin_41017942/article/details/114716593