1 System hardware design
The hardware of this system is composed of light sensor circuit, analog-to-digital converter, single-chip microcomputer and execution circuit. Specifically, the photocell is used to collect the light intensity signal, and the analog signal is converted into a digital signal through the analog-to-digital converter AD7812. Then the 80C51BH single-chip microcomputer is used to record and analyze the data and issue execution instructions. Finally, the execution circuit is used to adjust the shading device.
1.1 Light intensity collection and amplification circuit design
1.1.1 Photocell design
The light intensity collection of this design is completed by silicon photocells. The installation method is shown in Figure 1.
In the figure, the four photocells G1 to G4 are placed at the bottom of four independent boxes with only the top transparent to prevent direct light from hitting the photocells. Glass and shading materials are placed on top. According to the different light transmission weights, the shading degree of the shading materials from G1 to G4 is different. G1 does not put shading materials, G2 puts one layer, G3 puts two layers, and G4 puts four layers. The shading materials can be replaced by multiple layers of translucent plastic film.
1.1.2 Operational amplifier circuit design
The circuit design is shown in Figure 2.
The core device of this unit is the OP07 chip, which is a low-noise, non-chopper-stabilized bipolar operational amplifier integrated circuit. OP07 has the characteristics of low input bias current (±2 nA) and high open-loop gain (300 V/mV). Here, OP07 plays the role of amplifying the light intensity signal. The input signal is input as a negative current signal at pin 2, and the output signal is output as a voltage at pin 6. As the light intensity increases, the four photocells are turned on successively, thus converting the light intensity signal into a current signal. When the light intensity is the strongest (200 klux), the four photocells all output the highest current, so that the four transistors VT1~VT4 are all in a saturated conduction state. At this time, the output voltage is the maximum, and the theoretical output voltage UT=5.215 V. Considering that there is a certain amount of photocell current and transistor error in the circuit, the actual voltage is slightly lower than this value. The RP here is used for zero adjustment. If the measurement accuracy is not required to be high, RP can be omitted, and the 1st and 8th pins of OP07 are vacant. [page]
Due to the different environments during specific applications, the shading degree of the shading material must be adjusted before applying this system. The adjustment steps are as follows:
1) When the strongest light is selected, appropriately increase or decrease the shading on G4 so that the output voltage UT≤5.0V is in a critical state.
2) Adjust the thickness of the shading material in proportion, from G1 to G4, the ratio is 0:1:2:4.
3) Repeat the above process several times to make the output voltage just the critical value of 5.0V.
1.2 A/D conversion circuit design
The voltage containing the information of light intensity output by the operational amplifier circuit is an analog signal. Here, the analog signal must be converted into a digital signal through the analog/digital conversion circuit before it can be received and processed by the microcontroller. In this design, AD7812 is used as the analog-to-digital converter. AD7812 is a 10-bit 8-channel successive approximation A/D converter with a serial port. Compared with similar circuits, it has the following advantages:
1) It is a data serial output, so using this A/D converter can save microcontroller input pins and facilitate system expansion.
2) There are 8 input channels that can collect 8 analog signals at the same time, which can also be used for further system function development.
3) It has software conversion start and software shutdown features.
The specific circuit design is shown in Figure 3. CREF is connected to a 10 nF capacitor, the transmission synchronization TFS and the reception synchronization RFS are connected to the P1.0 port of the single-chip microcomputer, the data output DOUT is connected to the P1.1 port of the single-chip microcomputer, the data input DIN is connected to the P1.2 port of the single-chip microcomputer, the reading clock SCLK is connected to the P1.3 port of the single-chip microcomputer, and the conversion start CONVST is connected to the P1.4 port of the single-chip microcomputer. In this way, it is easy to control the serial data reading by the single-chip microcomputer.
1.3 Single-chip microcomputer processor circuit design
Intel80C51BH single-chip microcomputer is a very practical 8-bit single-chip microcomputer produced by Intel Corporation in the United States. It has 4 kROM and 64 keprom, 21 special function registers, and is very suitable as a processor for this design. The single-chip microcomputer processing circuit is shown in Figure 4. The first 5 bits of the single-chip microcomputer P1 port are used to receive and control the signal from AD7812, and the P0.0 port is used to output the greenhouse shading adjustment instruction.
[page]
1.4 Execution circuit designSince the command signal sent by the microcontroller has a low power, it cannot directly start the execution switch or motor, and a drive circuit must be used to achieve the action. In order to save costs, the operational amplifier OP07 is still used here to achieve this. The circuit is designed as a common-phase proportional operational circuit with a voltage amplification factor of 3. The execution command signal in the circuit is input at the IN+ pin through the resistor R1 and output at the OUT pin. Due to the use of an operational amplifier circuit, the output power is very large. The output signal controls the switch relay KA to complete the execution task.
2 System software design
In order to facilitate system expansion, the system is modularly designed. The system consists of four modules: light measurement circuit, A/D converter, data processing and execution output. The specific process is as follows: the light measurement circuit converts the light intensity signal (0-200 klux) into a voltage signal (0-5 V), and then the A/D conversion circuit converts the analog voltage signal into a digital signal that can be recognized by the single-chip microcomputer. Finally, the single-chip microcomputer performs data analysis, processing and judgment. When the conditions are met, the light adjustment circuit is started, as shown in Figure 6.
2.1 A/D converter module
In order to read data normally, the A/D converter must be initialized before startup. First, set the P1.4 port of the microcontroller to 1, and then the software starts a conversion process. During the conversion process, since any analog-to-digital conversion requires a certain duration, there must be a certain time delay when reading the data. This design is 5μs to ensure that the correct data is read.
2.2 Central processing unit module
This module mainly includes three parts: the microcontroller's control of the A/D conversion module, the data processing, and the control of the execution circuit.
The microcontroller's control of the A/D converter mainly includes the writing, clearing, and control of the analog-to-digital conversion steps of the A/D analog channel selection address; the data processing part mainly compares the read digital signal corresponding to the light intensity with the pre-set standard value, and issues an execution instruction when the temperature exceeds the specified value. This design determines that data recording and judgment are performed once every 30 minutes, and all-weather monitoring and recording.
3 Conclusion
This paper mainly designs an automatic light intensity management system for greenhouses and sheds. Compared with existing similar systems, it has many advantages. With modular design, system parameters can be modified, the system can be expanded to multi-point measurement and multi-point execution, temperature and humidity collection and ventilation and watering equipment can be added, and sound and light alarms can be added. The system has a wide light measurement range, high accuracy, easy adjustment, and flexible use. The design circuit is simple and practical, easy to implement, low cost, and suitable for wide promotion.
Previous article:Analysis of the significance of using M430/OS on the microcontroller to the system
Next article:Remote automatic alarm device
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [TI millimeter wave radar evaluation]_4_boost board evaluation encountered problems 2
- Using registers to do STM8 UART1 error request help
- BearPi-HM Nano Development Board Review 0 Unboxing and Development Environment Setup
- I found another DK IOT STUDIO online IDE that runs RAPID IOT. I guess they are the same but distributed on different websites.
- ECG-based heart rate monitoring using the LaunchPad Value Line development kit for the MSP430G2452 microcontroller
- [GD32L233C-START Review] - VII. SPI mode driving 1.5-inch OLED screen
- My creative plan and functional implementation plan
- The more I read, the more I like these sentences. Each sentence is more philosophical than the last, and each sentence is very inspiring.
- 【Want to buy】College students want to buy ATmega16 development board
- AC-DC controllers, gate drivers, digital isolators