1.6.5 Example of external voltage detection reset circuit for PIC microcontroller
1. Design idea
There are many types of microcontrollers that do not have a power-off reset function. Even for PIC microcontrollers that have this function, the reset threshold voltage value is fixed and cannot be changed, which sometimes cannot meet the needs of users. Therefore, an external voltage detection reset circuit is also a common design solution.
For PIC microcontrollers with a power-off reset function BOR on the chip, when using an external voltage detection reset circuit, the internal BUR function must be disabled by setting the BUDEN bit of the system configuration word to 0.
For PIC microcontrollers without an internal BOR function, their power control register PCUN does not have a BOR flag bit, and the microcontroller reset caused by the external voltage detection reset circuit cannot be accurately identified. Therefore, during the program execution, an artificial reset signal is applied to the MCLR pin to cause a reset. The
equivalent circuit of the microcontroller chip related to the external voltage detection reset circuit is shown in Figure 1. It can be seen from the figure that when the external voltage detection reset circuit is connected, the two timers inside the microcontroller do not participate in the work.
Figure 1. Equivalent circuit of the microcontroller chip related to the external voltage detection reset circuit
2. Circuit design
(1) External discrete component voltage detection reset circuit.
Two voltage detection reset circuits that are not built using discrete components are given below. The working principle of the circuit is that when VDD drops to a certain threshold value, the transistor is cut off, so that the MCLR terminal level becomes low, forcing the microcontroller to reset. In Figure 2, the threshold value is VDD < Vz + 0.7V, where Vz is the value of the stable voltage of the voltage regulator tube, and in Figure 3, the threshold value is VDD < 0.7V (R1 + R2) / R1.
Figure 2 External voltage detection reset circuit (VDD<Vz+0.7V)
Figure 3 External voltage detection reset circuit (VDD < 0.7V (R1 + R2) / R1)
(2) External dedicated chip voltage detection reset circuit.
Figure 4 shows a voltage detection reset circuit built using a dedicated chip HT70XX. The HT70XX series integrated circuit developed by Taiwan HOLTEK is a group of power supply undervoltage detectors manufactured using CMOS technology. Its packaging forms include three-pin direct-insert packaging and surface-mount packaging.
Figure 4: External voltage detection reset circuit constructed by HT70XX
(This article is transferred from Electronic Engineering World: https://www.eeworld.com.cn/mcu/2013/0314/article_12495.html )
This series of chips contains multiple models, each model of chip is used to detect a fixed voltage. The voltage detection value of each chip in the entire series is within the range of 1.5 to 7.0V. Due to the use of CMOS technology, the chip can be ensured to have low power consumption.
(3) External dedicated chip voltage detection reset circuit with delay.
IM-V809 is a set of CMOS monitoring circuits newly developed by IMP Corporation of the United States, which can monitor the power supply voltage of 3 to 5V for low-power microcontrollers MCU microprocessors MPU or digital systems. A reset pulse of not less than 140ms is generated during power-on, power-off and drop, and this function is integrated into a small chip with a 3-pin package.
Compared with circuits composed of discrete components or general-purpose chips, the complexity of the system circuit is greatly reduced, the number of components is greatly reduced, and the reliability and accuracy of the system are significantly improved. The application circuit is shown in Figure 5.
Figure 5 External voltage detection reset circuit constructed by IMP809
This series of products can provide high and low reset signal levels, and can also provide 6 reset threshold voltages of 4.63V, 4.38V, 4.00V, 3.08V, 2.39V and 2.63V.
For IMP809, during power-on, power-off or drop, as long as VCC is greater than 1.1V, it can ensure that the RESET output voltage is not higher than the low level of 0.4V, ensuring that the reset signal is valid. During the rise of Vcc, RESET maintains a low level until the power supply voltage rises above the reset threshold. After exceeding this threshold, the internal timer releases RESET after about 240ms, returning it to a high level. As long as the power supply voltage drops below the reset threshold (that is, the power supply drops), the RESET pin will immediately become low.
(4) External dedicated chip voltage detection reset circuit with manual reset.
IMP811 is a group of CMOS monitoring circuits newly developed by IMP Corporation of the United States. It can monitor the 3-5V power supply voltage for low-power microcontroller MCU microprocessor MPU or digital system, and can provide manual reset input to eliminate jitter.
These commonly used functions are integrated into a small chip with a 4-pin package. Compared with the circuit using discrete components or single-function chip combination, the complexity of the system circuit and the number of components are greatly reduced, and the reliability and accuracy of the system are significantly improved. The application circuit is shown in Figure 6.
Figure 6 External voltage detection reset circuit constructed by IMP811
· Reset caused by power supply.
The reset signal is used to start or restart the MPU/MCU, so that it enters or returns to a pre-known loop program and executes sequentially. Once the MPU/MCU is in an unknown state, such as the program "runs away" or enters an infinite loop, it is necessary to force the system to reset. IMP811 is used to monitor the power supply voltage of the system and issue a reset signal when it deviates from the normal range, that is, lower than the reset threshold.
For IMP811, during power-on, power-off or drop, as long as VCC is greater than 1.1V, it can ensure that the RESET output voltage is not higher than the low level of 0.4V, ensuring that the reset signal is valid.
During the rise of Vcc, RESET maintains a low level until the power supply voltage rises above the reset threshold. After exceeding this threshold, the internal timer releases RESET after about 140ms, returning it to a high level. Whenever the power supply voltage drops below the reset threshold, the RESET pin will immediately go low.
· Manual reset input.
Many MPU/MCU-based products require a manual reset function to allow operators, surveyors, or external logic circuits to initialize the system. To this end, IMP811 is designed with a low-level effective manual reset input terminal MR, which can be pulled high by the on-chip 200kΩ pull-up resistor. When the
manual reset function is enabled, the pin can be pulled low by an external CMOS/TTL logic circuit or a push button switch with one end grounded. There is no need to use an external de-bouncing circuit because the minimum reset time of 180ms is sufficient to eliminate the jitter of the mechanical switch. In addition, in order to improve reliability and avoid false operation caused by noise, a 0.1ΩF capacitor can be connected between this pin and the ground.
(This article is transferred from Electronic Engineering World: https://www.eeworld.com.cn/mcu/2013/0314/article_12495_2.html )
(5) External dedicated chip voltage detection reset circuit with power failure alarm.
MAX707/708 developed by MAXIM Corporation of the United States is a set of CMOS power monitoring reset chips that can monitor power supply voltage and battery failure.
When the power supply voltage drops below 4.65V (for MAX707) or 4.4V (for MAX708), a reset output signal is generated. This series of products uses three different 8-pin packages: DIP, SO and μMAX.
RESET/RESET operation: The reset signal is used to start or restart the MPU/MCU, allowing it to enter or return to a predetermined loop program and execute sequentially. Once the MPU/MCU is in an unknown state, such as the program "runs away" or enters an infinite loop, the system needs to be reset forcibly.
During power-on, as long as Vcc is greater than 1.0V, it can be guaranteed that the RESET output is not higher than a low level of 0.4V. During the rise of Vcc, RESET maintains a low level until the power supply voltage rises above the reset threshold (4.65V or 4.40V). After exceeding this threshold, the internal timer maintains RESET for about 200ms and then releases it, returning it to a high level.
Whenever the power supply voltage drops below the reset threshold (i.e., power drops), the RESET pin will go low. If a power drop occurs during the reset pulse that has already started, the reset pulse will be maintained for at least 140ms.
The reset signal levels provided by MAX707 and MAX708 are RESET and RESET. Generally, the reset signal I mostly uses a low level, and some microcontrollers, such as Intel's 80u51 series, require a high-level active reset signal.
· Manual reset.
The low-level active manual reset input MR can be pulled to a high level by the on-chip 250μA pull-up current source, and can be pulled to a low level by an external CMOS/TTL logic circuit or a push button switch with one end grounded. No external de-jitter circuit is required, and the minimum reset time of 140ms is sufficient to eliminate the jitter of the mechanical switch.
· Power failure comparator.
The MAX707/MAX708 has an auxiliary comparator on the chip, which has an independent non-inverting input terminal PFI and an output terminal PFO. Its inverting input terminal is internally connected to a 1.25V reference voltage source.
In order to establish a power failure warning circuit, a resistor voltage divider branch can be connected to the PFI pin. The monitoring point connected to this branch is usually before the voltage regulator integrated circuit. By adjusting the resistance value and selecting the voltage divider ratio reasonably, the voltage at the PFI terminal is lower than 1.25V before the voltage at the +5V output terminal of the voltage regulator drops.
Use PFO to provide an interrupt signal to the MPU/MCU so that it can be fully prepared for the upcoming power failure, such as saving necessary data.
The typical application circuit of MAX707/708 used in conjunction with a single-chip microcomputer is shown in Figure 7. As can be seen from the figure, all three functions of MAX707/708 are developed and utilized to form a reliable protection for the single-chip microcomputer.
Figure 7: External voltage reset circuit constructed by MAX667 and MAX707
Previous article:The first lesson on the use of USART of PIC16F877A is USART transmitter.
Next article:How to encrypt PIC microcontroller
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- EEWORLD University Hall - Sharing of household heating and cooling inverter air conditioner application solutions based on Lingdong MM32SPIN series MCU
- Passband gain
- Steps and precautions for live load verification of relay protection devices
- Answer the questions to win prizes! ADI Application Tour - Battery Management and Smart Energy Storage
- Huawei HR complained in real name: R&D brother worked overtime for 160 hours a month but was said to be not working hard
- LPS22HH has problems setting Autozero
- [Analysis of the topic of the college electronic competition] - 2015 National Competition Topic E "80MHz~100MHz Spectrum Analyzer"
- EEWORLD University - Teach you how to learn STM32-M4 series video
- "Playboard" + STM32F030Disco drives LCD5110 display
- [SC8905 EVM Review] + Unboxing and Power-on Test