Voodoo decoupling capacitor

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

I have two Attiny13A-PU circuits on a breadboard. I was having a problem that looked like random resets. I pared the code and the hardware down until they were both running nothing more than a fancy LED blinker, and the glitches were still happening.

I diagnosed the problem and found that they weren't resets, but instead the MCU program counter was jumping to a random location at random times, eventually wrapping around to PC=0 and hitting the reset vector.

Both Attiny's were doing this. I decided to remove one from the breadboard. Problem went away.

I put it back in the breadboard, but 15 rows away. Problem reappeared.

I put it in way at the other end of the 63-row breadboard. Problem went away.

I put the second one back in right next to the first and added more decoupling--I added a 3.3uF in parallel with the 0.1uF that was already there. (I don't have a ferrite bead recommended by AVR042.) Problem went away.

HERE'S THE VOODOO PART:

I pulled the 3.3uF out of the circuit while it was running. Problem did not return.

I've repro'd this three times: Power the circuit up without the 3.3uF, glitches occur. Add the 3.3uF while running, glitches go away. Remove the 3.3uF while running, glitches do not return, for as long as I've watched it. Completely reproducible.

Any explanation? Could this be an electrolytic-homeopathic capacitor?
:D

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

Try other caps, maybe the one you're using is ( going ) bad... ?

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

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

Good idea. I pulled out the 0.1uF's and tried a few other ones, from a different manufacturer and from the same batch. No difference. I measured them with a multimeter and they're within a few percent of 100nF. I don't have a handy way of measuring their ESR.

More voodoo: I removed the 0.1uF's altogether. The circuit is even more glitchy on power-up, but once again, if I momentarily add the 3.3uF to one of the MCUs and then remove it, the circuit seems completely stable.

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

Quote:
I put it back in the breadboard, but 15 rows away. Problem reappeared.

I put it in way at the other end of the 63-row breadboard. Problem went away.

Maybe it's the breadboard that's workin' the voodoo ! :? Got another 1 to try ( even a small 1 ) ?

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

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

I will do that.

I finally did observe some glitches with the decoupling caps completely removed. But they occur much less often after momentarily adding the 3.3uF. Still no glitches with the 0.1uF's in place, except after power up and prior to adding the 3.3uF.

I should make a video of this, it's really weird.

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

New breadboard, on battery power, no glitches.

New breadboard, on lab supply power like the old breadboard--glitches! Grrrr! It's my stupid power supply.

Never had problems before but this is my first time using Attiny's. I never saw this sort of thing on the Atmega's I've used.

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

Lately I found that a Tiny13 is that picky too. So proper decoupling becomes more and more an absolute necessaty.

Now I am curious what your power supply looks like: would you mind posting a picture ?

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

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

And perhaps an O'scope picture of the V+ rail and the noise on it?

JC

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

20mV/div, 200 nS/div

The largest feature here repeats at F_CPU which is 1.2 MHz (internal 9.6 MHz clock divided by 8).

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

...divided by 8, not 8)

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

Ok, nobody got the power supply joke? Or it just wasn't funny?

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

Quote:
Ok, nobody got the power supply joke? Or it just wasn't funny?

It's kind-of funny, but we see it all the time ....

Attached a picture from a Dutch distributor. Very tempting to buy one, but then I realised it must be cheap crap because for € 45 I can't even buy the parts ! Even in China.

Attachment(s): 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

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

Quote:

Lately I found that a Tiny13 is that picky too.

Would that be a switch from tiny13 to tiny13A by any chance?

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

Quote:
Lately I found that a Tiny13 is that picky too.

Leon will have a go at you Plons, for suggesting that it is PICky! :)

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

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

The PICkyist AVRs are the 6-pin Tiny10 etc. :)

Leon Heller G1HSM

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

clawson wrote:
Quote:

Lately I found that a Tiny13 is that picky too.

Would that be a switch from tiny13 to tiny13A by any chance?
No, it was just an ordinary Tiny13. Just 3cm of copper wire to a 100n decoupling cap was enough to make it start erraticly. Never saw that before.

@Lee & Leon: :)

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

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

It was cheap, that's for sure. Next power supply is going to have "coarse" and "fine" adjustments. Knocking it off of 5.0V (which means 50mV off since it only shows one decimal place) is just a brush of a fingertip on the adjustment dial.

It would also be nice to have 4 significant digits in the displays, but I realize that getting 10 times the accuracy isn't trivial.

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

Plons wrote:
Just 3cm of copper wire to a 100n decoupling cap was enough to make it start erraticly.

And of all the things to go wrong with it in my case--the program counter jumping off the rails. It couldn't be losing bits of ADC accuracy, or some increased internal RC clock jitter, or something like that. Nope, nothing less than irrecoverable program failure.