New Arduino based PCB - how to make it Arduino-compatible

I plan to make an own circuit board based on the Arduino Nano v3. I have all the schematics, I contacted some PCB manufacturers, so the physical board I can have manufactured, BUT

and now comes the big question mark: how do I make my board Arduino-compatible. How can I program the Atmega328 to accept Arduino code? What do I have to place on the PCB for that?
Does the USB chip need any programming or extra consideration?

I would like to avoid having a piece of HW in my hands just to recognise I did not get all relevant informations.

I know that the answers are probably out there somewhere, I just cannot find them...

Thanks a lot in advance to help me here! Highly appreciated!

Any hint here? Please also tell me if this question is somehow bad/inappropriate or the answer is well known...

"How can I program the Atmega328 to accept Arduino code? "
Just need access to the pins, however you connectorize that. Or not, even, with the right programming adapter:

This one just presses down on a SMD 328P to connect to VCC, Gnd, SCK, MOSI, MISO, Reset for bootloader installation.

ICSP header makes it easy to add bootloader with a programmer, or a sketch with a programmer and File:Upload Using Programmer.
After bootloading, having an FTDI header will let you plug on an FTDI Basic and download sketches like you would any Arduino. FTDI chip does need any programming.
Once you have FTDI connectivity (onboard with a chip, or offboard with a module), then the bootloader is the only part needed for Arduino compatibility.

Thanks a lot CrossRoads, that gives me a better confidence to go on! I need to have a look at this piece of HW, but it's promising, since I might not need the sticking out ICSP pins.

My current understanding was that for bootloader programming I need another Arduino to upload the code to the new board. Is that true or with the depicted HW I can directly burn the code using a PC?

If you don't put a pre-programmed part on the board, then you need a Programmer to burn the code from a PC. Can be an Atmel AVR ISP MKii if you have one (discontinued by Atmel), a clone of that, an Arduino with a programming sketch loaded, a programmer like this one or based on this one
ISPnub - Stand-alone AVR In-System-Programmer Module - fischl.de,
or a standalone programmer like mine that burns a file from SD card with no PC needed (basically an Arduino with SD card and a programming sketch)


but you need access to the 6 pins to do that: SCK, MISO, MOSI, Reset, Power, Gnd. Can be a standard 2x3 ICSP header, can be 6 pads that you press programming pins against, can be the Hobbyking adapter that you press against the part.
I prefer to put an ICSP header on my cards, such as the 2x3 header you see on my programmer next to the rotary encoder, and on this '1284P board, while on the '328P card below I just used a 1x6 header

D11-12-13-RST-GD-+V header here seen clearly on lower right board

Or if you can access the IO pins by other means, do that, as I did on the Bobweeny here:

Thanks Crossroads.

So as a baseline I need a programmer to be connected to a PC and from the programmer a gadget to contact the necessary pins to program the processor.

The ICSP header I would like to avoid, as the boards will have to be small without protrusions, therefore I still like the adapter I only need to press against the processor itself. I only hope it's really that easy.

BTW, you mentioned pre-programmed parts. It does suggest I can order Atmega328 with Arduino bootloader already burned in?

Hi - if you are Europe based - see here : https://proto-pic.co.uk/atmega328-tqfp32-with-arduino-bootloader/ - we can post to the US, but transit times are in excess of 2 weeks at the moment.

"So as a baseline I need a programmer to be connected to a PC and from the programmer a gadget to contact the necessary pins to program the processor."
Or a standalone programmer, where the file to be loaded is coming from SD card (like mine) or from other media.

Programmed ATmega328P can be purchased from places like digikey.com. I don't know what quantity you need to order to make that economically viable vs just press & hold the programming adapter above. I did 20 cards a couple weekends ago, it is not hard.

CrossRoads:
"So as a baseline I need a programmer to be connected to a PC and from the programmer a gadget to contact the necessary pins to program the processor."
Or a standalone programmer, where the file to be loaded is coming from SD card (like mine) or from other media.

Programmed ATmega328P can be purchased from places like digikey.com. I don't know what quantity you need to order to make that economically viable vs just press & hold the programming adapter above. I did 20 cards a couple weekends ago, it is not hard.

Hi CrossRoads,

A very big good news and a slightly less good one:

Good news: a new family member of the Arduino break-out boards was born, I received my first DIYino board just recently and it works!!! (I'm no excited I could jump up and down from joy, it's really a satisfying feeling to hold an own design in the hand and know that it works as expected!) For the first few samples I had a mix of boards with Atmegas with and wo/bootloader.

Hick-up: as I expected from experience, burning the bootloader did not work right away using an Arduino Nano as an AVR ISP programmer. Well, this was about the only thing I did not had the chance to try out up-front. I still do no know if the problem is on the sending side (ISP) or on the receiving one (new DIYino wo/bootloader) but I suspect the former, since even if I do not hook up the DIYino, I get exacly the same message from the IDE:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
...

So far I do not have a clue how I'm going to approach this problem, but I'm in a hurry since some guys are waiting for boards. I've seen that some people prefer to write own commands to burn the bootloader with commands like (just an example I could grap):
avrdude -c avrispmkII -p m8 -P usb:xx -v > "C:\output.txt" 2>&1

I'm not sure what I need to send these commands to my DIYino board. Do I need a special hardware? I guess the Arduino IDE does not support this level.

Another topic:
if I want my break-out board to be called an Arduino break-out board, do I need to put it under a certain licence? Where can I get it?

  • I'm a bit confused..

you mention 'IT WORKS!'.... but how can you know if you havent been able to write a bootloader to any of them yet?

(or you just uploading a sketch directly to chip?.. no bootloader?)

post up some pics of how you have things set-up/connected..

and your 'process'..

xl97:

  • I'm a bit confused..

you mention 'IT WORKS!'.... but how can you know if you havent been able to write a bootloader to any of them yet?

(or you just uploading a sketch directly to chip?.. no bootloader?)

post up some pics of how you have things set-up/connected..

and your 'process'..

I appreciate that you would like to help, but you respond to quite an old post. In the meantime I figured out how to burn the bootloader, if I get some free time I will make a thread about it, because it seems there are a lot of rumors going around how to use the Arduino Nano to burn the bootloader, but none of them has quite the full picture.

The key is to define a digital pin for the reset of the board to be burned. Most of the people actually connect the reset of the Nano to the reset line of the board to be burned, which is not going to work (also due to the fact that the reset has to be bypassed by a cap, which is a correct info for a change).