Flipped capacitor (C9) on barebones arduino sample file?

not being an E. engineer I’m not going to say something is wrong, but it appears capacitor C9 in the sample file (breadboard view) is flipped the wrong way, can someone verify this for me? Also, the wire on pin 21 (AREF) to the positive rail on the ATMEGA328 is troubling me. In several other breadboard examples (online) it is not there is this incorrect also? or perhaps optional? being just a hobbyist I cant be sure and with Digikey selling me all there non-working crap (I.C’s, PIC’s, crystals…) I have yet to get this circuit working properly.I Replaced ATMEGA328 from Digikey with Mouser’s and bootloaded just fine, Digikeys did not. All that remains to check/ (replace with Mouser parts) is the crystal and 22pf capacitors. this circuit seems to have a very generic setup across the board but mine doesn’t work. Faulty diagrams and faulty parts are all that’s left unchecked that’s why I’m here, to eliminate the faulty diagram, can anyone help? Thanks in advance for any responses.

You are correct, C9 is backwards in the example. I’ll see what I can do about getting it corrected, although that likely won’t be til the next release. A quick look indicates the .fzz file is in the fritzing code directory so the .fzz can be updated manually there before the next release. If you connected it as shown you may have damaged C9 and would be advised to replace it as it may cause power problems and be the source of your trouble.

It is optional. It is for an external voltage reference for the a/d converter. There is an explanation of the options here:

with it connected to 5V the A/D should just work, with it floating you may need to set the bit to connect it to internal 5V (if that isn’t the default which I didn’t check).

This I find quite odd. I’ve dealt with digikey for 40 years or more and never had a problem. The one time they did screw up and shipped the wrong part, they shipped the right part the next day without problem. I suspect something other than parts supplier is at work here, possibly power problems, as micros are quite sensitive to undervoltage on VCC probably especially during programming. How are you programming it? I don’t see a programming connection in the example circuit, although I agree if a 328 from mouser accepted the bootloader and the digikey one doesn’t using the same programmer that does indicate a problem. They are also static sensitive so that is a possibility as well (although I’m usually careless and have never had a problem that way). This circuit is quite simple, and so should work, what I would do is check the programming after you flash the chip. Hopefully whatever you are using to program has a verify mode which can read the chip after it is programmed and compare every byte in flash with the program file to make sure the programming occurred correctly. I’d start with the blink program (you will need to put a led and a resistor on the pin the arduino uses, D13 usually). I have the luxury of both a scope and a logic analyser which makes hardware debugging much easier, without them things are a lot harder. If you have a scope check the VCC supply to make sure it is always 5V (and not dropping below 4.5V at any time). Hope this helps!

edit:

OK, if you replace

path\fritzing.0.9.3b.64.pc\sketches\core\Arduino-no-FTDI.fzz

(where path above is the path to your installation directory on Windows in this case, or

path/fritzing.0.9.3b.64.pc/sketches/core/Arduino-no-FTDI.fzz

on linux or the Mac)

with

Arduino-no-FTDI.fzz (35.3 KB)

then the example should be correct with C9 the right direction (and a couple of cosmetic changes in schematic). I will submit a pull request on github to get this corrected for the next release. Good catch, it has obviously been there for a long time with no one noticing :slight_smile:

You can either load this version and re make any changes you have made or just swap the capacitor in your current sketch. If you swap the capacitor in the current sketch, disconnect all the wires in all views before rotating the part 180 degrees. If you do it with wires connected you may screw up the routing database (keeping a copy of your current .fzz file in case of trouble is also a good bet.)

Peter