Arduino Pro Mini, Atmega 328 with Arduino Ominiloader Uno and a blank Atmega328P |
In response to the reader feedback I'm going to use Arduino for the DIY DRO Project and the stepper motor driven power feed. Arduino makes a great choice for beginners, in large part due to the standardized form factor and self-contained hardware. The flip side is that the boards cost between $35 and $70. “Wasting” a full-blown board for each little project gets expensive quickly. Every “mainstream” Arduino board comes with a USB-to-TTL adapter on-board that adds about $15-$20 to the board price. Having the adapter is convenient for prototyping, but in a “deeply embedded” projects this is a waste of money. Once you buy your first Arduino board or an “FTDI” adapter, the USB circuitry can be omitted. There are many ways to implement a minimalistic Arduino controller, but the most common ones are:
Five new Arduino Minis |
- Arduino Pro boards - most “Pro” variants are pin-compatible* with their non-pro counterparts but lack the USB circuitry, reducing the price by up to 30%. For example, Arduino Nano costs about $35 at my local electronics store, but Arduino Pro Mini costs about $19. Similarly, Arduino Mega costs $65, whereas it's “Pro” sibling costs only $44. If you aren't too comfortable with electronics, this is the easiest path, since the boards still include the power supply circuitry etc, so the differences are very small.
- Standalone pre-programmed AVR chip – this is another popular option. Sparkfun sells Atmega328 chips with pre-loaded with Arduino Optiboot (Uno 16MHz) bootloader for roughly $6. The rest of the circuit can be built for a few dollars, so the total outlay is under $10. The support circuitry is very simple, so this is a good option if you are somewhat familiar with electronics.
- Blank Atmega328 - if you own an AVR in-circuit programmer**, you can buy Atmega328 chips and burn the bootloader yourself. Mouser sells Atmega328P (DIP package) for $3.95, so this drops the price by another $2. A popular choice is Optiboot boot loader, which can be downloaded from Google Project Hosting
*Arduino Nano and Pro Mini are very similar, but the pinout is a bit different. Arduino Pro and Arduino Mega Pro are 100% pin-compatible with Arduino and Arduino Mega respectively.
**There is a way to use an Arduino board as an ISP (in-system programmer). Detailed instructions are available in this article.
These aren't the only options, of course. With Arduino being an open-source platform clever folks have come up with dozens, if not hundreds of variants. A quick search on eBay turned up several chinese-made Arduino Mini clones for $10 with free shipping. I can't comment on their quality and reliability, but the price appears to be low enough. I have tried making my own Arduino Minis. Without a microscope, soldering the QFPs wasn't too easy, but all five boards turned out great.
You might've noticed that there are unpopulated footprints on the boards. I did that intentionally to keep the circuitry to bare minimums. PCBs, uControllers, 22pF caps and the crystals totaled $37 shipped. This brought the unit price down to $7.40 (not too bad...)
Sparkfun FTDI Basic next to a generic USB-to-Serial adapter |
Arduino uses a virtual serial port for programming. [Some older models used a purpose built FTDI chip. New models (Uno, Mega 2560 V3 etc. use a second Atmega MCU for this purpose.] Sparkfun sells FTDI Basic board for about $16 and FTDI cable for a dollar more. Both are targeted at the Arduino Pro boards but can program any Arduino chip (with the correct voltage). If you intend to use Arduino Pro, Sparkfun's FTDI adapters make things much easier, since the pins match board's programming hader. There are less expensive alternatives, but many have severe flaws. For example, the board shown in the picture doesn't have DTR pin broken out, so auto-reset won't work properly. Moreover, the choice of the USB connector is, to say the least, questionable.
I'm not sure how dated your prices are for Arduino boards but I purchase Prom Mini's from China for $1.75 a piece. Nanos are even less expensive. I have purchased over 40 Pro Minis for a Cockpit simulator I am building. I have never had an issue with a single board. There are no shipping fee's and no taxes either. A win-win situation.
ReplyDeleteWell, the post is from 2012, so they are pretty dated. $1.75 a piece seems suspiciously low. Even at very high volume that is basically what a genuine ATMega chip costs, so I'd be cautious...
DeleteThank you for all your hard work Yuri. This is an amazing project.
ReplyDeleteBy chance do you know if this would work with ESP32 boards?