10V AC in PCB kills ATMEGA32U4

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

Well, obviously that voltage will kill the avr on the board I designed.

I have a simple circuit based on the Arduino Leonardo, with two shift registers to read 25 push buttons.

When my boards arrived from the fab house I was excited, and connected everything but when plugged, the TX/RX leds were dim, and a couple of minutes later it started to smoke.
While troubleshooting I removed the dead avr and leaved the traces free and clean. I connected again the USB and the RX led turned on! And it is not connected to anything. So after a lot of hours I set the multimeter to AC and read 6V AC in the LED. So then I placed the probes on the USB power lines and I read 10V AC.

Seems that the trouble is that there's 10V AC coming from my USB port. I know that's not good, but aside, how can I protect the circuit against it?
 

Attached is my sch, layout and photo.

 

 

Thanks in advance

*edit: added images

Last Edited: Mon. Nov 23, 2020 - 11:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No caps on the Xtal?

 

Is the board connected to anything else or just the USB port? Is it a computer port or other power supply?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Mastachi wrote:
how can I protect the circuit against it?
A PolyZen though most USB devices have a PPTC to limit the current; could add a zener diode to a PPTC though there's not much margin between USB VBUS max and AVR VCC max (USB VBUS quiescent current may exceed the limit)

A concern is 10V; pass transistors typically fail short so the USB VBUS supply should have a crowbar on it.

Another concern is 10Vac; a guess is a wall-wart failure (a personal bane) :

  • within the 30Vrms safety limit
  • SMPS are usually conditionally stable (can oscillate resulting in an over-volt)

 

SCD 26613 (Littlefuse PolyZen)

[page 1, left column, last paragraph]

...

The PolyZen ZEN059V130A24LS device is particularly useful for USB 2.0/3.0 powered devices; typically, it draws only 500μA of operating current in USB Suspend Mode.

PolyZen Device Fundamentals (Littelfuse)

The Art of Electronics 3rd Edition | by Horowitz and Hill

Download a sample chapter

[page 120, left column, bottom]

9.13.1 Overvoltage crowbars

 

"Dare to be naïve." - Buckminster Fuller

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

You might want to use the correct resistor values for your leds. From your picture it looks like you've used 22R resistors. The leds aren't going to like that.

The 6VAC you measured on your USB - that is probably a ghost measurement - how did you measure it?

 

 

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

Kartman wrote:
You might want to use the correct resistor values for your leds. From your picture it looks like you've used 22R resistors.

I see 330 ohm on teh LED's and 22 ohm on the USB data lines.

 

Kartman wrote:
The 6VAC you measured on your USB - that is probably a ghost measurement - how did you measure it?

+1

 

If the USB has ANY AC on it, your computer wont be working at all....

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Jim, the schematic says that, but the writing on the led resistors seems to be the same as the 22R on the usb resistors. R3 & R4 vs R5 & R6

 

Last Edited: Tue. Nov 24, 2020 - 02:32 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:

Jim, the schematic says that, but the writing on the led resistors seems to be the same as the 22R on the usb resistors. R3 & R4 vs R5 & R6

 

So it does!  My apologies Russell!

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

No apologies required Jim. 

 

I'd suggest the wrong resistors are the least of the OP's problems - caps on the crystal and pcb layout horrors are next on the list.

 

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


The circuit barely looks like much more than an avr chip with a few caps & 2 leds!! 

