Embedding arduino into project permanently.

I want to embed an arduino in to a project permanently. It's something I've never done before so I just want to know the best approach.

You can buy atmega328 (the chip I'm using) with or without the bootloader flashed already (e.g. Arduino Boards & Shields - In Stock - UK Same Day Despatch - Proto-PIC).

I know you can also use an existing arduino board to flash a bootloader on to another chip, so this would eliminate the need to spend the extra £2 on a chip with the bootloader on it already.

Which route would you recommend in this case? Is it worth saving £2 per chip for the extra hassle (if any extra hassle), or do preloaded bootloaders never work properly anyway? (Just the sorts of things I'm wondering)

Also I understand I need an FTDI chip to programme them, so does using one of these allow you to flash a bootloader directly from the computer or do I still need to use another arduino board? Is there even a way to programme an arduino using another arduino board (like you can flash a bootloader), allowing me to bypass the FTDI completely? Can you also recommend somewhere to buy one of these from?

Thanks for any help

In lieu of answers to your questions, I would like to offer an alternative you may not be aware of. Having embedded a 328 micro controller in a previous project, I have since abandoned that method. I find that using a Nano to be a better solution since it doesn't take up very much more space than a 328 and socket and has the very nice advantage of having a USB port. It's a 'ready to go' Arduino in a very small package. The last couple I purchased for a little over $5 each with free shipping and received them from that seller in 10 days. - Scotty

Caveat emptor: Nanos with 168 MCU versions.

For burning fresh bootloaders you can't beat an ISP device. You can get a USBasp clone on eBay for under $4 or a USBtinyISP clone for about $5.

Hi,

Yes, you can buy a chip without bootoader and you can program it using another Arduino with no need for an ftdi chip.

The technique is called in-circuit programming (isp) and there is a sketch called Arduino ISP to allow you to do it (other ISP sketches are available).

Its a little less convenient than using bootloaders and ftdi chips, but it does have the advantage that you can use smaller chips than the mega328, if your circuit does not need all those inputs/outputs. For example the Tiny85 chip, and there are others between that and the mega328 in size.

Tell us more about your project and we can advise which chips would be suitable.

Paul

Thanks for all your responses, I'm extremely interested in the suggested Arduino nano. If I do go for that, will there be any differences between programming that and an arduino uno, and is there any difference in the maximum current one can deliver? (I'm at the upper end of current delivery limit on my uno).

With respect to the ISP, I'm aware you can use this to flash a bootloader, but can you actually programme it using this technique? If so can you point me towards a tutorial of some form? My current project is an accelerometer that will eventually go in my car, with a 7 segment LED display, so I'm using 8 outputs plus 3 analogue inputs.

Thanks again

when buying the Nano, make sure you have a driver for the USB chip. Some come with different chips.

I get my ATmega328s from DIPMICRO but I don't know if they ship to Indonesia.

If you use the Nano then you just need to install the USB driver before loading sketches.

If you use the Nano then you just need to install the USB driver before loading sketches.

I've used 5 from various sources. Never had to do that or anything except to select the proper board in the IDE. - Scotty

and is there any difference in the maximum current one can deliver?

Some info. - Scotty

scottyjr:
I've used 5 from various sources. Never had to do that or anything except to select the proper board in the IDE. - Scotty

CH340G i have had problems. this is not native in the IDE.
FT232RL preferred because the driver is already loaded, but...
BOOTLEG FT DI chips had a planted virus from FTDI that bricked them,

Also I understand I need an FTDI chip to programme them, so does using one of these allow you to flash a bootloader directly from the computer or do I still need to use another arduino board?

The FTDI chip/cable does not let you flash a bootloader. That just converts the USB from your computer into serial data for the microcontroller.

I'm using 8 outputs plus 3 analogue inputs.

You might squeeze that onto an attiny84.

JizzaDaMan:
With respect to the ISP, I'm aware you can use this to flash a bootloader, but can you actually programme it using this technique? If so can you point me towards a tutorial of some form?

Here are some links for tutorial

http://www.ladyada.net/learn/avr/index.html

http://www.csulb.edu/~hill/ee444/Labs/2%20AVR%20Studio%20Blink/1-2%20AVR%20Studio%20Tutorial.pdf

http://codeandlife.com/2012/03/21/using-arduino-uno-as-isp/

In regards to the counterfeit FTDI chips, I ended up with a few nano clones that were counterfeit, I used this video: http://www.youtube.com/watch?v=SPdSKT6KdF8 to re-access them, and have had no issues since.

Even shows these forums for a minute or so!