3
\$\begingroup\$

I am fairly new to electronics and have bummed into a situation.

I was working on a project recently involving an Arduino Nano. Up until now, everything was on a breadboard. I had the flexibility to upload all sorts of code to it.

Last weekend I thought it's getting a bit messy with all the wires and stuff. Let's get a custom PCB of it. I designed it and placed the order with a local vendor.

The thing that I did not consider before placing the order was how to upload the code on the Nano now.

From the Gerber file, I am confident that the PCB which is going to arrive shortly will not have the USB port.

Without the USB port, how will I transfer my code to the PCB?

Did I miss/skip a step during all this where I tell the vendor this code needs to be present on the PCB, or will I still have the option to upload my code?

\$\endgroup\$
3
  • \$\begingroup\$ A blank MCU would not have a bootloader anyway even if you had a USB serial port. \$\endgroup\$
    – Justme
    Apr 30, 2021 at 13:47
  • 2
    \$\begingroup\$ If you forgot to include the programming header you can solder the MCU into a different board, program it there and then move it to your final board, at least until you do a new hardware revision. \$\endgroup\$ Apr 30, 2021 at 16:16
  • \$\begingroup\$ "the PCB which is going to arrive shortly will not have the USB port." - The Arduino Nano has a USB port built in. Please explain why yours won't have one when put on a 'custom PCB'. \$\endgroup\$ Apr 30, 2021 at 21:22

2 Answers 2

6
\$\begingroup\$

If your code doesn't need USB to run (e.g., it doesn't read or print to serial) and only uses USB to upload code, you actually did the "right" thing by not adding a usb to the board.

You can, instead, use the native ICSP interface to upload code. You don't need a bootloader at all (the bootloader is the thing that allows you to upload code "normally" over usb). You'll still use your computer's USB port, but the atmega's ICSP.

See instructions at: https://www.arduino.cc/en/Tutorial/BuiltInExamples/ArduinoISP

Specifically the description about what is an ICSP and bootloader. The circuit diagram you need is above the text "This Arduino NANO is programmed through its ICSP connector with wires coming from D10-D13 of the programmer UNO board."

\$\endgroup\$
1
  • \$\begingroup\$ While this should work, I found out the vendor was not going to mount the Arduino on the PCB. All they were going to do was fabricate a PCB with just the pins and the connections amongst them :/ \$\endgroup\$
    – dravit
    May 4, 2021 at 10:09
3
\$\begingroup\$

Like @Justme says in his comment, the blank Arduino Nano chip (ATmega328) doesn't have a bootloader on it. Better yet, it has nothing on it.

For this you could use an Arduino Uno as an ISP. See this link.

After this, you can theoretically upload code to it. This can be done with a TTL to UART (serial) converter. Something like this.

However, you'll need to make some connections. I don't know if you added any headers or connectors to the board, but you'll need to connect 3V3, RX, TX and GND.

\$\endgroup\$

Your Answer

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

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