Pages: 1 [2]   Go Down
Author Topic: Big capacitor near microcontroller - Circuit stops working  (Read 2692 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry - I didn't catch that.

Still it is difficult to explain this issue besides faulty wiring. Other than that I would check reset, power (including brown-out detection)  and clock.
Logged

'round the world...
Offline Offline
Faraday Member
**
Karma: 42
Posts: 3219
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Stupid question, can you take the capacitor out of the circuit? Or change the program you're using to troubleshoot the problem?

If you're not sure if it's the capacitor or the software, changing one of them would be enough to determine that. Also, what's the voltage on the capacitor pins once it finishes charging?
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12741
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Could the capacitor be defective?
Logged

Brasília, Brazil
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't think the capacitor is defective, as I switched it and the problem wasn't solved...

bubulindo, I took the capacitor out of the circuit, and the problem never happened again. I'm just trying to understand what happend, so I don't make the same mistake again.

BenF, I also don't think that wiring problem. I soldered it, but it's a manucfatured board. Reset is right, and the brown-out detection is disabled. Also, I checked the 3v3 line after the system got stuck, and it's just fine... fixed at 3v3
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26344
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So what is the capacitor voltage starting at and ending at?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Brasília, Brazil
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It just goes to 3v3 when I power the circuit and stays there forever...
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26344
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

And when it gets to 3.3V the circuit stops working? Watch it with a scope - does it ramp up smoothly, or does it look to have some switching noise or something on it?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Brasília, Brazil
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As i pondered before, it was more like a coincidence that the circuit stopped working and it worked again when I discharged the capacitor.

It stops working long time after the capacitor charges completelly... It has a ripple noise of around 100mV... There are also some 300mV spikes..
« Last Edit: March 20, 2011, 12:10:38 am by brenin » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26344
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That sounds like a really crappy power supply, or there is some other signal connected in.
What are you using for a power source?
With that size cap, it should be a lot smoother.
« Last Edit: March 20, 2011, 12:15:13 am by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Brasília, Brazil
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I might be getting somewhere in the other forum (avr-freaks: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=104717&postdays=0&postorder=asc)... There was a suggestion that maybe my capacitor (which probably has relativelly high ESR) is introducing noise to the supply source with the raise of both the output capacitance and ESR for the supply source with the extra capacitor inserted.

CrossRoads, I'm using a L5973D based circuit using the 12V of a regular computer power supply. I'm getting a ripple of around 100mV...
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a circuit and when I put a big capacitor (330uF) near the atmega, the atmega gets stuck after running for a while. When I discharge the capacitor the circuit works again for a while and then stops again. On oscylloscope, i saw that the circuit stops working after the capacitor charges.

I don't understand this bit. Until the capacitor charges, the processor does not have full VCC voltage, right? So it shouldn't be working before it charges. And you are saying it doesn't work *after* it charges. So it doesn't work at all, basically?

What the capacitor might be doing is confusing the processor with a slow VCC ramp-up. At a certain threshold the processor detects that VCC is high enough and initiates reset processing. But the very act of doing this causes extra power consumption (eg. pull-up resistors) which drops VCC down below operating voltage. The processor might be confused.

What might help is a capacitor/resistor on the reset pin that delays reset processing slightly.
Logged

Brasília, Brazil
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As i pondered before, it was more like a coincidence that the circuit stopped working and it worked again when I discharged the capacitor.

It stops working long time after the capacitor charges completelly... It has a ripple noise of around 100mV... There are also some 300mV spikes..

Quote from: Nick Gammon link=topic=55711
I don't understand this bit. Until the capacitor charges, the processor does not have full VCC voltage, right? So it shouldn't be working before it charges. And you are saying it doesn't work *after* it charges. So it doesn't work at all, basically?

The circuit works after the capacitor is charged... It actually charges pretty fast, much faster then the time needed to get stuck...
What happens is that it stop working after running for some time (i.e hours on the first time it happens and up to minutes on the following occurrences)
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Off the top of my head, I think you're just using way more power supply than you need.

You have a switch mode regulator that can switch 2.5 amps powering a 3.3 volt circuit drawing a few milliamps or so.

And, to make it's life hard, you have a 330 uf capacitor on there too.

Add some resistive load. Make that regulator do at least a little work. That should also reduce the ripple on the 3.3 volt output.

"It stops working long time after the capacitor charges completelly... It has a ripple noise of around 100mV... There are also some 300mV spikes.."

See what's happening? When the regulator sees the voltage start to drop, it turns it's switch on and drives current through the output inductor. It can't just switch to a smaller switch when there's virtually no load on the output. The result is excessive ripple on the output. It's like using a firehose to fill a drinking glass.

Even though... it SHOULD be able to handle it better. I gotta wonder how far away from the regulator the circuit is, and if you have a large capacitor (330 uf or so) at the regulator as well.

The worst possible set up is the regulator more than a few feet away, with no output cap, and then the 330 uf cap right at the CPU.
Logged

Linux and Arduino, two great things that go great together!
http://www.roboticcore.com

Worcester, MA
Offline Offline
God Member
*****
Karma: 3
Posts: 623
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The datasheet for that regulator shows a 330uF cap on the output, however if you look at the BOM it's calling for a tantalum cap.  Crossreferencing the cap in the BOM shows it is a very low ESR cap (in the 40mOhm range).  If you have a tantalum cap at that value, try it instead and see if your problems go away.  If you only have electrolytic caps try placing several smaller caps in parallel to get to the 330uF value.  If the parallel approach works then it's possible the problem is with the ESR value.
Logged

I2C GPS Shield

Checkout my Open Source GPS Tracker on Kickstarter

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33314
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Let's assume everything is connected as per the diagram (which is in some doubt).

If you can see the capacitor charging, then during that time the arduino is running on less that the supplies voltage output.
The fact that you can see it charging implies the power supply has quite a high input impedance.
When it does charge up the processor stops.

Possible causes:-
1) If a voltage regulator is fitted there is not enough voltage drop across it to make it operate properly when there is 5V on the output side.
2) The power supply is some value over 5V which is stopping the clock oscillator from working when the supply voltage finally reaches it.
3) A low voltage drop out regulator is being used. They don't like too much load capacitance as it makes them unstable.

However best guess is that there is something else going on.
Logged

Pages: 1 [2]   Go Up
Jump to: