3
\$\begingroup\$

The arduino website goes into some of these questions, but not in great detail.

So, what is the difference if one were to purchase an Arduino board or make one yourself? What benefits does buying the board have compared to assembling one from various parts?

I've seen that you can purchase the actual microcontroller (ATmega328 or similar) with and without the Arduino bootloader, what does this mean?

How would you go about programming a board that has been assembled separately(presumably without any link with arduino, the bootloader etc)?

Are there benefits of programming an Arduino through an AVR versus USB connection? Is programming in this manner similar to how you program with the Arduino IDE?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ A while after starting Arduino programming, I made a "breadboard Arduino," and a little while after that, I made 10 boards with customized pin break-outs (not Arduino "shield" headers) at a cheap Chinese board place for $2.50 each. Atmega328p chips are $2.50 each in bulk. Add a regulator, some caps, and perhaps a reset button and you're in business. I program these boards using a USB programmer (ICSP) rather than the serial port, so I don't need the "Arduino bootloader" pre-loaded on the chips. \$\endgroup\$ – Jon Watte Jul 30 '13 at 3:38
4
\$\begingroup\$

Pre-built board is more likely to work out-of-the box. Making a DIY breadboard will give you more insight.

I would do both things: buy a professionally built Arduino, buy the components to make a breadboard clone. While you clone, you can use the professionally built Arduino as a reference, which you know that it works.

Read a lot. Over time, more things will start making sense. Don't hesitate to read the ATMega datasheet (at least skim through it), and other Atmel papers.

Here's a page on the Arduino web site, which describes how to use Arduino as an in-system programmer.

\$\endgroup\$
3
\$\begingroup\$

The practical difference is cost, build quality, and support. Its easier to get one prebuilt, possibly cheaper for an exact copy.

The Arduino is a ecosystem between the hardware boards, the programming environment, and the bootloader on the ATMega microcontroller. The bootloader is like windows on a PC.

\$\endgroup\$
5
  • \$\begingroup\$ Odd to call it an ecosystem when the pieces work just fine in isolation from each other. \$\endgroup\$ – Chris Stratton Jul 29 '13 at 0:20
  • 3
    \$\begingroup\$ @ChrisStratton sure they work fine isolated, but they are meant to be used together. Like the apple ecosystem of Mac hardware + OS + iStuff. \$\endgroup\$ – Passerby Jul 29 '13 at 0:31
  • 1
    \$\begingroup\$ But that's a perfect example of what this isn't - the iStuff has substantial lock-in and what alternatives exist for individual components are kept notably 2nd class and often burdened with headaches. That is pointedly not the case with the distinct pieces of arduino, which work very well on their own or with alternatives. \$\endgroup\$ – Chris Stratton Jul 29 '13 at 1:41
  • \$\begingroup\$ @chris. I guess Passerby's phrase was pitched at the inferred level of knowledge of the questioner. I hope that the questioner would understand from that, that there are an especially large number of third-party add-ons designed to work with Arduino boards that have the normal header layout and that there is a big community of people sharing software and tutorials for the Arduino. It might be better for the A to make this explicit rather than worry about the definition of "ecosystem" too much. \$\endgroup\$ – RedGrittyBrick Jul 29 '13 at 10:06
  • \$\begingroup\$ I can use lots of compilers (avrdude) and not limited to the arduino IDE, I can use an arduino IDE to program any atmega with the bootloader, I can install the bootloader with minimal modification on many chips that arduino does not come with, I can use atmega chips on other platforms that aren't arduino standard, I can swap other avrs into the arduino as well. Don't see how they are locked into each other \$\endgroup\$ – crasic Jul 30 '13 at 2:04
1
\$\begingroup\$

If you build your own, you need to buy an ATMega328P already programmed with the Aurduino bootloader. That is so that you can use the Arduino IDE to load programs or "sketches" as they are called into it. Programming will be identical to a storebought Arduino. Whoever you get the chip from will tell you what kind of board to select, based on what bootloader they put into it. For a chip, I would recommend VirtualBotix https://www.virtuabotix.com/product-information/?productid=06092245317437 as they have a kit with the AtMega328p, crystal oscillator, caps, and voltage regulator. Their support is great if you need help getting going.

To program it you will need an FTDI inteface board. Here is one: https://www.virtuabotix.com/product-information/?productid=6092245318977

Those two things are around $23. For $25 to $30 you can bet a prebuild (even guenuine) Arduiono. If you continue to work with Arduino's, you will probably want to have a board handy anyway. Let me explain genuine vs clone. Since Arduino is open source hardware and software, the schematics are available and anybody is free to make and sell them. Some poeple have encountered clones of lower quality clones out there.

After typing all this, my recommendation is to buy and genuine Arduino Uno. You can play with different shields and then if you want to make your own small board later, you will have the knowledge of how the "ecosystem" works.

\$\endgroup\$
1
\$\begingroup\$

It is about preference, granted you get all the benefits of the arduino platform if you conform with it. but you can certainly buy the microcontrollers and use them standalone. So far the ones I have used you dont need to be pre-programmed, they have a couple-three different methods for programming the part. the atmegas being easier the xmega a little harder because the timing is more sensitive, but doable. (can get an xmega breakout board from sparkfun and try this yourself, or just get some parts and make your own breakout or whatever. Just tried oshpark it is reasonable in a number of ways).

If you want to use the usb interface to program the part then yes you need to put a bootloader on it, using one of the other programming methods.

The documentation from atmel includes the programming protocols, the are not that difficult if you have something to bit bang with. Another microcontroller for example, or an ftdi board of some sort.

The obvious benefit to programming through the usb is it is easier, so long as the bootloader is not overwritten/trashed. You have to get a bootloader for the microcontroller and some program for the host and whatever operating system, etc. it can be a good sized task. Depending on which microcontroller and what protocol you choose though bit banging an ftdi part might be the simpler path and give you more hosts (windows, linux, mac), with less effort.

The arduinos have a number of subtle differences to programming which make just programming legit arduinos a challenge, if you try to do it directly. They keep making these subtle changes and tacking another if-then-else to their loader. For whatever reason their solution is not perfect. A serial based bootloader is a good idea though in general. the subtle differences usually have to do with baud rate and resetting the part, getting it to know you are trying to load it rather than letting it run the burned in application.

atmel doesnt necessarily make it easier either, each part or family has or can have subtle differences in the spi or other bitbang protocol to know where and how to program the flash. avrdude is a good source for finding info for many parts in one place (rather than trolling through dozens of manuals, you likely still need to troll the manuals).

Getting a real arduino or one of the minis or something like that from sparkfun or wherever is not a bad starting off point, you can completely operate the board without any arduino software of any kind, replace the bootloader, whatever you want to do. or just use their sandbox, your choice.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.