For having essentially almost no components (compared to a board with 15 chips & 100 r & C's), the layout looks extremely chaotic, like barely any attention at all was paid during layout.  How can so many wires be going in every which way?

Use your bottom layer for a nice clean ground plane.  With so few interconnections needed, they can certainly 99% be placed on the top, with perhaps 5 or 6  short (<1/2 inch) traces on the bottom. 

 

This indicates that attention to detail is lacking...don't expect to get quality out, until quality goes in:

 

More experience will make better boards, so don't jump off the ship.  But take time to really really work the details every step of the way.  

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

Thank you, I wanted someone to give an honest opinion about it. Attention was paid but without the best criteria. Can you lead me to the righteous way?

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

Before I found that resonators don't need caps, and I've worked like that before. But now I see that even the resonator on the Leonardo has them, 22pf. I'll surely place them.

It is from the computer's USB

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

Take your time----this is not a race.  When you think you are finished, put it aside & come back the next day & look for ways to improve it & neaten it.   After a few tries, you will be much happier.  See if you can keep your traces on the top layer...that requires concentration.  If you can't get there, that is fine, but trying requires you to pay close attention for at least a few hours & you will uncover any trouble spots in the process.   Once you have a good finished layout, throw it away and try again.  You don't get good at golf in one round.

 

The worst news I get is when someone calls & tells me they can have my PCB laid out in 2 hours & my house repainted in five.

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: 1

Be careful not to confuse resonators with crystals. Two different beasts.

 

At a guess, it looks like you have used a crystal, so you'll need to add capacitors. Resonators usually have three pins and have inbuilt capacitors.

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

Thank you for the USB advice and the link, my design is certainly lacking from the PPTC and diode. I'm taking notes for the next attempt.

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

Nobody had mentioned that and YOU'RE RIGHT. I received this board from JLCPCB with SMT service, and something must have happened in the BOM because 22 Ohms is the value for the USB Data lines. Thank you!
I took the measurement by selecting AC Voltage on my multimeter (a cheap one, I must say), placing the negative probe on different gnd pins, and the positive on the anode of the led, and before the resistor. I will check how to avoid and what are ghost measurements.

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

I'll change those resistors ASAP, and will place somehow the 22 pf caps for the xtal. But the layout horrors, and not being able to see them, is pretty bad. Could you point me to some resources that can help?

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

The main thing to understand is that the pcb is more than simply mounting and connecting the parts together. It is a critical part of your circuit. Doing pcb design without the background in electronics means you can only guess what is good and what is bad. I'd suggest you look at commercial pcb designs to see what they do.

 

Anyways, the first thing that struck me was all the copper islands. You just did a copper fill - bad juju. The other was the haphazard power tracks. Try and keep your tracks on one side and try to have an uninterrupted groundplane on the bottom.

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

Make sure that on future designs you place a by-pass capacitor, (0.1 uF), across every pair of power pins, Vcc/Gnd and AVcc/Gnd.

Some micros have several pairs of power pins and each pair needs its own by-pass cap.

 

When you have lots of spare room on the PCB it is often nice to have a small On/Off switch on the V+ supply to turn the power on  and off.

 

Likewise, one can place a normally open push button switch from the reset\ pin to Ground.

That makes it easy to reset the micro, which is sometimes helpful during program debugging.

 

When you have lots of room on the PCB make the traces a little bit wider.

On ecan't always do that with higher density routing.

 

Don't let them beat you up too badly on your board.

Each time you lay one out it will get better.

 

JC

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

For your next PCB you might want to put some holes in the corners and get some plastic or metal stand-offs.

These can be used as legs for the PCB to hold it up off the workbench surface.

That will help keep debris from shorting out traces, etc., on the bottom of the board.

 

The image below shows the concept, although it has a baseplate, (unneeded).

This shows both plastic hex standoffs and (red) metal, cyclindrical standoffs.

 

There are lots of options available!

 

JC

 

Edit: Typo

 

Last Edited: Tue. Nov 24, 2020 - 06:08 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The screenshot of the PCB does not match the schematic. The screenshot shows switches, the schematic doesn't show any!

 

Also, can we see the whole of the PCB please, your photo crops the edges. And both sides.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

Mastachi wrote:
I connected again the USB and the RX led turned on! And it is not connected to anything.

Then you almost certainly have a layout issue or PCB faukt.

 

On the circuit you have posted, without the AVR soldered you could feed in 230V on the USB pins and the LED should still not light.

 

I don't recommend you so this experiment of course.

 

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

Oh holly c**P, the pcb image is looking at it from the bottom of the board!

 

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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

I have designed a new PCB with all your suggestions and new understanding.

The thing is that I want to see if there's a way to make this board usable, mainly to be sure that I've found every problem.

The mystery led was caused by stuck debris which can barely be seen in the photo, but that's solved. 
 

The problem:
Every AVR I solder, after some seconds powered, becomes bricked. Not even ISP programming works.

I have 5 boards, which I've placed the correct resistor values, a 16MHZ resonator (not xtal, the schematic has a confusing symbol, but it does have 3 pins) with 12 nF capacitance, and extra decoupling capacitors because the design had only one and it is recommended one per power pair. Using different boards or new AVR doesn't change the output.  When I connect the USB port, the TX led blinks once, and the RX stays on, and the device is not recognized. The AVR has the arduino leonardo bootloader, which I burned on a Leonardo board.
I don't think it's resonator trouble because I've used the exact same part for other working projects. If it's noise, then why could it become dead?

Really, thank you for your support.

Last Edited: Tue. Dec 15, 2020 - 06:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, we need to see the schematic and the PCB layout.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

12nF???? Do you mean that?

What is the part number of the resonator?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

First of all why aren't FIRST just trying to run it off a 5V supply?..later on run it off USB.  The first layout was quite a twisted mess...did you clean it up?  Don' act like there is a copper shortage when you do....make solid connections.

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

My fault, 12 pF. It's a X322516MOB4SI from Yangxing Tech. From here

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

Well, yes, that bridge was my fault.
With a simple "blink sketch" and connected to a 5V power supply, it does work and the speed seems right.
I'm trying to see if this mess at least can show some life, knowing that if it can't, it can't, but it will not be because of lack of effort.
I have made a better layout, with an almost clean bottom gnd with some power lines, thicker traces and more attention put on which port everything is connected to solve most of the mess with signal traces.

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

I have made a better layout, with an almost clean bottom gnd with some power lines, thicker traces and more attention put on which port everything is connected to solve most of the mess with signal traces.

Keep learning & getting better...Think of having a shelf of your past  "learning experiences".   You will be amazed at your progress when you keep at it.   Start getting yourself some equipment  to help you.--you don't need to spend a lot.  Every dollar spent there is an investment in yourself.

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

So is there a problem now or not?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."