3
\$\begingroup\$

I am trying to build a barebones avr based circuit, based on designs i found on the internet.

My questions are based on this sub-circuit:

enter image description here

  1. I don't plan on using a Reset button, thus S1 will be omitted. Should I remove resistor R3?
  2. There are two capacitors in parallel (C2 and C3), with C2 being an electrolytic capacitor. Then capacitor C1 is in series with capacitor C2. Are all those capacitors needed, or some of them can be omitted as well?

EDIT: This is the picture that user Justme requested. enter image description here

\$\endgroup\$
3
  • 3
    \$\begingroup\$ The reset goes somewhere else. Also the supplies. We can't see what could be removed or not as there's items off the screen. But why are you copying existing schematics and asking what can be removed, as AVR datasheets and hardware getting started guides start from what are minimum requirements for proper operation? Do you plan to use ADC? If yes, how noisy results are enough? So what components you need depends on what the AVR must do and at what specifications. \$\endgroup\$
    – Justme
    Commented May 6, 2023 at 20:43
  • \$\begingroup\$ @Justme The reset is connected to the resonator component. I do not plan on using an ADC. \$\endgroup\$ Commented May 6, 2023 at 22:07
  • \$\begingroup\$ I suspect that the wires at the bottom left are Ground, so the three capacitors are for power supply bypass. C1 is not in series with C2 and C3 - it is a bypass for AREF. \$\endgroup\$ Commented May 6, 2023 at 22:16

3 Answers 3

4
\$\begingroup\$
  1. The existense of a button makes no difference to the requirement of a resistor really, but other things. AVR does have han internal pull-up resistor on the reset pin. So in theory you don't need the external resistor at all. In practice, it's better if it is there, depending on your application and where else it is connected to, as it's not shown.

  2. Capacitors C1 and C2 are not in series. Depending on if you use ADC or don't mind about some noise present on measurements, you can leave out C1 in theory. But it's better if it is present if you are going to use internally selectable VREF voltages. If you intend to use VCC as reference, just remove the cap and connect VREF directly to AVCC or VCC.

C2 may not be required as it is for low frequency bulk bypass. It depends how you power the board and what else there is on the board, and are there regulators on the board etc. C3 is very important and must be very near to the AVR as it is for high frequency bypass.

\$\endgroup\$
9
  • \$\begingroup\$ Thanks! I am planning to use a regulator to drop 12V voltage (from transformer) to 5V, in order to power the board. Does this mean i can omit the C2 capacitor? As for the C1 capacitor, I am not directly using the ADC, but i use arduino's tone() function in order to produce some basic sounds. I am not sure if this function uses the ADC, but i know it performs PWM. Finally, the reset button is connected to the resonator, does this mean the R3 can be omitted as well? \$\endgroup\$ Commented May 6, 2023 at 22:11
  • \$\begingroup\$ Everything depends on which regulator it is. We don't know that or how your final system will look like. Generating PWM does not use ADC. What resonator you are talking about? \$\endgroup\$
    – Justme
    Commented May 6, 2023 at 22:27
  • \$\begingroup\$ This is the resonator i had in mind: Murata Electronics CSTCC8M00G53-R0 \$\endgroup\$ Commented May 7, 2023 at 22:07
  • \$\begingroup\$ @user1584421 The reset button does not connect to a resonator. It makes no sense. \$\endgroup\$
    – Justme
    Commented May 7, 2023 at 22:12
  • \$\begingroup\$ sorry, it connects to GND. The resonator connects to GND as well. \$\endgroup\$ Commented May 9, 2023 at 12:18
3
\$\begingroup\$
  1. Do not remove R3. It pulls up the /RESET line high. It needs to stay.

  2. Keep the capacitors. One is effective at higher frequencies, the other one at lower frequencies. If anything, bump C2 up to 47μF or even 100μF, while keeping C3.

  3. C3 needs to be as close as possible to the MCU. C2 can be farther away.

  4. C1 is for the A/D reference voltage. It has to stay.

  5. You'll want to post your PCB layout here and get feedback.

\$\endgroup\$
6
  • \$\begingroup\$ Isn't a reset line can be connected directly to vcc without resistor? \$\endgroup\$
    – Selvin
    Commented May 6, 2023 at 19:39
  • \$\begingroup\$ @Selvin Not if you want to use it as GPIO. \$\endgroup\$ Commented May 6, 2023 at 19:45
  • \$\begingroup\$ Does OP need C1 if not using ADC? \$\endgroup\$
    – Selvin
    Commented May 6, 2023 at 19:48
  • 2
    \$\begingroup\$ @Selvin the reset in pin is typicall used for the ISP (programming) header, in which case it couldn't be tied direct to VCC. \$\endgroup\$ Commented May 6, 2023 at 20:46
  • \$\begingroup\$ @Selvin It's supposed to be a general purpose board... not using the ADC defeats the purpose of the thing. \$\endgroup\$ Commented May 6, 2023 at 20:56
2
\$\begingroup\$

R3: you can replace this with a wire if you do neiter want to use an in circuit system programmer (like AVRISP, or USBasp ) to update your AVR nor use single wire debug.

C2.C3 this pair represent the capacitor technology of the late 1990s these days you can get a 10uF MLCC and that will cover the roles of both capacitors.

C1 only needed if you're using the ADC.

\$\endgroup\$
5
  • \$\begingroup\$ R3 can be replaced by wire, or removed as the AVR has built-in resistor. Using a single 10uF may be worse than single 100nF, at the frequency the AVR runs at. It depends on capacitor ESL which basically is related to package size. Small package is better for ESL but otherwise worse, as 10uF small capacitor may not be 10uF due to voltage bias of MLCCs, so if you need 10uF that's a problem. And C1 is not needed even if you use ADC, it just somewhat improves results but it can be left off, especially if AREF is connected to AVCC directly. \$\endgroup\$
    – Justme
    Commented May 7, 2023 at 13:03
  • \$\begingroup\$ The programmer that I intended on using is the Pocket AVR Programmer. Hookup guide is located here: learn.sparkfun.com/tutorials/pocket-avr-programmer-hookup-guide/…. Do I need the R3 resistor, when utilizing this method of programming? \$\endgroup\$ Commented May 7, 2023 at 22:11
  • \$\begingroup\$ It might work with no resistor there, it will definately not work with wire instead of a resistor. \$\endgroup\$ Commented May 8, 2023 at 1:01
  • \$\begingroup\$ @Justme If the C1 is removed, should the wiring remain the same, or should I connect AREF to AVCC directly? \$\endgroup\$ Commented May 9, 2023 at 12:53
  • 1
    \$\begingroup\$ @user1584421 It does not matter, if you don't use ADC, and don't even initialize it. \$\endgroup\$
    – Justme
    Commented May 9, 2023 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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