Arduino Clone & the Atmega16u2

Hello all,

I'm building an Arduino clone using the Uno Rev 3 eagle files as my base. I've added my additional components to the schematic and brd, generated my BOM, made my PCB, and assembled it all. Now I just need to get it up and running.

I've been able to program the bootloader onto the Atmega328 no problem but now I need to get the 16u2 working and talking to other things. How do I go about doing this?

Can I upload a hex file directly to the chip using my AVRispmkII? Or do I need to go about things differently, perhaps using a DFU programmer?

Thanks guys!

Need to load a program into the 16U2 also, code is on github or someplace like that.
Ignoring the 16U2, you also use File:Upload using Programmer in the IDE to load your sketch (loses bootloader). Load the 16U2 same way when you find the code I think.

The file you need is included with the Arduino IDE.
arduino-1.0.5/hardware/arduino/firmwares/atmegaxxu2/Arduino-COMBINED-dfu-usbserial-atmega16u2-Uno-Rev3.hex
This can be loaded with an ISP programmer.

@CrossRoads. Yupp - was able to write to the 328 using the File > Upload with Programmer. So I'll be able to upload sketches to troubleshoot pinouts and whatnot.

@tf68 Great! Found the hex file. Looks like the readme also contains values for the fuses which is good to know as well. I will try uploading it tonight.

Thanks!

Hello,

Here's an update and maybe someone can give me some advice as to where to head next when troubleshooting my Arduino clone.

I've been able to successfully write a sketch to the Atmega328 using my AVR programmer. But only sometimes. Oftentimes avrdude (in the Arduino IDE) gives me an SCK error.

Also unable to burn the bootloader to the Atmega328, get the same message.

I was also able to upload the .hex files for the Atmega16u2 to the chip using avrdude and my programmer but Windows does not detect my Arduino clone as a device.

Ideas? Suggestions on where/how to troubleshoot? I want to make sure I've eliminated all software / bootloader / programmer issues before I start looking at hardware.

Thanks!

Let's see your shematica & board layout.

I started with the Uno rev 3 Eagle files and then went from there. I didn't change much on the Arduino end, I just added my components and adjust the routing on the board to fit.

Take a look.

Thanks!

DMXuino.brd (145 KB)

DMXuino.sch (1.2 MB)

Your board file doesn't show that you have ground planes on either layer and there are 59 unconnected pins. Is that what you actually have?

I don't believe so, no. I see GND planes on top and bottom layer. Also accidentally scratched some of the top green solder mask layer off and there's the copper ground plane below.

Where are you seeing the 59 unconnected pins? In the DRC?

I see it when I click Rats Nest and the ground planes do not show up.

That's strange. Perhaps I don't understand something. Here's what I'm seeing after rat's nest:

I would suggest you print the rats nest and compare it to the schematic.. Happens a lot with Vcc - Vdd and Gnd - Ground errors in the parts lib's and with Protel/Altium if a part was off snap grid it frequently would affect connectivity and any part off grid is a real problem, Particularly a part moved after after 'unpacking' the component stack(S) that represent the parts to be placed.. When finished you will have 100 % agreement with your schematic or know why not..

Doc

That board is not the same as the board you posted earlier.
The .jpg shows 1 airwire, hard to see, try changing the airwire color to yellow, see if it stands out.
Or just do an autoroute, might just be a little snippet over a hole that will clean up with no visible change.

The one you posted, I added GND planes, and it comes back with 34 airwires.
I let it auto route, came back with 13.

Ok.

Thanks for a taking a look. I'll spend some time in Eagle and make sure everything was traced and routed correctly. Looks like I have a hardware problem on hand then, yes? I'll see what I discover in Eagle but I was hoping that my hardware problem was limited to bad surface mount sodering - that I can re-do. But if I'm checking my schematic against the board looks like I'm having to troubleshoot further back than that.

Thanks again!