Paul Stoffregen's Teensy boards are the way to go. The hardware and the software are excellent. Heaps of power thanks to the ARM Cortex M4 and you still get the Arduino IDE. Can't recommend them enough, wish I had of moved to them far sooner. Everybody I've given one to has loved them, and the USB support is also very welcome. (As far as price goes, they're development boards and worth every cent for beginners.)
The Teensy boards are fabulous. I'm so impressed by what Paul Stoffgren has done. He must be some kind of 100x developer. And there are some power users of his boards, who have contributed libraries as well.
It's worth noting that while you can ease your way into programming with the functions available within the Arduino IDE, there are libraries for many of the special functions of the chips, and all of the special function registers are exposed, so you can make full use of your hardware capabilities if desired.
As for choosing a microcontroller, I'm generally tempted to start by choosing a development tool, because I'll be spending more of my time in code development and testing than in any other activity.
We've had the pleasure of having Paul as a sponsor for our senior project, a sample-based midi synthesizer, running on, at least, the Teensy 3.2 and 3.6; we got free hardware for development, and he's been quite supportive, despite being obviously perpetually busy. And I can't say I ever felt at all hindered by the hardware or its libraries, and although we started the project with almost no embedded experience. Quite a fun way to end college.
Having worked on college labs with Paul 100x is about right. We just kinda looked in wonder at his projects... and he sold us the parts for ours... A real serving individual actually.
One of the things I like about this choice is one does not need an IDE, at least not with the 2.0. One can do non-graphical (systems) programming on an underpowered computer with no graphics.
I statically compile the loader. On BSD at least, no 3rd party libs are needed. Then all I need is avr-gcc. I can do everything from the command line. No closed source tools. No requisite graphics layer (e.g., Windows OS). No large interpreters (Python, etc.).
Can anyone recommend other boards where everything can be done like this, i.e., without needing closed sorce tools, graphics layer, or installation of interpreters and scripting libraries?
I have about 2/3 of an 8080 emulator running CP/M for a MSP430 LaunchPad somewhere; because that MSP430 only has 2kB of RAM it has to swap to an external SRAM device. There's AT keyboard support (via an external level shifter).
I got it to the point of booting (very slowly) up to the command line prompt and processing basic commands, but unfortunately I never figured out how to make the screen work, so that's where the project stalled. The hardware's since been broken up and repurposed.
All in C and hand-written assembly tied together with a makefile, using tools that are in Debian. The standard flash tool (also in Debian) is really easy to use and even supports JTAG debugging over USB. (Also the MSP430 has a lovely assembly instruction set if you want to work with that sort of thing.)
Any of the Cortex-M* series are also generally a good choice, for example the STM32* series. All of these are supported in mainline gcc, and have open source support libraries provided by the vendor or via libopencm3. Be a bit careful, as some vendors like to use proprietary licenses for their headers, but in most cases there is at least one open source alternative.
And of course the RISC-V HiFive1, though it's still very new and in sampling quantities.
Do you want to understand in detail what's happening? => Arduino UNO
I wonder what your definition of "understand in detail what's happening" is if you recommend an Arduino for that.
It doesn't have to get as far as https://www.youtube.com/watch?v=UJHeDvr_doM (something that I recommend every should try at least once if they claim to know how things really work) but I think reading the datasheet and using the bare MCU with Asm is a good start, things which those staying within the limits of the Arduino ecosystem wouldn't be doing.
You can actually do a soft transition from the (opaque) Arduino programming style to a programming style closer to hardware. After all, Arduino programs are just C++ and you can plug in your own functions and assembler and you can even compile and upload your own ASM/C/C++ program written from scratch and compiled with the gnu-avr-toolchain to the UNO.
After you have done all of that it might be a good idea to start soldering the AVR on your own boards.
Isn't it better to start with the mbed though(if you intend for a commercial product, at least at kickstarter/~20K-units level) ?
The quality of the libraries is higher(written by professionals), you have a wider selection of supported mcu's if you'd need to port, some mcu's support the mbed, easy to-use low-power api(an event driven framework that automatically puts the mcu to sleep when it isn't needed), ARM has put a lot of work in the security of the device and that's something that's very hard to replicate.
And like the arduino, if something isn't optimal - you can always write your own.
The only major drawback is the mbed is a bit more complex. For example, you need to use pointers, unlike the Arduino, where it's not a necessity.
Not really, I generally find vendor libraries to be middling in quality, I think the core Arduino libraries are actually far more battle tested (if much less featureful). If you don't need more than the Arduino provides, it's probably not worth the extra complexity.
The Atmega8 (and entire series of attiny/atmegas) is totally suitable for commercial applications - just stick the chip directly on your PCB. AVRs are pretty ubiquitous in consumer products.
I think this is more of a guide for somewhat experienced hardware people picking a microcontroller to go into production than a complete beginner to electronics. Agreed that anyone else should just grab an arduino.
I would say that if you are looking at getting started with embedded electronics from an electrical engineering/professional stand pint and looking to put things into production then don't start with Arduino and certainly don't view an RPi as a viable embedded solution.
A PicKit 2 and a 16F series Microchip microcontroller would be a much better starting point just to get up and running without feeling overwhelmed.
I agree with not starting with the RPi (to avoid the complexities of the Linux kernel), but I started with the PIC and SX series (before Arduino was a thing) and wouldn't recommend it anymore. If you want to learn an assembly language and twiddle registers then maybe you'd like the PIC, but I don't think it's more "professional" - virtually everyone uses C if at all possible at this point, and the AVR (or bigger PICs) are just as "production-ready" as the old PIC16F series. And you can still twiddle AVR registers with C if you so desire.
Assembly on PIC is horrible, I agree. I've only done one project in assembly on PIC and since then only used C with PIC which works fine across the whole range.
I come from the angle of "absolute beginner" who is trying to get started quickly. If you are really "looking to put things into production" you might be right. Using those boards I proposed will always have big disadvantages.
The original article is not written for absolute beginners, but for people who would go through the pain of soldering 100 pins to a self-designed PCB and failing 5 times before getting a working version.
I loved that one. We spend an entire year on high school programming the 16F84 on assembler. We re-implemented all projects we did the previous year with nand gates like semaphore, infrared barriers for counting stuff etc with pics, and it was mindblowing for me.
I also remember we did a board for writing the program in the pic because it was too expensive in my country.
I'll recommend NextThing CHIPs here too (I started buying them because PiZeros are/were too difficult to get in quantities greater then one. Same with the PiZeroW right now, I've got a project where I'd like 12 of them, but it's not work jumping through the hoops (and paying 12 times the shipping costs to Australia) to bother right now.
I disagree. Everything you listed a) can't be used for products, b) doesn't let you make progress beyond "oh look, I lit up an LED!".
Sure, if you never programmed a small device, by all means, start with an Arduino. But after you do light up that LED, please learn more. Go bare metal, learn about interrupts, state machines, entering sleep states -- without those things you'll stay forever in the toy world. In the real world, if you work with battery-powered devices, you never have the comfort of busy waiting for your UART/I2C transmission to finish, or calling analogRead() and getting immediate results (because ADC takes time and you want to do it asynchronously).
It's my pet peeve: I'm very happy that Arduino has been such a success, but I think too few people progress beyond that, and many believe this is how one programs embedded devices.
As for RPI, it's neither a production device, nor a learning tool for embedded programming. The complexity involved means there is no way a beginner can understand everything that's going on.
As the other poster stated, you don't really disagree, just misunderstand.
You can actually do everything you need in the Arduino IDE and then leave the IDE, compile and upload your own program written from scratch to the UNO. All that while staying compatible to the dozens of hardware extensions out there.
The "Arduino" part is not the destination, it's three quarters of the path to the destination and that path is already paved.
You said:
>Sure, if you never programmed a small device, by all means, start with an Arduino.
And the OP said advice "for real beginners", i.e., people who have never programmed a small device. I didn't read anything that hinted that the OP was suggesting people never advance beyond Arduino.
Again your disagreeing with things the OP never said.
You:
>As for RPI, it's neither a production device, nor a learning tool for embedded programming.
OP:
>you really just want a small computer running Linux but with GPIO-Pins?=> Raspberry PI
>I disagree. Everything you listed a) can't be used for products, b) doesn't let you make progress beyond "oh look, I lit up an LED!".
Nonsense. This device: http://nanthealth.com/vitality/, which was a "big deal" to telemedicine folks (and is still a good product, please somebody reproduce it for cheap), and resulted in a MASSIVE exit for the people who founded it, was built around an atmega328p.
I would be good money that it was prototyped on an arduino.
Arduino was designed as an easy way for non-technical artists to use electronics in their projects. I won't argue that anyone half-serious should go bare metal.
The RPI is a useful production device in some niche applications, thanks to the Compute Module. There are a lot of circumstances where you need a powerful SoC, but you don't have the time or the budget to deal with a dense BGA; the RPI Compute Module replaces a lot of difficult design work with a standard SODIMM slot. Obviously it's no use in a mass-market consumer product, but it makes a ton of sense for a small-volume industrial device.
Arduino is fine if you just need some low level / real-ish-time control. I used one as glue for a test setup (converting a voltage input to drive some DC motors via H-bridges) and it was perfect for the job - simple to set up, straightforward to run, a little underpowered (I couldn't quite get to 20+ kHz PWM on the pins in software, so it's a bit noisy) but adequate.
I absolutely agree that an Arduino shouldn't be the core of a consumer electronics device, but for anyone not familiar enough with the field to know that already, it's probably at about the right level.
There is also the Particle Photon which is a really nice little ARM board with built in WiFi. The library is more or less the same as Arduino, but not quite identical. It's still ARM C underneath so you can interleave your own code if you want to. It costs around $20.
The system is designed to work with their cloud interface, but everything is open source and you can run offline if you need to. What's particularly neat about Particle is that if you decide that you want to make a product, they've got extensive guides on how to do it.
I just came back to my esp32 after a 6 week hiatus and the framework has evolved impressively in that amount of time. It's an awesome product for a steal of a price. Definitely at the usable stage.
If that's the case, then it's basically just supply chain issues that's left. It's still hard to get batches and it's probably still pretty expensive compared to the 8266?
Many/most Arduino boards are open source. So if you small and are trying to get a simple product line established you can start with designing a daughter/motherboard that the Arduino board plugs into for first series.
Then, once you scale up, embed the Arduino parts into the same board.
You can use a clone also, which can be much cheaper.
But I wouldn't go recommend Atmega328 for new designs unless its extremely simple, so when I say "Arduino" I mean something similar, like a Teensy 3+ or Olimex STM32 or Adafruit Feather M0
That depends on what the product may cost and how many you intend to sell. In general you might be right. But if you look in getting started and having a solution (suboptimal but working) quickly, then they are a good choice. Maybe not the best choice, but good.
Do you want to understand in detail what's happening? => Arduino UNO
Is the UNO too small/slow? => Arduino Due
Still too small or you really just want a small computer running Linux but with GPIO-Pins? => Raspberry PI