ATtiny programmer and protoyping PCB - schematic review

I’ve taken the plunge on a project to learn about designing a PCB, which I’ve never tried before. I’m using EasyEDA. (I know there are ready-made boards to do similar things to what’s described, but I wanted a learning experience.)

Project goals:

  • Create a PCB where a Nano can program an ATtiny84 or ATtiny85 (obviously only one at a time!!)
  • Use the same PCB to allow prototype testing of the ATtiny chip that was programmed

Implementation:

  • The nano will be mounted into female headers on PCB so it can be removed/swapped out as needed.

  • For programming, the Nano will be connected via USB to my computer. The Nano is connected via SPI/ICSP to 2 sockets to accommodate the different sized chips.

  • I will have 2 IC sockets on the board to set either type of ATtiny chip, depending on the chip type.

  • To minimize chip movement and to also enable prototype testing after programming, I’ve connected headers to the pinouts of the ATtiny chips. That way I can connect them to a project breadboard etc for testing/debugging.

Attached is the schematic I’ve done for the project.

Before I start routing all the tracks on the PCB model, I want to make sure I haven’t goofed anything major. (it’s my first ever schematic - please be gentle!)

A couple of questions/things to note:

  1. I put a diode (D1) on the +5V pin of the Nano. My theory here is to allow the Nano to power the ATtiny during ISP programming, but I want to power off the Nano by disconnecting its onboard USB, and then supply external power to the PCB to power the ATtiny chip (via either the PCB-mounted USB-B or the power header #### ) bypassing the Nano. I had an instinct that I should only power the ATtiny chip and not the Nano during prototype testing of the chip given all the SPI connections, but I’m not sure if this is necessary. Is it?

  2. The switch SW1 connects to a capacitor (C1) across the Nano’s Reset pin and ground. This enables me to toggle whether the Nano is reset or not when uploading from the IDE, to enable easy ISP programming.

  3. Programming/error/heartbeat LEDs connected to the Nano to monitor programming.

  4. Onboard “blink” LED on the PCB that can be used to test the ATtiny chips.

  5. Decoupling capacitors (C2 and C3) on the chip power pins.

Look forward to any comments or thoughts folks might have after reviewing this.

Schematic_Arduino PCB_Nano Programmer_20200310203053.pdf (73.5 KB)

D1 is backwards (why do you have it ? ), C1 needs a discharge path.

Schematic_Arduino PCB_Nano Programmer_20200310203053.pdf (73.5 KB)

Thanks, Larry, for the review and input.

D1 is oriented in that direction deliberately to allow power out from the Nano out to the +5V net. (The direction of the +5V net flag is a little confusing on the schematic, which kind of implied the Nano is being supplied. It's not.). So the idea is that the Nano's 5V pin provides power to the ATtiny chip when the Nano's onboard mini-USB jack is connected (for programming mode). Otherwise, the Nano is shut down, and power is supplied to the PCB directly (bypassing the Nano) in order to power the ATtiny chip. In this case, I didn't want to "turn on" the Nano, hence D1 which would prevent power on the +5V traces from powering the Nano.

All that said... I'm definitely not sure if D1 is necessary. I have no idea know if there is a downside to having the Nano being powered when I am in "prototyping" mode for the ATtiny chip. So any advice on that is welcome.

Regarding C1, how would I set up a discharge path?

Further to C1 in the schematic...

I was going for something like this, but just adding a switch so I can enable or disable the action of the capacitor:

“ Regarding C1, how would I set up a discharge path?”

Place a resistor across it. example 10k.

larryd:
“ Regarding C1, how would I set up a discharge path?”

Place a resistor across it. example 10k.

Larry, see below – is that what you mean in terms of resistor placement?

In examples I’ve seen online, they just attached the capacitor directly to RST and GND without the resistor (but those designs didn’t have a switch).

Are you advising to use resistor for discharge for when the switch is open in my design?

Schematic_Arduino Bootloader PCB_Sheet_1_20200311205837.pdf (17.6 KB)

Hi,
Rather than attach pdf files, you should be able to attach an exported jpg image from your CAD program.
A jpg is easier to view and you can embed the image into your post.

Tom.... :slight_smile:

Yes that connection should work fine.

For completeness, here is an image from the file posted at #5.

@larryd, thanks for the guidance.

@TomGeorge quick side note: yes, normally I try to embed images! But I was really wrestling with EasyEDA's image export feature. For a small schematic like that, it was exporting a huge sheet as a jpg, so the relevant section was small and pixelated. I'm still trying to figure out a better export workflow in EasyEDA.

When turning a Nano into an ISP programmer (pro tip: get a USBAsp programmer, even easier!) just connecting a 10µF cap (that C1) between reset and GND works fine. The reset pin has a pull-up resistor on the PCB of the Nano, which is its discharge path.

C2, C3 should be ceramic type - the 1-22µF value is very large for ceramic and for the purpose of that capacitor; normally 100 nF is used. Place it as close as possible to the Vcc and GND pins of the chip.

@wvmarle
Thanks very much.

Yes, I had seen several online examples of the cap between RESET and GND being used for programming. In making my programming PCB board, I wanted to permanently install the cap on the board and be able to enable with a switch only when needed for programming the target chip. So I understood larryd was advising to have the extra resistor for when the switch is open (ie, the cap is not being used to connect RESET and GND).

Re C2 and C3… thank you. I’ve revised them to 100nF. I also added a 4.7uF cap next to each (but keeping the 100nF on closest to the chip). I

Remember to add mounting holes on you PCB.