Circuit Protection in Microcontrollers

The right approach to circuit protection can drastically improve the reliability of a product or design. Unfortunately, not all circuit protection comes in the form of hardware like fuses and transient voltage suppression. Some forms of circuit protection can come from software, and this can create confusion. In this article, we will explore how microcontrollers can play a role in circuit protection.

Basic Microcontroller Protection

When designing circuit protection circuits for microcontrollers, it is imperative that the basics are taken care of first. This means that any digital pins which connect to conductors and are exposed to the outside world (such as connectors) are properly protected with zener diodes and current limiting resistors. Analog inputs are also required to have zener diode and current limiting measures if they too connect to external conductors.

Microcontroller designs are also sensitive to noisy power rails due to their CMOS nature (noisy power lines can cause logic gates to incorrectly operate). As such, it is important that the correct type of decoupling capacitors is used. Bulk capacitors (such as polarized) are useful for handling sudden power demands from peripherals and high-power devices. Small, non-polarized capacitors, on the other hand, are useful for reducing switching noise on power rails.

It is often required that small, non-polarized capacitors with low equivalent series resistance (ESR) values are placed at each pair of power pins of a microcontroller. For example, the PIC18F45K22 has two pairs of input power (VDD and VSS) and each pair should have a low value ceramic capacitor (such as 10nF) directly connected to them.

Ähnliches Produkt:

PIC18F45K22-I/PT

Microchip Technology Microcontrollers - MCUs Anzeigen

Types of Circuit Protection

So far, the protection methods described above are often passive and deal with surges only. What about other forms of circuit protection?

While voltage and current surges can damage a microcontroller, unreliable power supplies and power interruptions can arguably cause more damage (just not in the physical sense). Circuits in general are rarely damaged when operating at reduced voltages, but circuits that involve digital logic can behave unexpectedly.

From an outsider’s perspective, a microcontroller-based circuit running at a reduced voltage may still be able to drive displays and run firmware (therefore appearing to work), but data from external sources, such as I2C devices, can be unreliable as they won’t be operating at their correct voltage levels. This can lead to a false sense of reliability. If the circuit is controlling safety equipment, there is a serious risk to injury if only half of the circuit is working.

So, how can circuits be defended from reduced power levels?

Brown-Out Detection in Microcontrollers

While over voltage and current is often mitigated against with the use of external, discrete components (such as fuses and diodes), power reduction (known as brown-outs) can be trickier to defend against.

One method is to design dedicated circuitry that can run on small voltage levels and actively monitor the power rails. The problem with this approach is that it can increase the price of the design as well as the complexity of the final PCB. However, there is often one source in abundance that would most likely mitigate cost for a designer.  That being the microcontroller itself. It is not uncommon for microcontroller-based designs to have spare peripherals, pins, memory, and processing time. This means that designers do not need to include additional components into their design to perform active circuit health monitoring. Some microcontrollers (such as the Microchip Technology’s PIC18F45K22) include brown-out peripherals, which can cause resets and set flags to indicate to the firmware that a brown-out was detected.

So, how would basic circuit monitoring system be implemented with a microcontroller?

Microcontroller Input Voltage

The basic layout for microcontroller-based circuit protection is shown below and only requires two pieces of hardware; a spare analogue input and an internal bandgap reference. The analogue input is needed to measure the external VDD voltage while the bandgap reference provides a reference. The importance of the bandgap reference cannot be understated due to how ADCs typically work. An ADC will produce a binary output whose value is proportional to the input voltage to the ADC and the ADCs two references. If the ADCs reference is the power rails then the ADC reading of the VDD power rail will always be the maximum value. The use of a bandgap reference provides a voltage reference for the ADC that is independent of the power supply voltage and therefore allows the microcontroller to measure the power supply voltage. Bandgap references are also useful as they are temperature independent, meaning they can provide accurate voltage readings for the entire temperature range.

Brown-Out Detection Circuit

The simple flowchart example above shows how a microcontroller can be used to actively monitor its power supply voltage. This is particularly useful in situations where the power supply is enough to run the microcontroller but not external hardware. Unfortunately,, this example will not protect the microcontroller against brown-outs. In brown-out  scenarios either a dedicated brown-out detection circuit is required (which would rely on a bandgap reference) or a microcontroller that has its own brown-out detection system. For many designers, the use of an additional external circuit is often too expensive with regards to product cost, component count, and PCB real estate. Therefore, the use of a microcontroller with a built-in, brown-out detection peripheral is preferable.

The PIC18F45K22 is an example of a MCU that includes varying voltage trip points. Once a brown-out is detected the MCU is reset and a special CPU flag is set to inform the user that a brown-out reset occurred. Since the MCU performs a reset, it is imperative that a special handler is first executed, which checks the CPU flags (including the brown-out flag). If the flag is set, then specific actions can be taken such as shutting down external peripherals and presenting warning lights.

Conclusion

Microcontrollers make up the core of many products and their wide range of capabilities make them able to perform many different tasks. Due to their I/O nature, they are also able to perform circuit health monitoring and can use spare analogue channels to read different points on a circuit.

Microcontrollers also offer the ability to perform very complex procedures during circuit failure and can help strengthen your next design.

newsletter 1

Neue Beiträge

Leider ergab Ihre Suche kein Ergebnis

Aktuelles über Elektronikkomponenten­

Wir haben unsere Datenschutzbestimmungen aktualisiert. Bitte nehmen Sie sich einen Moment Zeit, diese Änderungen zu überprüfen. Mit einem Klick auf "Ich stimme zu", stimmen Sie den Datenschutz- und Nutzungsbedingungen von Arrow Electronics zu.

Wir verwenden Cookies, um den Anwendernutzen zu vergrößern und unsere Webseite zu optimieren. Mehr über Cookies und wie man sie abschaltet finden Sie hier. Cookies und tracking Technologien können für Marketingzwecke verwendet werden.
Durch Klicken von „RICHTLINIEN AKZEPTIEREN“ stimmen Sie der Verwendung von Cookies auf Ihrem Endgerät und der Verwendung von tracking Technologien zu. Klicken Sie auf „MEHR INFORMATIONEN“ unten für mehr Informationen und Anleitungen wie man Cookies und tracking Technologien abschaltet. Das Akzeptieren von Cookies und tracking Technologien ist zwar freiwillig, das Blockieren kann aber eine korrekte Ausführung unserer Website verhindern, und bestimmte Werbung könnte für Sie weniger relevant sein.
Ihr Datenschutz ist uns wichtig. Lesen Sie mehr über unsere Datenschutzrichtlinien hier.