Tiny Arduinos

I’ve been playing with Arduino boards for the past year or two. These were designed as micro controllers for the masses — easy to program and simple to wire up. You need only the most rudimentary computer and electronics skills to get started playing with these excellent boards. They’re also relatively inexpensive. You can get an Arduino Uno board, (the most commonly mentioned Arduino in 2013), for about US$30.

But if you decide to start using these for real, i.e. deploying a prototype permanently or long-term, suddenly “relatively cheap” may not be quite as inexpensive as you’d like. Thirty bucks is reasonable for something that sits on your workbench, but that’s kind of expensive if you want to use a handful of them to monitor the temperature throughout your house: $30 x 5 is $150, which suddenly isn’t looking inexpensive at all.

There are cheaper alternatives, especially if all you need is a few I/O pins. The two that I’ve been playing with lately are Digistump’s Digispark and Adafruit’s Trinket. Both of these are priced under US$10 and use the ATtiny85 micro controller chip, the diminutive little brother of the chip in a regular Arduino.

Main differences between these two boards:

  • Trinket is a bit cheaper (about $1) than Digispark.
  • Digispark exposes all 6 GPIO pins, whereas Trinket has 5.
  • Trinket has a RESET switch. (You “reset” the Digispark via power cycling.)
  • Digispark supports “shields” (add-on boards) and currently offers ~20 shields.
  • Trinket is available in both 3.3V and 5V, Digistump is 5V only.
  • Digispark is smaller, but Trinket has mounting holes.

In general, I prefer the Trinket unless I need all 6 GPIO’s or the slightly smaller form factor of the Digispark. The Digispark shields can also be handy, but I only use those on workbench prototypes.

The Trinket tutorial has a wealth of information. Below are some of the things that I’m always looking up there.

  • GPIO output is 20 mA max, same as a regular Arduino.
  • I2C pins are GPIO #0 (I2C data) and GPIO #2 (I2C clock).
  • USB communication uses pins #3 and #4. Hardware on these pins can interfere with the USB interface, e.g. reprogramming the Trinket. So it’s a good idea to provide some sort of disconnect ability if you use either of these two pins.
  • PWM output available on pins #0, #1, and #4.
  • ADC (analog input) pins are GPIO #2, #3, and #4. Keep in mind that the GPIO/digital pin numbers are ”’not”’ the same as the analog inputs! The printed labels on the Trinket are the ”digital” pin numbers.
    • GPIO/digital #2 is analog (ADC channel) 1
    • GPIO/digital #3 is analog (ADC channel) 3
    • GPIO/digital #4 is analog (ADC channel) 2 — Yes, the analog numbers are out of order

About Jim Vanderveen

I'm a bit of a Renaissance man, with far too many hobbies for my free time! But more important than any hobby is my family. My proudest accomplishment has been raising some great kids! And somehow convincing my wife to put up with me since 1988. ;)
This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *