What to buy when getting started with Arduino

Go To Last Post
24 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I worked as an embedded controller engineer for the first half of my career. Now that I'm retired and had a few years to travel, I want to come back to my first love; electronics. Having read several postings here and seen how helpful everyone is, I'd like to get some guidance. I've got a ways to go getting up to speed reading about Arduino. In addition, I want to get my hands on some hardware.

 

  1. Which Arduino boards would be best to start with? 
  2. There seems to be lots of options on programming. I eventually want to program chips without a boot loader already installed but, let's start simple: serial programmer that will connect to the USB port on my Windows PC. There seems to be more than one type:
    1. USBtinyISP AVR Programmer Kit (USB SpokePOV Dongle) - v2.0 is one option. $22
    2. AVR-ISP, STK500 $86
    3. Any others that would be better?

Any other advice for for a guy with lots of previous experience with electronics, programming and embedded controllers for twenty years ago?

 

Thanks for your help.

RobShaver:-]
---

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would get a genuine Atmel ICE, supports both AVR and ARM chip, just in case you get bored with AVRs.

 

The most popular Arduino seems to be the UNO with a Meg328 on it or the bigger, 100 pin Mega2560, Arduino Mega. That is if you want to stick with Atmel.

 

Everyone else has jumped on the bandwagon and you can get "Arduino" boards for different chips.

 

I never owned an Arduino but have used a couple in some customer projects at their request.

 

However the Arduino environment is useful and I have some of my boards at times programmed with an Arduino bootloader and use the Arduino IDE for quick tests.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just start with a Uno and packs of jumper wires.  male-male, female-female.

 

You can buy modules or shields from Ebay.   Also a few resistors, capacitors, leds, header strip, ...

 

There is little point in buying a programmer.   Buy another Uno clone.   Or an XMINI-mega328

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to AVRFreaks Rob.

 

Perhaps not stated implicitly... if you start with an Arduino you don't need to invest in any programmer yet. Your Windows PC running the Arduino IDE will program the Mega328P on any of the various Arduino configurations. But as David says, when you want/need to program another chip, you can use your original Arduino as a programmer by first loading the Arduino's own programming software ( see https://www.arduino.cc/en/Tutori... )

 

Cheers,

 

Ross

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  1. Which Arduino boards would be best to start with?

An Arduino Uno.   It's not necessarily the best, or the most powerful, but something like 95% of the examples and tutorial you find on the internet will be based on an Uno.

 

 

  1. There seems to be lots of options on programming. I eventually want to program chips without a boot loader already installed ... that will connect to the USB port on my Windows PC.

 

Depends on your budget.  An Atmel-ICE is pretty top-of-the-line; during the last sale (Feb) they were $80.

There are numerous "USBASP" Clones from China that are very cheap.

Your Uno (if that's what you get) will act as a programmer for other chips, using the "Arduino as ISP" sketch.  This is what I've been doing, even though I have some Atmel programmers as well.

 

 

Any other advice for for a guy with lots of previous experience with electronics, programming and embedded controllers for twenty years ago?

Yeah.  Don't put too much emphasis on using your "stash" of parts that you've probably collected over those years.  80% of it is probably obsolete, unobtainable if you want to make more than one of something (or publish your project), and/or very cheaply and easily replaceable with better parts from the modern mail order dealers.  I've personally got a bunch of UV-eraseable microcontrollers that I keep *wanting* to use, but my less emotional side keeps asking "WHY?"  (most recently, I built a 64k RAM Z80 system with a 32k Flash AVR as the main IO device.  WHY???!!)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll jump into the fray. I suggest staying with the bootloader if you are starting with Arduinos. There will be time for that later. I find www.aliexpress.com a jaw dropping site for all things Arduino. If you can wait about 3 weeks, you can get lots of cool stuff cheap from China. Go to this LINK and buy 2 UNO clones shipped to your door in the US for less than $10.00. You can also buy an exact duplicate HERE but for more money. Go to www.reddit.com/r/arduino to get advice on a starter kit for Arduinos. Or just type in "arduino starter kit" and you might just find something like THIS shipped to your door for $40.00

There is no need to spend $120 for a debugger until your feet are wet.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Agree with others. You need nothing more than a $5 Uno clone and a USB cable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want to get a separate programmer then I would avoid the cheap Chinese ones and get the Pololu one. It has the very useful addition of a serial port which can be used in debugging. Search on here and you'll find the part number.

(I would normally post a link but I am working out of the office and am on my phone)

pragmatic - dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Since you already have quite some experience in electronics and embedded programming the arduino platform might not be the best choice for you.

Arduino is mainly aimed at absolute beginners.

With an arduino board you will have your first blinking led project going in about 5 minutes, which I have to admit, its impressive, but it also comes with a price.

 

The "IDE" which comes with the arduino platform is an almost unusable java contraption which doesn't even properly support syntax highlighting or code completion.

More modern IDE's have extremely usefull features such as navigating from a function call to the function definition with a mouse click.

I'll predict you will get bored (or annoyed) with the arduino platform within a few weeks.

 

And then you will discover that all the software under the arduino platform is a tangled mess.

It adds mysterious pieces of code to make it even possible to compile a project such as the main() function.

All compiler options & switches are hidden.

Header files, libraries are added in a mysterious / magical way.

Intermediary compiler output is thrown into some random temporary directory.

compiler warnings/ errors are also handled on a arguably usable way.

 

To be fair though, the built in serial console is a very usefull plus of the arduino platform. It usually "just works" (within arduino limits) without having to configure any uart registers or parameters.

Personally I don't care about the many available plugin boards (which they call "shields" just to make it more confusing). I am more of a breadboard & perfboard guy, which also avoids the horrible arduino connector layout which is not on a 0.1" grid.

 

The stuff to buy depends of course on you budget.

I would avoid the "dragon". They just blow up too easily.

I have never used a uC development tool of >USD10 so I can't advise you on those.

I am more of a low budget type of guy and therefore I love to source my toys directly from China.

Complete boards tend to cost less than a postage stamp and no adittional shipping costs.

 

http://www.aliexpress.com/wholes...

https://www.aliexpress.com/whole...

https://www.aliexpress.com/whole...

https://www.aliexpress.com/whole...

 

"Arduino" boards are also perfectly usable outside the arduino platform.

So if you want to source from China directly, buy a few of them. You are likely to release the magic smoke every now and then.

Price can hardly be a problem, but shipping takes a few weeks.

Therefore I suggest to also buy some bare chips and 1 or two programmers (although these are less likely to blow up).

 

What other tools do you have or want?

Do you already have an oscilloscope, power supply, logic analyser, DMM, etc ?

EEvBlog (Dave Jones) has done a quite decent video about setting up a USD400 lab.

 

The tool I love the most for uC development is a USD 5 logic analyser.

https://www.aliexpress.com/whole...

These are really absolutely wonderful. Buy them. I insist. Really :)

I'll leave it up to you if you want to use them with the salaea software or with the open source sigrok software.

 

Or maybe get a few of them :)

