Stand Alone Breadboard Arduino NOOB Question.

Hey guys,

This is probably a stupid question... but I have been looking at the arduino bread board tutorials such as http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard. But I have a project that I am building and I don't want to have to stick my whole arduino in the project box and then have to buy a new one. Can I program a atmega 328 and then just remove it from the arduino bread board and wire it up as i would with a regular arduino? Also would I be able to do this just as easily with the regular arduino uno and just pop the atmega 328 out and buy a new one to replace it? Thanks in advance.

-Ryman

Yes.
You only need a couple of parts, all inexpensively available from dipmicro.com

Don't forget the the three 0.1uF capacitors shown on Crossroad's diagram. They are unfortunately and incorrectly missing from the widely quoted Arduino compatible breadboard in your link. They should be physically located as close to the IC pins as you can put them.

Don

You might take a look at this too. Works great. Have used several of them.

http://shop.moderndevice.com/products/rbbb-kit

Thanks for the help. Thats exactly what I needed. But I have one other question. I purchased the arduino optiboot atmega328 chip from sparkfun, http://www.sparkfun.com/products/10524 , would i be able to purchase a regular atmega328 and do the same stuff? Also is there a specific version that I should get? The Crossroads diagram says to use a atmega328P-PU? Oh and also what is the purpose of the J1 with the +5v and the GND? it doesn't appear to be hooked up to anything is that just an auxilary +5v? Thanks again.

-Ryman

But I have one other question.

We will answer the others at no additional charge.

would i be able to purchase a regular atmega328 and do the same stuff?

Not unless you are prepared, and have the equipment, to program a bootloader onto the virgin chip.

Also is there a specific version that I should get? The Crossroads diagram says to use a atmega328P-PU?

The 'PU' suffix specifies the dual-inline package that fits into the familiar 28-pin socket.

Oh and also what is the purpose of the J1 with the +5v and the GND? it doesn't appear to be hooked up to anything is that just an auxilary +5v? Thanks again.

A true "schematic diagram" (which this is) uses this technique to keep the power leads from obscuring the signal/data flow. All of the '+5s' are connected together and all of the downward pointing 'triangles' are connected together. J1 is where you apply your regulated 5 volts to power the circuit.

Don

Thanks a lot guys that was very helpful. One more thing, would it be possible to use say a ATTINY45/2313 and make a "breadboard" Arduino?

Yes.

floresta: Don't forget the the three 0.1uF capacitors shown on Crossroad's diagram. They are unfortunately and incorrectly missing from the widely quoted Arduino compatible breadboard in your link. They should be physically located as close to the IC pins as you can put them.

Don

Not to disagree at all, I religiously use the recommended bypass capacitors, but I'm just wondering what behaviors can be expected without. Just curious if anyone has tried it. I may have to... :D

Those caps help to buffer the power supply so the internals aren’t starved for current during the high speed switching that goes on internally.
Really needed when sourcing large amounts of current, say when driving an LED or several high, so that levels don’t drop & cause weird results.

Not to disagree at all, I religiously use the recommended bypass capacitors, but I'm just wondering what behaviors can be expected without. Just curious if anyone has tried it. I may have to...

It's quite possible your design would work without them, especially using battery power. However they serve a useful and well understood function and it seems everytime I don't use or forget to use Vcc bypass caps on digital chips, they tend to not work well. ;)

but I'm just wondering what behaviors can be expected without

Unstable analog readings. Especially if the analog device and processor share a power supply. ATtiny's seem to be especially troublesome without the capacitor.

Oh, and I had a breadboard circuit that included a few things: 328, pullup on reset, TTL serial connection, and a bus switch (probably a few other things I can't remember right now). If the bus switch was switching quickly, the 328 would reset continuously. Adding a bypass capacitor to the 328 did not completely eliminate the problem but it made the processor significantly more stable.

Hey I finally setup my breadboard arduino, everything works great except one thing is that when I upload my sketches I have to press the reset button during the upload at a specific time. I don't like that how do I fix that? My circuit is exactly the same setup as the bread board tutorial I referenced in the first post and the circuit that crossroads posted. Here are some pics:

The error I get when uploading if I don't press the reset button is: "avrdude: stk500_getsync(): not in sync: resp=0x00 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51"

The Arduino sketch will pause for about 15 sec and then display that error and say go to www.arduino.cc/en/guide/troubleshooting

Thanks, works just fine otherwise, i think...

You will have to add an auto-reset circuit. Connect DTR to a 0.1uF (100nF) capacitor. Connect the other side of the capacitor to the RESET pin.

My circuit on this page illustrates the auto-reset. It also shows a minimal setup.

http://www.gammon.com.au/forum/?id=11109

Copy of circuit:

Sharp looking schematic Nick!

Thanks Bob! Although now I wonder if the "optional reset" button should be on the other side of the capacitor? But if it is, would that hurt the FTDI chip, if plugged into an FTDI cable (when you pressed the button)?

No, where you have it is good.

I can't get the boot loader to work. It keeps saying:

"avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check."

I have a USB Tiny and bootloaded a regular arduino Uno before with it. I have wired it the way nick has it in his schematic and also the way it shows in the tutorial from in my first post and a million other ways. I can't figure out what is. Do I plug in my FT232 chip as well as my USB Tiny?

-Ryman

If you have an Atmega328 chip with the bootloader on it, you don't need the USBtiny gadget. However you do need an FTDI cable (or your FTDI chip). So either plug in the USBtiny into the ICSP header, or the FTDI cable/gadget into the FTDI header. They are connected to different things.

Since you have tried "a million" ways it is hard to know what you actually did. Perhaps if you draw what you are attempting? For a given method (FTDI or ICSP) there is one correct way and therefore 999,999 incorrect ways out of a million.