cancel
Showing results for 
Search instead for 
Did you mean: 

Which microcontroller should I use which will survive voltage spikes?

Gladson
Associate III

I am designing a motor controller using STM32G030c8t6. but while connecting it to battery, if positive terminal gets connected to the battery before the negative terminal, then a voltage spike (of the voltage of battery) occurs on the board and it appears on Tx pin (PB6) which is damaging the microcontroller. But due to some mechanical limitations, there is no way to ensure that the negative terminal of battery gets in contact to battery first. Is there any way to protect board from this spike electrically.

I tested this on a reference board which has another microcontroller (XCM - V NRFYT 2147), and on it the same spike appears on the microcontroller pins but the microcontroller survives. Is there any microcontroller from ST family that can survive this spike? I was not able to find any datasheet for this microcontroller, but in this link https://www.yoycart.com/Product/639443123789/, which appears to be a similar microcontroller, there was mention of some ST microcontroller such as STM32F031C6T6. So is this microcontroller similar to it? I used STM32 MCU product selector but there was no major difference between the microcontroller I use (STM32G030c8t6) and STM32F031C6T6.

7 REPLIES 7
gregstm
Senior III

I don't have enough information to understand your problem completely, but here are some general suggestions (that may or may not be helpful) :

- perhaps using a voltage regulator that includes reverse voltage protection.

- use a MOSFET to provide reverse voltage protection with VERY low voltage drop (unlike a simple diode protection circuit). Bob Pease described a circuit many years ago, but I can't find that online these days - this article looks similar ( https://www.edn.com/polarity-correcting-circuit-protects-battery-powered-devices/ )

Uwe Bonnes
Principal III

Think about a double layered protection that limits current at the MCU pins to 10 mA.

Andrew Neil
Super User

It's up to you to protect the microcontroller with your design of the external circuits.

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Just out of curiosity. How can connecting one terminal of floating voltage supply (battery) can do any "voltage spike" if there is no way to current flow (until negative terminal connected) ? 

Maybe there was some "unexpected" or "accidental" path to ground ... ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Danish1
Lead III

All Stm32 microcontrollers are built in advanced CMOS technology. This means tiny transistors with thin gate oxides that are not robust against voltages outside the absolute-maximum ratings.

One way to protect digital outputs is to use a separate "buffer" chip, perhaps an opto-isolating one if there is any risk of disconnecting an inductive load (e.g. a motor) while it is still running. There are loads to choose from.

Another approach is to reduce the current that flows during over-voltage situations so that protection you add to the pins (e.g. external diodes to Vdd and Vss) by way of a series resistor in the signal line. The value has to be chosen with some care to ensure the wanted signal still gets through!


@Danish1 wrote:

All Stm32 microcontrollers are built in advanced CMOS technology. This means tiny transistors with thin gate oxides 


Indeed - and that's true of pretty much all microcontrollers these days.

 


@Danish1 wrote:

 not robust against voltages outside the absolute-maximum ratings.


That, of course, is the very definition of Absolute-Maximum ratings!

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.