Is it okay to put a large capacitor on AVR reset pin?

Is it okay if I put a 22uF capacitor between the reset pin and ground?

I do not need to re-program the chip and I do not need it to reset quickly at all.
So I thought why not put a big capacitor on the reset pin to make sure no unwanted reset happens. Specially since I've had reset issues with this board.

According to application note AVR042:

To protect the RESET line further from noise, it is an advantage to connect a
capacitor from the RESET pin to ground. This is not directly required since the AVR
internally have a low-pass filter to eliminate spikes and noise that could cause reset.
Applying an extra capacitor is thus an additional protection. However, note that this
capacitor cannot be present if debugWIRE or PDI is used.

If not using High Voltage Programming it is recommended to add an ESD protecting
diode from RESET to Vcc, since this is not internally provided due to High Voltage
Programming. Alternatively, or in addition, a zener diode can be used to limit the
RESET voltage relative to GND. The zener diode is highly recommended in noisy
environments. The components should be located physically close to the RESET pin
of the AVR. Figure 3-1 shows the recommended circuit on the RESET line.

If an external switch is connected to the RESET pin it is important to add a series
resistance. Whenever the switch is pressed it will short the capacitor, the current
through the switch can have high peak values...

This is my circuit:

Yes it will stop the Arduino resetting, if that is what you want. But it will also stop you loading code into it. It is best to put a switch in.

2.2uF or .1uF is good enough.

R1 not needed.

Transistor needs a base resistor.

Those are almost always due to poor circuit design and inadequate power supply decoupling, leading to large dips in the voltage. A large capacitor on the reset pin is not the solution.

2 Likes

I'm not loading code to the chip in-circuit. It is in a socket and I take it out of the socket for programming.

Will 22uF hurt anything. Like mess with the startup somehow?

The application note said the surge current from the capacitor might create oscillations, also like I said I do not need the reset to be quick. In fact I need any fast LOW signal on the reset pin to be ignored. Hence the resistor, so that even if the transistor gets activated by noise it will still take some time to pull the RST low.

Oh yea it does have it. And also a pulldown.

I am fairy certain that the reset pin is in fact being pulled low and it's not a supply issue.

1 Like

What you've suggested will work, but it's a bit of a kludge, really. If you are getting random resets it's better to find out why and fix the actual problem. I suppose you realise this.

So kind of you to let us know this. May I aske please if you wouldn't mind telling us exactly what AVR you are actually using.
It would help tremendously to also have the schematic of your whole circuit so we could see the whole extent of your problem.

I do realize it. I just have not been able to replicate the error that occurred where this board was installed before.

Am I detecting sarcasm? I did mention in my first post that I do not intend to program the chip or have it restart fast.

It's an ATmega8A.

Well if you ask, here it is:

This is a commercial product I am selling.

Terminals D1, D2 and D3 connect to push buttons that are meters away from the board. About 10 meters in this case. The issue was after installation one board kept resetting when powered up. I did some diagnosis and realized one of the buttons was shorted. When I replaced the button the issue was gone.

The button in question has 5 pins and 2 status LEDs in it. But I never realized why a shorted button would be able to cause a reset. The reset was NOT caused by low voltage because I had the B.O.D. set to 4.0V and the reset cause was always external reset (MCUCSR had the EXTRF bit set). Interestingly when I pulled pin28 out of the socket the reset would stop. Meaning that pin28 was actually going high for some reason. Pin28 is used to reset the chip using software.

I replaced the board and the button for the customer. I then brought them home and connected them similarly to how they were connected before and they worked, no resets. So I was unable to replicate the error. So I decided to put a capacitor on the reset pin to make sure no unwanted reset happens in the future because I never need a fast reset. I'm okay even with a 1s reset delay.

The reason I did not mention the details or post the schematics is I didn't want to take people's time for some commercial product I'm making money out of. So I asked a general question instead that could be beneficial to others as well.

Thank you for posting it so small it is imposable for any one to read.

You sure am sister. ( no implication of gender is meant by this comment).

Your username really suits you.

Regarding the image, it is not my fault that they have decided to use the most horrible "forum" software. The actual image is a high resolution 300DPI jpg of the schematic but the site software has decided that me and you have no right to access the original image, and it also refuses to show us a proxied/converted full-size replica too. So here we are.

