Puff of smoke in air. 3 different PCBs. Does my PCB have ghosts?

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, that is a haiku. 

No I'm not smiling.

I'm doing some standard testing; seeing what happens when one of the two power rails gets shorted to GND on a PCB that I designed.  We're talking about a 12 V power rail supplied by a benchtop power supply, with a separate on-board 5 V buck converter that is supplying the other rail on the PCB (which my ATmega328PB is connected to).

The 12 V rail has a bunch of DC barrel jacks on it that will be exposed to end users.  So, naturally I decided to jam a jeweler's screwdriver into one of them to conduct my short circuit test.

Lo an behold, a puff of smoke from my ATmega328PB.

I think that means one of the following things happened:

enter image description here

Schematic Time

Here's the schematic of the connections to the ATmega328PB:

ATmega328PB schematic

Here are all the schematics of things in the design that have a connection to the 12 V rail (the VBAT+ rail) and that control the GND current return paths:

FET Power Control

Analog Front End

And here is a schematic of the barrel jacks and the associated jack detect pins (note that these connect directly to some of the pins of the ATmega328PB with no series resistance):

DC barrel jacks with jack detect pins

The Short Circuit Plan

The plan for dealing with short circuits on the 12 V rail was to simply turn off the LOAD_FET N-channel FET because of one of two logical conditions being met in firmware:

  1. ADC sampling at a rate of 1 Hz would detect the over-current condition and cause the FET_LOAD switch to stop conducting, thus cutting off short circuit current
  2. The voltage supplying the ATmega would go into brown-out condition, and the MCU would reset and initialize the FET_LOAD switch to "off", thus cutting off the short circuit current

The Big Smoke

Here is an oscilloscope probe of what happens to the Vbat+ rail on CH1 (yellow) and the +5 rail on CH2 (blue) when shorting Vbat+ to GND via application of a jeweler's screwdriver to the exposed wires of a cable that is plugged into the barrel jack circuit (I didn't stick the screwdriver into the receptacle) while it is being powered by a bench top supply that is set to 12V @ 5 Amps:

Short circuit | CH1 - Vbat+ | CH2 - +5V

After that happened, the ATmega would simply get very hot whenever I powered up the board, and was effectively acting as a short circuit between its +5V input and signal ground. I desoldered the ATmega with hot air, and tested the FET_LOAD N-channel FET to see if it was fried. Indeed it had failed such that it would no longer turn all the way off or on when a gate voltage was applied to +5 or signal ground, but instead was operating somewhere in the twilight zone between. It was dropping about 2.3 volts while conducting ~200 mA whether it was "on" or "off" when a load was plugged into the barrel jack.

Hunch

Had a hunch that because the FET was damaged that the vector for damage to the ATmega may have been caused by the transmission of a high voltage through the FET drain to its gate and on to the MCU. Did some subsequent tests with lower voltages supplying the 12V rail. Note the first three images are basically the same, but with different peak currents. Once the ATmega shut down (due to collapsed voltage on the Vbat+ rail), the LOAD_GND_ENABLE signal supplied by the MCU (blue, below) in turn goes low, cutting the FET_LOAD switch.

Legend:

CH1 = Voltage across Rshunt (0.005 ohm) CH2 = Voltage at LOAD_GND_ENABLE signal (connected to ATmega)

Vbat+ supplied at 6V:

enter image description here

Vbat+ supplied at 7V:

enter image description here

Vbat+ supplied at 8V:

enter image description here

Vbat+ supplied at 9V:

enter image description here

