The standby energy consumption of computer peripheral devices (such as printers, scanners, speakers, etc.) not only increases consumers' daily electricity bills, but also causes great waste of electricity resources. The computer intelligent energy-saving socket designed in this paper uses the power on and off of the host to drive the power on or off of other devices, so that the standby energy consumption of its interface devices is zero, which can reduce the radiation generated by the computer and its peripherals, thereby achieving energy saving and environmental protection effects; at the same time, it also has the function of segmented timing switch. The intelligent socket can also be used as an ordinary socket through function conversion without affecting the use of other devices.
1 Design of intelligent socket
1.1 Hardware structure of intelligent socket
The hardware structure diagram of the computer intelligent energy-saving socket is shown in Figure 1. The controller uses AVR mega 48 as the control core, and the peripheral circuit is mainly composed of current sampling circuit, analog/digital conversion reference voltage circuit, status display circuit, keyboard input circuit and real-time clock. The current sampling circuit is used to detect the computer's operating status and overcurrent protection; the digital/analog conversion reference voltage circuit provides a reference for current sampling; the status display circuit indicates the current operating status of the socket; the keyboard input realizes the switching between ordinary sockets and intelligent sockets, sets the critical standby current value, and sets the time point of the segment switch. The operating status of the computer host is detected by the current transformer of the host interface, and the overcurrent protection is detected by another transformer. When the current is greater than the rated current for a certain period of time, the power supply of the controlled socket is cut off, which plays a protective role for the peripherals. Since the induction current of the transformer is small, the reference voltage requirement is high in the digital/analog conversion process. This design uses the bandgap constant voltage source TL431 as the reference voltage for A/D conversion. The standby current of different computer hosts may be different, so the standby current can be sampled as a critical value through an external keyboard, and the socket can be set to be used as an ordinary socket; the RTC clock is composed of PCF8563.
1.2 AVR microcontroller
AVR microprocessor is an 8-bit embedded RISC processor of Atmel Company, which has the advantages of high performance, high confidentiality, low power consumption, etc. The program memory and data memory can be accessed independently of the Harvard structure, and the code execution efficiency is high. The mega 48v processor used in this system contains 4 KB on-chip programmable FLASH program memory; 512 B E2PROM and 512B RAM; at the same time, the chip also integrates a watchdog; 8-way 10-bit ADC; 3-way programmable PWM output; with online system programming function, rich on-chip resources, high integration, and easy to use. Using AVR mega48V, it is very convenient to realize the setting of external input parameters, current detection, indication of working status, etc.
1.3 Current sampling circuit
This design uses a current type current transformer to sample the AC current. One channel samples the host interface current to realize switch control, and the other channel samples the controlled interface current to realize overcurrent protection (see Figure 2). The output signal of the current transformer is sampled by mega 48 after IV conversion. The effective value of the current can be calculated according to the transformer ratio coefficient. After the output voltage of the IV converter passes through the comparator, if it reaches the overcurrent limit (set to 10 A), an external interrupt is triggered. After the interrupt program is processed, it is determined whether the overcurrent value is reached and the overcurrent protection action is executed.
1.4 Power supply
circuit The operating voltage of the microcontroller and the coil side voltage of the relay are 5 V DC voltage. Considering the cost and space factors, the RC voltage reduction method is used. As shown in Figure 3.
In Figure 3: C3 is the CBB step-down capacitor; R13 provides a discharge circuit for C3 after the power is disconnected; R4 is a current limiting resistor; after full-wave rectification, D11 clamps the voltage at 5.1V. The capacitive reactance XC of C3 in the circuit is: XC=(1/2)πfc, current, in order to meet the current requirements when the relay is energized, the value of C3 is 1μF, and the maximum current can reach more than 100 mA. Since it is a non-isolated power supply, the zero potential cannot be connected to the ground during use.
1.5 Relay drive circuit
The on and off of the controlled socket is controlled by a relay. The design uses a relay with a coil side voltage of 5V, and the relay is driven by S8050. Mega 48 has a strong I/O drive capability, R17 plays a current limiting role; the pull-down resistor R18 can prevent the relay from malfunctioning; D12 provides a discharge circuit when the relay is disconnected. As shown in Figure 4.
1.6 Keyboard circuit
A single-button input method is used to set the function conversion between ordinary sockets and intelligent sockets and the time setting when timed switch is required. During the program running process, the timer interrupt is used to detect whether a key is pressed. When the function key is pressed for no more than 10s, it enters the timed switch mode, and the time of the timed switch is set by the plus and minus keys; when the function key is pressed for more than 10s, it switches to ordinary sockets for use. If it is necessary to switch to an intelligent socket, the same operation is performed. The set parameters and modes are saved in the E2PROM of mega 48.
1.7 Status display and alarm circuit
This design uses LCDl602 liquid crystal display system status information, including whether intelligent control is used, host operation status, and controlled port status. LCDl602 uses a 7-line drive method, and a 1 kΩ resistor is connected to the ground to adjust the contrast of the liquid crystal display. Display data and instructions are written through DB4~DB7 of LCDl602. It also has an audible and visual alarm function. When overcurrent occurs or the timed cut-off time is reached, the corresponding light-emitting diode flashes and the buzzer alarms, and the corresponding action is performed.
1.8 Real-time clock circuit
The real-time clock circuit provides accurate time for the timing switch. A CR2025 nickel-metal hydride button battery is used as the backup battery for PCF8563 (see Figure 5).
2 Software Design of Smart Socket
The main program mainly completes the initialization of I/O and timer, reads out the system parameters stored in E2PROM, and enters the corresponding processing program according to the mode setting. The socket can run in 3 modes: intelligent timing mode, intelligent energy-saving mode and normal mode. The mode switching is selected by the mode button. The measurement of parameters is mainly completed by the interrupt service program. Figure 6 is the main program flow chart.
Since the standby current of different computers is different, the standby current of the host needs to be sampled before use. First, put the host into standby mode, and sample the current at this time after entering the interruption through the mode button, and store it in E2PROM.
3 Testing of smart sockets
The designed socket is connected and tested as shown in Figure 7. A P4 dual-core computer and a 17-inch monitor are used for testing. The standby power consumption of the monitor is 5W, and the standby current is about 25mA. After entering the standby state, press the sampling button on the socket to sample the standby current of this computer and store it in E2PROM. The test results show that when the computer enters the standby state, the socket can effectively cut off the power supply of the monitor.
4 Conclusion
The intelligent energy-saving socket designed in this paper has intelligent energy-saving and timer switch functions, and can also be used as an ordinary socket. After testing, the system shows a good control effect, not only reducing the standby power of computer peripherals to zero, but also protecting the peripherals. It has certain social benefits and wide promotion value in energy conservation and emission reduction.
Previous article:Design of a Presettable Programmable Broadband DC Power Amplifier Circuit Based on AVR Microcontroller
Next article:Anti-interference design of small heating furnace control system using AVR single chip microcomputer
- 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
- Power Supply Problem Summary
- Build an IP surveillance camera system using low-cost FPGA
- Help! Can anyone help me convert the .brd file to a .PcbDoc file that can be opened by AD?
- Why is Ethernet PHY IP so important for high-performance computing SoCs?
- ESP32-S2-Saola-1 Connect to USB
- Want to know about Wi-Fi, Zigbee, Thread, Bluetooth and other protocols
- Introduction of Schottky diode used as AND gate or OR gate
- Original goods, new goods in bulk, refurbished goods, disassembled parts, cut board ICs...what do they mean exactly?
- Does the ripple of the power supply have any effect on the output of the filter?
- How to do it?