I built an Arduino using ATmega328 on perfboard. To power it, I used an 8V adopter with a 7805 IC. But the ATmega328 IC started to reset randomly. After some efforts I figured out that the problem was not using decoupling capacitors. So I used a 100uF and 10uF electrolytic capacitor at the input and output respectively. Though it helped to solve the problem but the IC still sometimes gets reset. I tried to look online but they do not tell anything except using the decoupling capacitors. I would be grateful if someone could explain:

  1. What other measures can I take to prevent this fluctuation
  2. Which capacitors are best for this purpose of AC filtering
  3. What specific values are good and is there any method to calculate them based on the load requirement

I hope this would not turn out to be a duplicate question!

| improve this question | | | | |
  • 2
    \$\begingroup\$ Does your 7805 get too hot to touch? \$\endgroup\$ – Steve G Aug 28 '19 at 15:14
  • 3
    \$\begingroup\$ What is the actual meaured input voltage to the 7805? Do you have any ceramic decoupling capacitors (eg. 100nF) near the ATmega? \$\endgroup\$ – Spehro Pefhany Aug 28 '19 at 15:16
  • \$\begingroup\$ No it is just warm, Not hot... And the voltage output is almost 4.95V. I do not have a ceramic capacitor near Atmega. I used two ceramic caps just for clock source. \$\endgroup\$ – Bhuvnesh Aug 28 '19 at 15:16
  • \$\begingroup\$ Have you left digital I/O pins floating? Most default to being "input" rather than "output". Floating IO pins can cause all manner of problems. \$\endgroup\$ – glen_geek Aug 28 '19 at 15:50
  • 1
    \$\begingroup\$ insert a single resistor, value ONE ohm, in the input (RAW, unregulated) to the 7805; this makes a fine Low-pass-filter for narrow spikes. \$\endgroup\$ – analogsystemsrf Aug 28 '19 at 16:52

You're probably seeing short transient dropouts. Use 0.1uF ceramic caps across the power and ground pins of all your ICs, and keep the leads/traces as short as possible.

| improve this answer | | | | |
  • \$\begingroup\$ Thanks Cristobol, but I am really curious as what difference does it make using a ceramic capacitor rather than an electrolytic one. I would be glad if you could explain. What are the sources of these transients? \$\endgroup\$ – Bhuvnesh Aug 28 '19 at 15:21
  • \$\begingroup\$ Cercos have much lower ESR than most other Caps. This is better in terms of stabilising a voltage. Also Cercos have a much bigger lifetime. \$\endgroup\$ – Ariser - reinstate Monica Aug 28 '19 at 15:29
  • 1
    \$\begingroup\$ Larger caps have lower resonances, and electrolytics don't react as quickly as ceramics. That's why typical practice is to use electrolytics for large bulk capacitance and ceramics for the high-speed decoupling near the part. \$\endgroup\$ – Cristobol Polychronopolis Aug 28 '19 at 15:34
  • 1
    \$\begingroup\$ The source of the transient current load on CMOS logic is that each time a gate switches from one state to another, it pulls current. PCB traces, or wires on a perfboard, have inductance, so a sudden current drain turns into a sudden voltage drop. So you want to put 100nF ceramic caps right at the IC, with as short of wires as possible. \$\endgroup\$ – TimWescott Aug 28 '19 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.