You have some old experience with embedded software...

Those logic analyser boards have a cypress 8051 compatible uC in them and they can also be used as a general development platform.

They do not have FLASH. Instead they depend on the DFU protocol to load firmware into ram from a PC after each power up.

You can find a C compiler and command line tools via the sigrok website.

 

Another big change in the last 20 years is that it's almost trivial to design and order custom PCB's.

KiCad is gaining wide support the last few years as a Free & Open Source PCB design suite without artificial limitations and it's still getting better every year.

Send the generated Gerbers to a PCB factory and you get double sided plated through pcb's with solder mask and silk screen on both sides for about USD1 a piece in small quantities.

(I've ordered a batch of 30 boards for USD26 inclusive shipping from China myself). It's absolutely redicilous or delicious, depending on your frame of mind.

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

Last Edited: Sun. Mar 19, 2017 - 11:59 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Paulvdh wrote:
The tool I love the most for uC development is a USD 5 logic analyser. https://www.aliexpress.com/whole... These are really absolutely wonderful. Buy them. I insist. Really :) I'll leave it up to you if you want to use them with the salaea software or with the open source sigrok software.

 

I personally recommend buying a logic analyzer, too. But I believe it's worth spending a few bucks more and getting the 16 channel 100 MHz model. They cost about 45$ and really worth the money.

They're basically the same as the one Paulvdh linked to but faster and they have more channels, which can come in handy.

 

As for programmers: I think it's a waste of money to get an external programmer for the Arduino boards. Either stick with the bootloader or get a full debugger like the Atmel-ICE.

I'd wait with buying a debugger until you're sure you stick with Atmel though. The price for the ATMEL-ICE has doubled in the last few years for no clear reason :(

 

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I often use both genuine and clone 24MHz Saleae Logic Analysers.

 

Which particular "100MHz LA" have you used?   Which would you recommend?

 

I have never wanted more than 8 channels.   I would occasionally  like a faster sampling rate.

 

http://www.ebay.co.uk/itm/100MHz-16CH-250MHz-8CH-PC-USB-Logic-Analyzer-with-support-I2C-SPI-UART-and-PWM-/252525235385?hash=item3acbad4cb9:g:WZAAAOSw8oFXy96v

looks quite big and extra wires look untidy.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://www.ebay.com/itm/25256976...

 

I bought this one about half a year ago. The extra wires are nor really a problem to me. If they are to you, you can always just make your own wire harness or use individual wires. Thanks to the popularity of Arduino, such wires have become incredibly cheap.

 

Edit: I can't get it to work on 100MHz with the Saleae software. It always complains that the USB connection can't keep up. But 80MHz work fine and it's enough for me. I never tried the sigrok software. Maybe it works better.

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

Last Edited: Sun. Mar 19, 2017 - 12:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow, thanks everyone for the responses and suggestions. I feel right at home here. :) I really resonated with the response from Paulvdh. I do really want to get under-the-hood of the Arduino and see what makes it tick. The modules and components from China are exciting too. I'm amazed at how much you can get for so little except the waiting. I do feel like I need to embrace Arduino first in the simplest way.

 

About the programmer; I think I got the terminology wrong. The USB cable from the PC to the Arduino, some I guess are just a serial interface and some do more than that. For example the SBtinyISP AVR Programmer Kit (USB SpokePOV Dongle) from AdaFruit say they are NOT a serial cable but can download using the boot loader. Others emulate a PC COM port, right? I'd need the serial COM port if I want to do more than just download to the Arduino, right? Please point me to exactly what I'd need for that serial COM port cable because I'm just not sure what's required there. I guess everybody knows this part and figures it's obvious. (Maybe I'm over-thinking this. Sometimes I do that. :)

 

