Tag Archives: ATtiny85 MCU

Arduino and Adafruit unveil the Arduino Gemma

During his Maker Faire Rome presentation, Arduino Co-Founder Massimo Banzi offered attendees a preview of the company’s new collaboration with Adafruit — the Arduino Gemma, a tiny wearable MCU board packed in a 1-inch (27mm) diameter package.


Similar to the original Adafruit Gemma, the mini yet powerful wearable platform board is powered by the versatile ATtiny85. The board will be default-supported in the Arduino IDE, equipped with an on/off switch and a microUSB connector. Since it is programmable with the Arduino IDE over USB, all Makers will have the ability to easily create wearable projects with all the advantages of being part of the Arduino family.


“We wanted to design a microcontroller board that was small enough to fit into any project, and low cost enough to use without hesitation,” Adafruit’s Limor Fried (aka LadyAda) explained in a blog post last September. “Gemma is perfect for when you don’t want to give up your Flora and aren’t willing to take apart the project you worked so hard to design. It’s our lowest-cost sewable controller.”

Ideal for small and simple projects sewn with conductive thread, the [tinyAVR based] Arduino Gemma fits the needs of nearly every entry-level wearable creations — ranging from reading sensors to driving addressable LED pixels.

To better visualize just how small we are talking, look at this image from an earlier version of the Adafruit Gemma.


“The ATtiny85 is a great processor because despite being so small, it has 8K of flash and 5 I/O pins, including analog inputs and PWM ‘analog’ outputs. It was designed with a USB bootloader so you can plug it into any computer and reprogram it over a USB port (it uses 2 of the 5 I/O pins, leaving you with 3),” Arduino noted in its announcement.

In addition to ATtiny85 MCU, other key hardware specs include:

  • Operating Voltage: 3.3V
  • Input Voltage (recommended): 4-16V via battery port
  • Input Voltage (limits): 3-18V
  • Digital I/O Pins: 3
  • PWM Channels: 2
  • Analog Input Channels: 1
  • DC Current per I/O Pin: 40 mA
  • DC Current for 3.3V Pin: 150 mA
  • Flash Memory: 8 KB (ATtiny85) of which 2.5 KB used by bootloader
  • SRAM: 0.5 KB (ATtiny85)
  • EEPROM: 0.5 KB (ATtiny85)
  • Clock Speed: 8 MHz
  • MicroUSB for USB Bootloader
  • JST 2-PH for external battery

For those seeking to use an Arduino Gemma in their next DIY wearable project, the board will be available for purchase on the Arduino Store and Adafruit Industries beginning late Fall 2014.

Becky Stern builds a NeoPixel ‘punk collar

We’ve covered a number of cyberpunk inspired ensembles in recent months here on Bits & Pieces, including Mell Ell’s cos-play outfit, the NeoGeo watch, Kaleidoscope Eyes and the Flora-powered GPS jacket. Today, we’re going to be taking a closer look at a NeoPixel punk collar designed by Adafruit’s Becky Stern that is powered by an Atmel-based GEMMA (ATtiny85 MCU).

“Get your cybergoth on with five color-changing NeoPixels studded onto a leather collar,” Stern wrote in the tutorial’s introduction.

“The tiny GEMMA microcontroller can display endless animations on this fun funky accessory that’s easy to make with a little soldering. The GEMMA and battery live on the outside of the collar, [while] the NeoPixels pierce through the collar to be wired on the inside.”

Becky recommends that Makers kick of the project by connecting all pixels power pins to GEMMA’s Vout, ground to GND and the first data input to GEMMA D1. The data out from each pixel is wired to the data in on the next – and hobbyists can easily add five more pixels for a total of ten.

Next up? Installing the NeoPixel library, connect the NeoPixels to a solderless breadboard, using alligator clips to attach to GEMMA.

“You’ll need to change a few lines in the code regarding the data pin (1), type of pixels (RGB vs GRB), and number of pixels (5). From the Tools→Board menu, select Adafruit Gemma 8MHz or Adafruit Trinket 8 MHz as appropriate,” Stern noted. “Connect the USB cable between the computer and Trinket, press the reset button on the board, then click the upload button (right arrow icon) in the Arduino IDE. When the battery is connected, you should get a light show from the LEDs.”

