Author :Iflowpower – Portable Power Station Supplier
Introduction Since the 1990s, with the continuation reduction of the integrated circuit characteristics and the corresponding new increase in chip density and operating frequency, reducing power consumption has become an important consideration in the design of submicron and deep sub-microscale integrated circuit design. New increasing power consumption will bring a series of issues, such as circuit parameter drift, reliability, new chip package cost, etc. Therefore, the power consumption of the system is designed across the system, especially in systems with battery power.
Microchip PIC Series MCU is a good solution for designing high performance, low-power microcontroller systems. The following is a low power design method and a specific example to introduce the PIC microcomputer low power application. 1 Low-power design method To make the system work in low power state, you must correctly set the configuration and work mode of the microcontroller.
The following combined with the most commonly used single-chip microcontroller introduces the design method of low power system. 1.1 Basic design methods There are many technologies to reduce the power consumption of the system, the most commonly used Sleep mode.
The program executes a SLEEP instruction, and the sleep mode is entered. To Sleep mode, the crystal is stopped, and at this time, the single-chip machine is only 1A current under 3V power conditions. When the system works, the microcontroller can periodically wake the microcontroller using a watchdog or external event, using electronic switches to supply power to the system to reduce system standby power consumption, extend battery usage.
The relationship between the working frequency and power consumption of the single chip microcomputer is also very large, the higher the frequency, the greater the power consumption. In the use of 32kHz crystal, 3V operating voltage, the typical operating current of the single-chip PIC12, PIC16 series of single-chip microcomputer is only 15A; and when 4MHz crystal, 5V operating voltage, the typical working current of the microcontroller reaches a few MA. In many low power consumption, low-speed crystal vibration is very effective.
If the microcontroller is oscillation, it is also possible to change the oscillation resistor through the operation of the I / O port, thereby changing the working frequency of the microcontroller, achieving energy saving purposes. As shown in Figure 1, one I / O pin can remove the parallel resistance R1 in a waiting state, reduce the working frequency of the microcontroller. When the single-chip is working, you can set the I / O pin to the output and output high level, thereby improving the oscillation frequency.
1.2 Oscillation circuit design in single-chip system design, the design of oscillating circuit is a very important part of. A typical oscillation circuit of the PIC series microcontroller is shown in Figure 2.
Under normal circumstances, the designers choose according to the parameter table given by the manufacturer. If the system works fine, it will no longer be improved. In fact, this is not suitable.
Because Microchip's microcontrollers are different from the model and version, the operating voltage is within 2.5 to 5.5V, and the automotive level temperature can be in the range of -40 ~ -125 ° C, while only a limited number of situations are given.
The actual environmental parameters affect the performance of the oscillation circuit. Such as high temperatures, low voltage can reduce the gain of oscillation loop, and from reducing the oscillation frequency or difficult to start; low temperature, high voltage can make the loop gain, so that the crystal is driven, there is damaged potential danger or oscillating circuit work High-time harmonic frequency rises, increase system power consumption. Therefore, how to correctly design the oscillation circuit of the system is necessary.
About the PIC series microcontroller, the general design steps are as follows: 1 Select crystal oscillator. Select crystal according to the system's oscillation frequency. In addition, the working temperature and frequency stability of the crystal oscillator is also important indicator.
2 Select the type of oscillator. The PIC series single-chip microcomputer has oscillation modes such as RC, LP, XT, HS. In addition to the RC mode, the choice of oscillation mode is actually the choice of loop gain.
Low gain corresponds to low oscillation frequency, high gain corresponds to high oscillation frequency. Generally, according to the actual working frequency, refer to the data manual to select. 3 Select C1, C2.
Ideally, ensure that the system can work properly under high temperature and lowest operating voltage, so that the capacitor is within the scope of the data manual. At the same time, the C2 is selected to be larger than the C1 to increase the phase shift, so that it is conducive to the power-on power of the oscillation circuit. 4 Select RS.
The above parameters have been selected to determine the size of the RS. A simple way is to allow the system to work in the lowest temperature and maximum voltage, at this time, it should be the maximum output amplitude of the clock circuit. The output waveform of the pin OSC2 is observed with an oscilloscope (note that the probe of the oscilloscope will introduce a capacitor to the circuit, generally a few pf), if the peak (receiving VDD) of the sine wave (receiving VSS) is flat or press Flat, illustrated drive overload, add 1 resistor RS between OSC2 and C2, general 1KωLeft and right or less than 1Kω.
RS should not be too large, too general, so that the input and output are isolated, there is a large noise. When you find that a larger RS can eliminate the driver, you can add a load capacitor C2 to compensate. C2 is generally selected between 15 ~ 33PF.
The design of the system oscillation circuit is very affected by the stability and power consumption of the system. In general, when the system wakes up from the SLEEP state, the oscillating circuit is the most difficult to start (especially the system works in high temperature, low pressure, low frequency). At this time, the resistor RS facilitates the start of the oscillation circuit, as the inexpensive carbon film resistance is prone to white noise, thereby helping the circuit.
In addition, select C2 is slightly larger than C1 to increase the phase shift, which is also conducive to circuit origin. 2 Specific application example 2.1 System composition and block diagram system Important by PIC microcontroller, dual audio decoding coaching circuit, voice integrated circuit, interface circuit, VCC power control circuit, radio frequency transmit circuit, and EEPROM, can complete control and pair of household appliances The alarm asks for the automatic transmission of voice information, as shown in Figure 3.
2.2 Controller Working * When the telephone number (hereinafter referred to as a local machine) is at a single screen, the telephone line input voltage changes, causing the CD40106 to change, input to the CPU RB0 Interrupt signal appears, wake up the CPU, the controller enters the working state. Control the various functions of the controller through the local machine's coamental tray.
Such as controlling TV, audio, lighting and other electrical power. * When the controller receives the ringing signal, the 4 pin output level of the CD40106 changes, and the interrupt signal is input, the CPU has an interrupt signal, and the CPU enters the working state, and the ringing signal is counted; reach the set bell number, Enter the controller into the phone reception state, start receiving the remote transmission DTMF signal, and the signal obtained by the MT8880 demodulated signal is issued to the microcontroller to the single-chip, the data is stored in the register, run by the CPU, control various functions of the controller. * When the controller acts as alarm and is in the alarm state, the alarm probe detects the case of preventing the area; when the probe issues a police information to the controller, enter the CPU's RB5 interrupt signal, the controller enters the working state, from the EEPROM chip Read the pre-set alarm phone number, converted to DTMF signals, automatically dial, transferred information to the user or direct alarm in voice form.
2.3 Application Circuit (1) Telephone Interface Circuit Phone and Controller Adopt Controller In front, the telephone is connected in series, the telephone can realize the control of various functions of the phone on the controller. The interface circuit consists of an overvoltage protection circuit, a polar conversion circuit, and an interrupt request circuit, as shown in FIG.
1 Over-pressure protection circuit. A pressure sensitive resistor R is added to the telephone line loop, which is short-circuited when the voltage across the two ends is greater than its operating voltage, thereby protecting the post-level circuit from high pressure hazards. When the voltage is added to its two ends less than its operating voltage, the pressure sensitive resistance is open, there is no impact on the work of the post-level circuit.
In this design, the working voltage of the pressure sensitive resistance is 220V. 2 polarity conversion circuit. Since the AC signal is transmitted on the telephone line, in order to fix the polarity of the signal, the bridge is added to the circuit, and the full wave rectification is performed.
3 Interrupt request circuit. To extend the battery operating time, the CPU is in the hands-on-saving state in standby, and the CPU wakes up the CPU when the controller function is controlled when the remote telephone and the local machine are implemented.