When I was doing embedded controllers (8080, Z80, 6502, 6800) I always had ICE and a stand-alone logic analyser. My favorite 'scope was the Tektronix 465B. (I've got some stories about that scope!) But now that I'm not using the equipment to make a living, I may opt for the lower cost options. I've got two nice multimeters so I can measure voltage and current at the same time. One I bought directly from David Jones at EEBlog. I do want a scope, but those logic analysers sound pretty sweet too. Still, got to watch my budget. Don't want to have to go back to work. :)

 

Funny thing about this forum. The first response came through to my email, but none after that. I'm glad I came back to the source to find all these messages.

 

Thanks everyone, for your help.

RobShaver:-]
---

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The first response came through to my email, but none after that

Unless you click on the link in the email and visit the thread you will not get any further emails until you do.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I got the terminology wrong. The USB cable from the PC to the Arduino, some I guess are just a serial interface and some do more than that. For example the SBtinyISP AVR Programmer Kit (USB SpokePOV Dongle) from AdaFruit say they are NOT a serial cable but can download using the boot loader.

Well, of course there are lots of things that will plug into the usb port on your computer at one and, and connect to a microcontroller (in some fashion) at the other end.

For Arduino-class microcontrollers, I guess you can divide these into about three categories:

 

1) USB/Serial.  USB on the computer side, and UART-compatible async serial on the other side.  Most Arduino boards include some sort of USB/Serial chip (FTDI, CH340G, or ATmega16u2) which connects to the UART pins of the AVR.  Bootloader software in the AVR then permit it to load additional code over the UART/Serial connection, as well as providing Serial communications for the user's sketch.

2) USB/ISP programming.  Most of the mid-sized AVRs can use something called "ISP Progamming" for device programming.  This is a "small pin count" serial programming protocol based on SPI, and can be used to program the AVR without needing a bootloader.  There are a lot of USB-connected AVR ISP programmers (USBtinyISP is one, the cheap Chinese USBASP clones are another.)  You can program lots of AVRs with no bootloader. the XMEGA

3) Full debuggers and more general programmers.  To program ALL AVRs, you need a couple more programming protocols.  TPI for the very small AVRs, PDI for XMEGA, sometimes JTAG and SWD (SWB is a low-pin-count version of JTAG.)  There are also High Voltage Serial Programming and High Voltage Parallel Programming.  And there are a couple of debugging protocols that let you do things like set breakpoints and examine memory.  A $150 device like the Atmel ICE lets you do most of those (I don't think it does the HV protocols?)

4) Combinations.  Someone mentioned that the Pololu has both a serial port and an ISP programmer.

 

So if you get an Arduino Uno, you can program it via the USB/Serial chip and bootloader immediately, and you can load a sketch into it so that you could program other chips via USB/Serial/ISP (or even HVSP or HVPP, given some additional hardware that has been published.)

If you get an Atmel Xplained Mini 328p (which is VERY similar to an Arduino Uno), it has an on-board debugger chip that lets it do ISP programming and debugging as well as having a serial port. (if you load the bootloader onto it, it can use the Arduino environment via the serial port as well.)

 

 

With an arduino board ... it also comes with a price.

I don't understand this attitude.   The Arduino BOARD is little more than a breakout board for the ATmega328p.   You can do just about anything you'd want to do with the ATmega328, using the Arduino board.  Use Atmel Studio.  Ignore the bootloader and program with (your choice.)   Write your program in hex via hand-assembly.  Run a BASIC compiler.   Put Forth on it.   It's just hardware.  Cheap, convenient, widely available hardware.   There is no "price"; what you get is a bunch of additional possibilities, and ANOTHER IDE (Annoyingly primitive but pleasingly minimal, if that makes sense.)

