A couple of months ago I upgraded my arduino duemilanove by swapping out the ATmega168 with a ATmega328 processor. This weekend I decided to give the old processor a new life by building my own arduino clone on a perfboard.
I started out by building the power supply and soldering of the processor socket (my local electronics shop does not stock any 28 pin sockets so I had to combine an 8 pin socet and a 20 pin socet), reset button and the connector for the FTDI cable.
Battery to test if whether power supply works correctly:
Place crystal and capacitors:
Once the build was complete I tried to upload a simple 'hello word' sketch but had no success until I figured out I had to press the reset button while starting the upload in order to force the processor in 'programming' mode.
Auto reset isn't hard to do, if you want it
It's just a small cap between the rts# from the FTDI header and the reset pin on the ATMega. Have a look at Ladyada's boarduino schematics for more details.
Well I researched on this auto reset issue but it seems that you need to connect a 100uf cap between the reset line of the AVR and the DTR on the FTDI, unfortunately my FTDI cable does not bring out the DTR.
Edit: the boarduino of lady ada does indeed mention a 0.1uf cap between reset and rts#. I 'll dig in my parts tray to see if I have a spare cap lying around. Thanks a lot for the info.
If true, you could use a 7805L (TO-92), smaller, and cheaper. Unless you expect it to have huge currents flowing
Or use a step-down converter. Not as cheap, but much more efficient - useful for battery-powered applications. Drop me a note if you're interested on that sort of circuit.
Here is some more news of my Frankenduino project. I followed halabut's advice on enabling the auto-reset of the board by adding a .1 uf capacitor between the RTS# pin of my FTDI interface and the reset pin of the ATMega168. I also checked the 'set RTS on close' checkbox in my serial port properties on windows XP as described on adafruit's dc boarduino project page. I can now upload sketches to the Frankenduino without pressing the reset button during upload. Unfortunately this does not work on my linux box (Ubuntu 9.10) as i have not found a 'set RTS on close' equivalent on linux.
I also added a 1N4007 diode I found in my parts parts tray, for reverse polarity protection. I also add a 6 pin ICSP header so I can experiment with other bootloaders.
you could use a 7805L (TO-92), smaller, and cheaper
My supplier of choice keeps both but as the low power TO-92 packaged one is only a penny cheaper, it hardly makes sense to cripple yourself. (and they'll sell you 5 7805s for less than the 78L05 each) You don't need to be hanging too much stuff from an arduino before you get to 100mA......
If you were buying 1000, no doubt the 78L05 would be a lot cheaper. But at hobbyist quantities the extremely common 7805 is often the better buy.