If all the pixels are working, Makers can proceed to the next step: building the collar.

“While the collar is pretty durable, use caution in heavy rainstorms or really sweaty dance parties- remove and power down the collar if the circuit is going to get wet. Store your collar in the round, and don’t shove it in your bag or it might get twisted or crushed, which could break the circuit,” added Stern.

Interested in learning more about building a NeoPixel ‘punk collar? You can check out Adafruit’s full 
tutorial here.

An elegant AVR holocron for a more civilized age

A holocron, short for holographic chronicle, is defined by Wookiepedia as an organic crystal-lattice device used to store large quantities of data guarded by the device’s gatekeeper.
 In the Star Wars Universe, holocrons typically stored information on Force techniques, beginning with the Sith and the Jedi approximately three thousand years later.

Up until now, most of us Star Wars fans could only stare wistfully at the holocron rendered on our HDTV screens. Fortunately, NoMuse – aka The Starving Theater Artist – has meticulously created an AVR-powered holocron Instructables thumb drive replica for the masses.

Key project components include:

  • Atmel ATtiny85 microcontroller (MCU)
1/8th Acrylic sheet in pale blue and dark blue transparent
  • Primer
Rustoleum Hammered-Finish metallic
  • Thumb drive
USB cable
  • Super-bright LED

NoMuse kicks off the project by building a shell consisting of 6 pieces of laser-cut acrylic which, in the original kit, are identical in size.

“If you are making your own, you make them in three different sizes — which makes assembly much simpler. I chose to create the ‘overlap’ on this build by gluing little strips of 1/8″ acrylic rod to selected edges,” he explained.

“Since lasers don’t cut at pure right angles (the cut opens up towards the bottom), [this] meant I had to sand the pieces flat again after gluing. And then sand the whole assembly for quite some time after the box was built. Following gluing, and flat-sanding to as clean as possible, prime it, then address remaining seams and divots with Bondo Spot Putty. Sand again, prime again.”

Next, NoMuse painted the shell, fitted it with translucent plastic, laminated the diffused panels with cut-out patterns and engraved his creation. He then chopped up a USB cable, pried the housing off a thumb drive (the wires from the cut-off end of the USB cable were soldered directly to the exposed pins of the thumb drive), fitted the LED lights, inserted a LiPo battery, swapped in a tilt switch and installed Atmel’s ATtiny85 MCU in a specially designed 8-pin DIP socket.

“The AVR chips can do capacitance sensing natively. Atmel even has a free library. But you can also do it through the Arduino IDE, using the capsense library from the Arduino Playground,” said NoMuse.

“The way the library works, the ‘send’ pin is used to trickle a charge to the receive pin through a large resistor. The time it takes that pin to reach threshold is dependent on the RC value; hence, adding the capacitance of a human body changes it. With a resistor of 1 meg, actual touch is required. With ten meg ohms, you can trigger from a few inches away, and with more than that, you can push it out to a foot or more… This also increases the sense time, [so] to keep the rest of the circuit running smoothly I found it was better to stay with a mid-range value.”

Interested in learning more? You can check out the the holocron’s official Instructables page here.

Customizing a Pomodoro timer with the ATtiny85 MCU

Robin Scheibler says he has always been interested in Atmel’s popular ATtiny85 microcontroller. Indeed, Scheibler describes the MCU as “minimalist, yet powerful,” making the silicon a very attractive platform for both gadgets and hacks.

Unsurprisingly, Scheibler is also interested various charlieplexing techniques, or the art of controlling multiple LEDs with as few pins as possible. 

Recently, he decided to combine both interests by building a custom timer for the Pomodoro technique – which aims to increase productivity by splitting time into slices of 25 minutes of work followed by a 5 minutes rest period.

“The technique proposes using a tomato shaped kitchen timer to keep track of time, but I designed and built my own,” he explained in a blog post. 

