I am quickly discovering that to have any kind of lasting effect, any project that I make with the Arduino must eventually have its brain replaced with another type of brain, one that doesn't cost $30 a pop. (especially the really simple ones)
When you are done with a project, what microcontroller do you usually replace the Arduino with?
It depends on what level of hardware development expertise you have, and how complicated the interconnections are. In general, you use the same processor (ATmega328 or similar), but use a simpler board like a Modern Devices "Really Bare Bones Board", perhaps based on a bare board (<$4) rather than a full kit ($13)
Yes I normally make a system with 168 or 328 chip.
It depends on if you need the USB communications or not. If it is not needed then it is simple. If it is needed then you can either get a separate module (almost as expensive as an arduino) http://www.thebox.myzen.co.uk/Hardware/Econo_Monome.html
Or you can use a cheap RS232 interface chip like the max202 and use a reusable USB to RS232 lead that can be used on many projects.
Ack, so I can see that all you really need for each project is an ATMega, a crystal, and maybe a .1 uf capacitor. But then how do you program it using USB?
You either transfer your chip from an arduino or make a programming header and have a USB to TTL converter. The converter is the same for all projects and doesn't have to stay with one project.
Ah, perfect. I didn't know you could just rip out the microcontroller on the Arduino board. That's great knowing I don't have to make another $30 investment. So then what are all those other capacitors and things for on the Arduino board?
These whippersnappers, thinking a $30.00 Arduino is expensive...
I was looking through an old Ciarcia's Circuit Cellar book last night that I had ordered which had arrived (I decided to complete my set of volumes), and back in the 1980s, to get similar functionality of an Arduino (well, honestly, more to an extent), you would have had to spend more than $30.00!
Ok - I get the understanding; there isn't any good reason to use an entire Arduino in your project as the final iteration; you only need the chip - the other parts are all mainly for support, and the vast majority of those are for "ease-of-use". You really only need the ATMega chip, a few filter caps, and the resonator; if you want USB, add a header for an FTDI cable (or breakout board) connection. If you need regulated power, add the regulator and filter caps for that, too. An LED here and there if wanted.
Just remember, $30.00 is cheap compared to what you had in the past; I am sure that when I get older (and you do to), people are going to be complaining about the latest microcontroller-whatzit that cost all of $3.00 and how expensive that is, and you'll say to them "I remember when you had to pay $30.00 to get that kind of...blah blah"...
One minor drawback to the RBBB is that you're pretty much forced to use a resonator, instead of a crystal, for the CPU. Resonators have pretty broad frequency tolerance, so "precision" timing can be somewhat problematic.
If you expect to make multiple Arduino projects that don't require shields, you'll probably find it cheaper to buy a 5-pack of bare RBBBs, and shop for the required parts, rather than buying kits. Especially since you'll almost certainly want to place an order with a vendor like Dig-key or Mouser to buy shift registers, I/O expanders, and other parts that Modern Device doesn't sell. Be careful when buying the electrolytics: the RBBB is very densely populated, and the first batch of caps I bought turned out to be too big. And don't forget you'll need something like the BUB or the P4 to connect RBBBs to your PC.
If you're doing projects that need shields, you can get bare boards with the standard footprint from NKC or Fundamental Logic. I like them because they save cost by not putting the USB chip on every board, the majority of the Arduino projects I do only need a PC interface for downloading, and some of the other gadgets I interface to have RS-232.
I plan on getting a few more 328s and some crystals + bits to make projects more permanent (in Australia the cost - ex postage) would come to about A$9 or so. So the controller can be built directly onto the project board without the need for a separate CPU board like the RBBB. Seeing that for some reason 328's cost slightly less than 168's there seems to be no reason to use 168's at all unless there was a power consumption benefit (note - I have not looked into this at all).
Also be sure to buy pre loaded AVRs. While I have sucessfully burnt the bootloader onto a 328 using a home built parallel based ICSP cable and my trusty Diecimila I'd rather take the hassle out of it!
Alright, I did a little more internet research, and from what I could find, I guess I would need to buy a whole bunch of parts to basically manually assemble permanent versions of the Arduino board.
This is what I think I would have to do for each permanent project:
Find all these parts online and buy them (or just the RBBB kit with no crystal?):
Then use the actual Duemilanove to program the chips, and when done prototyping, just rip out the ATMega and put it in the breadboard with all those parts above. This way I can avoid getting the unnecessary USB-to-serial hardware. ($14-18)
You don't need the fuse if you're not connected to USB. You won't need the autoreset if you're not connecting to a programmer. You may or may not need the reset switch.
I think this is exactly the point - you design it purpose built rather than generic.
Adding to the list: You don't need the LED on D13 unless it serves a specific purpose for your design. You don't need the oscillator (crystal/caps) if your design works equally well using the internal 8MHz resonator.
Wow, I just realized that if I take away the LED, the serial Rx/Tx, and the reset, all I have are power and the oscillator! That's a lot simpler than I thought it would be.
Now if I were to have something communicating over the Rx/Tx serial pins, say an infrared sensor, would I have to use resistors?
Generally, we recommend not getting rid of the reset circuit, but you have to decide if you would ever need it.
You have to be careful what you do with the RX/TX pins if you have the ICSP left, but if you don't, then they are just pins, use them anyway you want: this is a "in-circuit programming" vs "chip programmer" decision.
I generally think you should leave ICSP working, as well as reset. Up to you tho: you don't really need it.