This is the direct link to the image (hoping it won't be intercepted/converted by the this very smart piece of software): https://i.imgur.com/sroIZKK.jpg

It is not, but it is thwarted by me refusing to have my machine full of tracking software installed on it by that site. Still there we are.

Ignoring the misspelling, that sentence resolves all doubts about your training, experience and technical skills.

Good luck with your "product".

[quote="pourduino, post:8, topic:956461, full:true"]
Terminals D1, D2 and D3 connect to push buttons that are meters away from the board. About 10 meters in this case. The issue was after installation one board kept resetting when powered up. I did some diagnosis and realized one of the buttons was shorted. When I replaced the button the issue was gone. [/quote]

A shorted button would make the wire run to the button act as a loop antenna. On this theory there is potentially inductive pickup on the wire run to the button that is somehow inducing noise on the input which somehow causes the processor to reset.

Also on this theory, a large capacitor on the reset pin probably isn't going to help "fix" the specific issue, but to directly answer the question posed, it is allowable.

If your system is operating in an electrically noisy environment the wire run to the buttons should be twisted pair and perhaps shielded and grounded at one end.

How exactly? And what's with the attitude?

Meaning you refuse to open the image link?

No meaning I refuse to let them down load Cooke's to track me. I am very willing to look at your image, it is just that the web site won't let me look at it.

Ok here's a link in it's purest form uploaded on my own VPS: http://puria.bad.mn/schematic.jpg

Thanks.
I can't see any power and ground connected to the power and ground pins of the 74HC595. Is this somewhere on the diagram I can't see or is it wired up and not shown, or is the chip being parasitically powered? If it is then this could be the root of your reset problems.

You have all the segments of the seven segment display being powered through a single resistor. This means the brightness of the display will change with what ever number is being showed.

Not my favourite way of showing a circuit with mainly disconnected bits all over the place.

No they are connected. They are "internally" connected to the MR and OE pins. (Not my fault, it's how the component was in the library).

Yes I know but it doesn't matter. It's only a debug/config display. It's off most of the time and is used only by service persons. So board space is much more important here than aesthetics.

Well it's rather big and the "wire management" would be difficult if I were to actually connect components together as opposed to using labeled terminals.

Also, last time I posted on this forum complaining about the way ICs are commonly depicted in schematic diagrams I was instructed that I should use labeled terminals if I don't like the mess that is made when schematic pins positions don't match their footprint positions.

That is a big big error. Parasitic powering can cause all sorts of latch ups and damage. It is a poor excuse that it came in the library like that. The library needs to be corrected, this is amateur stuff. Try putting a mod wire into the real power pins of this chip. But I suppose it is one way of making a circuit fail so you can sell them a new one, but its not very ethical.

I am not sure you understand how to correctly draw schematics, sure use on page reference points but you must keep them to a minimum. Normally just the power a grounds, and isolated sections like the contact side of the relays. The use of busses in schematics is one way of showing connections without the schematic looking messy.

That was very poor advice. The pin positions SHOULD NOT match the footprint positions. And in any half decent PCB layout program you can move them. Remember a schematic is to show the signal flow in as simple a way as possible and having all the pins in the same order as the chip gets in the way of showing the circuit.

No professional engineer would dream of doing this. I have worked in big and small electronics companies and they all disengage pin positions from positions on the schematic.

I'd like to emphasise that point - it is fundamental.

There are two types of diagram used in electronics: circuit diagrams (called schematics outside the UK), and wiring diagrams.

Circuit diagrams give no indication of how the components are wired up. Rather, they are diagrams which show the data flow and overall function of the circuit - in other words, they are a logical representation of the circuit, not a physical representation. In circuit diagrams no attempt is made to represent or match component pin layouts (apart from showing the package pin number), and sometimes chip packages are broken apart. For example, a quad op-amp may well be drawn as four separate op-amps in different parts of the circuit diagram. The only indication that they live in the same package will be numbering along the lines of IC2a, IC2b, and so on.

Wiring diagrams are different: they represent how the circuit is wired up, and include additional information like the types of connectors, etc. Multicore wires may be shown leading out to sensors. Quite often wiring diagrams give information on wire colours. Because it represents the physical circuit, a wiring diagram will show the correct IC and other component package pinouts.

Many professional systems come with both circuit diagrams (e.g. for fault-finding) and wiring diagrams (e.g. for build or installation). For our purposes all that matters is that we are quite clear what type of diagram we want, based on what we intend to use it for.