”The ATtiny85, with its 5 GPIO pins available by default (sacrificing ISP yields an extra pin, but I didn’t want to go down that road), seemed like the perfect candidate.”

Aside from the ATtiny85 MCU (as TIMER1), key specs for Scheibler’s Pomodoro timer include a basic user interface (a single tactile switch), buzzer (driven by TIMER0 in PWM mode at 4 kHz, 50% duty cycle) and power (CR2032 lithium coin cell).

In addition, Scheibler assigned the three remaining GPIO pins to LEDs using charlieplexing – driving 6 LEDs using on three pins. On the software side, Scheibler says the code is completely interrupt driven.

“TIMER1 and its overflow interrupt are used to keep track of time during each state, [while] the tactile switch triggers an interrupt to wake up the AVR, or switch between states,” he added.

“Blue arrows are state switching triggered by a push on the button. Red arrows switching are caused by the timer expiration. The main states are black circles [and] the grey circles the transition states. It was important to add the BACKOFF state to debounce the tactile button because it triggered multiple interrupts.”

Interested in learning more Scheibler’s Atmel-powered Pomodoro timer? You can check out the project’s official page here.

Building a vibrating timepiece with an ATtiny85 MCU

A Maker by the name of “qquuiinn” has designed a vibrating timekeeper powered by Atmel’s ATtiny85 microcontroller (MCU). The device – which recently surfaced on Instructables – is described as a watch without a face.

Indeed, time is relayed every quarter hour via a series of pulses on a vibration motor in roughly the same format as an antique grandfather clock. Meaning, if it is 3:15, the motor will generate three long vibrations followed by a single short shake.

As noted above, the watch is built around Atmel’s ATtiny85.

“The ATtiny keeps the time, [while] driving the vibration motor. A transistor is used as a motor driver to current-protect the [MCU],” qquuiinn explained.

“Even though the vibration motor is small, it needs more current the the ATtiny can handle. Finally, there is a button to manually request the time. The entire setup is mounted on protoboard and powered by a coin cell.”

On the software side, qquuiinn programmed the ATtiny85 MCU with an Atmel-powered Arduino board.

Interested in learning more about the Atmel-powered vibrating timepiece? You can check out the project’s official Instructables page here.

Video: Cuboro goes digital with an ATtiny85

Cuboino can probably best be described as a tangible, digital extension of the classic marble puzzle game Cuboro. Designed by Felix Heibeck of the University of Bremen, Cuboino is powered by Atmel’s versatile ATtiny85 MCU.

“Cuboino consists of a set of cubes that are seamlessly compatible with the Cuboro cubes. In contrast to the passive Cuboro cubes, Cuboino modules are active parts of a digital system consisting of sensor cubes, actor cubes and supply cubes,” Heibeck explained.

“By snapping them together, players can build a modular system that functions according to the individual functionalities of the Cuboino cubes. Cuboino establishes a new pathway that is not embodied in the marble, but adapts to the medium of its transmission. Signals can be received by multiple modules, creating more than one signal at a time. This allows signals to intertwine, thus creating more dynamic and complex outcomes.”

As previously discussed on Bits & Pieces, Atmel’s high-performance, low-power sipping 8-bit AVR RISC-based ATtiny85 MCU boasts 8KB ISP flash memory, 512B EEPROM, 512-Byte SRAM, 6 general purpose I/O lines, 32 general purpose working registers, one 8-bit timer/counter with compare modes, one 8-bit high speed timer/counter, USI, internal and external Interrupts.

The ATtiny85 microcontroller also feature a four-channel 10-bit A/D converter, programmable watchdog timer with internal oscillator, three software selectable power saving modes and debugWIRE for on-chip debugging. The device achieves a throughput of 20 MIPS at 20 MHz and operates between 2.7-5.5 volts. By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz – neatly balancing power consumption with processing speed.

Interested in learning more about Cuboino? You can check out Heibeck’s project/thesis page here. You can also read more about Atmel’s extensive tinyAVR lineup here.