On that last one, the current never stopped increasing and the LOAD_GND_ENABLE signal did a funky dance, but all in all it would appear that the maximum limits were never breached on the LOAD_GND_ENABLE pin (at least I don't think they were... I only have a 2-channel scope and would have had to have been measuring the +5V rail to know what the voltage on LOAD_GND_ENABLE w.r.t. Vcc).

Next Steps

I only have 1 board left that can be sacrificed, therefore my plan is to:

  1. Use a blank ATmega328PB so that all of its' pins will be defaulted to high impedence with no peripherals configured/initialized. Repeat short circuit test to see if ATmega328PB still goes up in smoke. If it doesn't go poof, then the MCU must have failed because it was sourcing/sinking too much current out of one of its pins configured as an output while it was running firmware in the previous tests.

  2. Test with a ATmega328PB mounted on a breakout board (unfortunately this chip doesn't come in DIP packages) connected to the PCB via flywires. Selectively begin connecting a single flywire at a time, running the test, and seeing which flywire ends up being the one that is responsible for frying the ATmega328PB.

  3. Order a new sample PCB with altered layout such that all traces connecting to the ATmega328PB are connected by solder bridges that can be hand-soldered as I test. This way the short circuit test (and any other testing) can be conducted with the ATmega connected to a limited number of signals at a time, and makes it easy to connect all other external circuitry to these solder bridges to control them independently of the ATmega.

Yes, it really is a question(s)!

And the question(s) is:

  • does anyone see anything here that I don't. Is it obvious? I hope its not obvious...
  • What would your next step be?

 

 

I love the smell of burning silicon in the morning

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My next step would be to add polyfuses (self resetting fuses) to those exposed jacks. You may not need a separate fuse for every jack unless all can be loaded simultaneously.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Tue. Oct 16, 2018 - 12:27 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

your jack detect signals look suspect to me - firstly no series resistance and no voltage protection. You have a mosfet that switches the load ground, so the signal jack detect sees maybe in excess of 5V. With no protection the AVR goes poof!

 

Generally it's a bad idea to switch ground - leaves you open to 'sneak circuits'.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looked at the schematic a bit more closely. Having direct connection between the battery and the jacks is a prescription for disaster. Having a resettable fuse is the very least I would do. Consider the malevolent possibility that someone could plug in a different voltage, maybe higher than the battery. So many ways that this could go really wrong. 

 

Jim

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need to redesign this schematic.

 

jaza_tom wrote:

  1. ADC sampling at a rate of 1 Hz would detect the over-current condition and cause the FET_LOAD switch to stop conducting, thus cutting off short circuit current

 

In one second your mosfets are smoke. You need a pure hardware short circuit protection.

As Kartman noticed, imagine the LOAD_SWITCH mosfet is open and customer plugs a load. Before the switch in the jack opens, your micro gets 12V on the load detect pin (depends on the load). You may argue that the barrel has a plastic ring at the front, but would you really rely on it ? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I'm not sure what the point of the post is.. You give a description like you were being rolled down a hill while writing & tossing in some chopped up diagrams along the way.

 

The jacks connect to a powerful 12V bench supply & the jacks also have pins that go directly to the micro.  You insert some metal into the jack to randomly short things together.

 

So the high supply voltage then goes direct to the micro & destroys it..why is that a surprise?    There is no need for a lengthy "article"

 

You even give the reason:  note that these connect directly to some of the pins of the ATmega328PB with no series resistance 

 

Put in some resistors & clamping diodes or other protectors.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When putting a screwdriver into the jacks, you might put your Vbat (12V ?) on the "jack detect" line. Putting 12V into a uC pin is not a good idea.

AVR pins have ESD protection diodes, which apparently can handle a continuous current of 2mA. Put a series resistor in the "jack detect" wires of at least several k Ohm.

 

And as others have written, add more protection.

Think about where fault currents and voltages may go, and how they affect your circuit.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess the circuit is fine, as long as you don't plug in a screwdriver! A normal plug will not smoke the uC, as the 3rd connector will be disconnected and left hanging (pulled up), not shorted to 12V. [This is only true for actual DC connector, not for something like a TS or TRS connector.] As others have said, a resistor or resistor divider will fix it.

 

I guess you will also need some way to prevent shorting out Vbatt to ground, if a screwdriver is plugged in. Today it was a bench power supply, tomorrow it may be a car battery. KABOOM!

 

edit: one also has to consider the real possibility of a user plugging in a looser/thinner plug, which might fit and make contacts, but not disconnect the 3rd pin. Now, if whatever is on the other side of the plug gets shorted, the uC will smoke. user error? I don't know, it's debatable. Possibility of this depends on how good the DC barrel jack is.

Last Edited: Tue. Oct 16, 2018 - 03:18 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jaza_tom wrote:
I'm doing some standard testing;

jaza_tom wrote:
So, naturally I decided to jam a jeweler's screwdriver into one of them

 

Standard test ???    jam screwdriver????

 

I think you need to spend more time finding a better class of customer!  smiley

 

 

Others have explained the results of the test.

 

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks or the advice everyone.

 

It was obvious after all:  LOAD_GND going to > 5V when LOAD_FET was turned off.  LOAD_GND was connected directly to a pin of the ATmega.

 

Will go back to the drawing board on this.

I love the smell of burning silicon in the morning

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jaza_tom wrote:
Yes, that is a haiku.
How do you figure?

Puff of smoke in air.     // 5 syllables

3 different PCBs.         // 7 syllables

Does my PCB have ghosts?  // 7 syllables

https://en.wikipedia.org/wiki/Haiku 

  • Traditional haiku consist of 17 on (also known as morae though often loosely translated as "syllables"), in three phrases of 5, 7, and 5 on, respectively.[4] (An alternative form of haiku consists of 11 on in three phrases of 3, 5, and 3 on, respectively.) However, some authors are critical with the distribution of syllables, such as Vicente Haya or Jaime Lorente.[5]

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why are you unable to draw ONE SCHEMATIC for your setup?  It's not like this is some complex design with 450 components that needs to be split up in to subsections.  You encounter exactly this type of foggy problem, because you can't see what you are dong in one place.

You can read this sentence easily,   t

h   i

s o     n      

     e    I   s      h

       a 

  rd

     e              r

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

You can read this sentence easily,   t

h   i

s o     n      

     e    I   s      h

       a 

  rd

     e              r

 

 

 

ack! that should be filed under "schematic license"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Damn, it was late and it was obvious.  Thanks or pointing out my folly.  I coulda sworn it was 5-7-5 when I originally wrote that "haiku"

I love the smell of burning silicon in the morning

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could always edit your OP to change the subject:

 

Puff of smoke in air.

3 different PCBs.

PCB has ghosts?

 

;-)

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I wonder if this sounds better....

 

In air, puff of smoke

PCBs 3 different,

Has ghosts PCB?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

minimeal wrote:

I wonder if this sounds better....

 

In air, puff of smoke

PCBs 3 different,

Has ghosts PCB?

But:

  • The essence of haiku is "cutting" (kiru).[2] This is often represented by the juxtaposition of two images or ideas and a kireji ("cutting word") between them,[3] a kind of verbal punctuation mark which signals the moment of separation and colours the manner in which the juxtaposed elements are related.

Power moving through.

Testing is going well...  Boom!

PCBs have ghosts.

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmmm... wikipedia says these haiku poems can be circular, so...

 

Power moving through.

All is well...  but white ghost flees!

Test next PCB...