(Not to mention all those examples from random people on the net.  Obnoxious artists with little technical skills and none of the fancy equipment, that are never-the-less publishing really impressive projects!)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw, thanks. That clears up lots of questions. Is the connector on the Arduino-end of the USB cable is another USB connector? I see some with other connectors which I assume is for ISP for those boards that have such a connector. Thanks again.

RobShaver:-]
---

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are  > 30 different arduino variants.

https://www.arduino.cc/en/Main/P...

(And more elsewhere)...

 

For an engineer the most direct answer to hardware related questions is probably to download the schematic directly. Example:

https://www.arduino.cc/en/upload...

 

Note: Loads of direct accesible arduino related info, libs, forum's over there.

 

The question about the data through an USB cable to an unknown board is hard to answer.

Some boards have build in hubs (or emulated in software) and a single USB device can have multiple endpoints.

 

Edit:

Removed false asumptions about arduino history:

https://en.wikipedia.org/wiki/Ar...

and rant about the war between manufactorers of USB to Uart converter chips

CH340P

PL2303

FTDI232

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

Last Edited: Mon. Mar 20, 2017 - 02:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Paulvdh wrote:
The first arduino's had 2 AVR microcontrollers on the PCB.
Source?

 

See "prototype 3" on this page which appears to be his first experiments with AVR. That was a 128 and an FTDI. Not two AVRs. See:

 

https://arduinohistory.github.io...

 

As that notes the mega128 was "slimmed down" to mega8 and then slowly stepped back up through mega168 and mega328 but all those had AVR+FTDI I believe.

 

Only later (presumably through some kind of "chip deal" with Atmel?) some boards started to appear that first had the FTDI replaced by a megaUSB of some kind and later it became a 1 chip solution with something like a 32U4 doing both the core Arduino thing and the USB comms to reduce design cost.

 

Boards with CH430's or PL2303's are just "clone" boards where the producer is trying to reduce the FTDI cost with an equivalent.

Paulvdh wrote:
FTDI is however the only manufacturer which actively detects clones
Sadly also not true - Prolific did this too but then got "tainted" by the idea that the PL2303 would not always work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes,  Prolific got badly burned by fake PL2303.    FTDI badly too.

 

Most Arduino designs use a separate USB-Serial chip e.g. FTDI, mega16U2.   Chinese clones use FTDI, mega16U2, PL2303 or CH340.

 

There was a brief experiment with the Arduino Leonardo/Micro which have a single mega32U4 for Target and USB.    It was a bit of a disaster.

Teensy and STM32 Maple also rely on a single chip for Target and USB.

 

The single-chip approach "works" but is not as foolproof as having separate USB comms chip.

The beauty of the original Arduino design is that you can't go wrong (until you connect an ISP programmer).

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The thing about Logic Analyzers is not the hardware, that can be bought cheap/inexpensive but  the software that comes with it makes all the difference in the world.

I've had a Saleae LA for years and it is the most used tool in the box.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ARDUINO BOARDS
Again, thanks for clewing me in. Now I know why I was confused ... Arduino isn't as standard as I thought so I'll have to take a close look at exactly what I'm buying. Getting the schematic is a great idea. Then I'll know exactly what's what.

LOGIC ANALYZERS
mike32217, I hear you. I'll take a close look at the Saleae LA.

Paulvdh mentioned open source sigrok software. I like the idea of the open source software. That way I know that, even if the company isn't around or no longer maintaining it, others will ... maybe even me.

RobShaver:-]
---

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes,  there are many Arduinos.    I suggest that you just stick to Uno.   

 

I would also suggest that you get a Saleae Logic-8 clone.     It works with the Saleae software and is fast enough for any AVR jobs.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The first arduino's had 2 AVR microcontrollers on the PCB.

 

No.  I think there was ONE arduino variant out of India that used double ATmega8 chips due to poor "local" availability of USB/Serial capable chips, but the FIRST "arduinos" used a transistor-based rs232 circuit, before they quickly switched to FTDI-based the "Arduino USB"...  You can see most of the older boards here: https://www.arduino.cc/en/Main/B... (actually, I'm not sure of the relative timing of the Serial Arduino and the first USB Arduino.  Both existed rather before the board gained any international "traction.")

 

Prior to Arduino, there was a "Wiring" board with a ATmega128 and FTDI - everyone agrees that this was the origin of Arduino, but there's some ... controversy over just how important that origin was.  And a more recent controversy over the relative important of software and hardware :-)  Some of those stories are here: https://arduinohistory.github.io/

I have formed my own opinions, which I mostly won't share.   But I'm happy that the legal dispute between .cc and .org seems to be over.