Tag Archives: Trinket

A look at some of today’s wearable microcontrollers


This list is sew awesome!


Created by Leah Buechley of MIT, and introduced commercially with SparkFun back in 2007, the LilyPad was the first board to feature sew-through contacts for stitching soft circuits. Since then, a number of “ready-to-wear” electronics platforms have emerged, each of which have helped usher in a new generation of textiles that look to redefine wearable technology. In fact, a recent Gartner report revealed that the emergence smart garments will potentially disrupt the market. So much so that embedded clothing shipments are projected to rise from a mere 0.1 million units in 2014 to 26 million units in 2016.

As first noted by MAKE: Magazine’s Boris Kourtoukov, “there’s a plethora of options” when it comes to these microcontrollers. What’s more, they all possess one common trait: they’re powered by Atmel. These so-called body boards are now giving Makers the ability to easily (and affordably) produce their own projects in ways that otherwise would have been unimaginable.

So, without further ado, here’s a look at some of today’s most prominent boards ready for adornment.

The Favorites

LilyPad Arduino

09266-04

LilyPad is a wearable e-textile technology developed by Leah Buechley and cooperatively brought to life with SparkFun. Each LilyPad was creatively designed to have large connecting pads to allow them to be sewn into clothing. LilyPad can sense information about the environment using inputs like light and temperature sensors and can act on the environment with outputs like LED lights, vibrator motors, and speakers. And yes, they’re even washable.

MCUATmega328

FLORA

Mega

FLORA is Adafruit’s fully-featured wearable electronics platform. The round, sewable microcontroller weighs in at 4.4 grams and measures only 1.75 inches in diameter. 100% Arduino-compatible, the platform is one of the most beginner-friendly ways to create some amazing wearables. The FLORA family includes an assortment of sensors and RGB LEDs that let you add lighting to your projects, not to mention also boasts built-in USB support, eliminating the need for pesky special cables and extra parts.

MCUATmega32U4

GEMMA

100212_1024x1024

Those who are seeking the awesomeness of FLORA but in a tinier package are sure to love another one Adafruit’s wearable platforms: the GEMMA. The board, which packs all of its features in a 1″ diameter package, is programmable with an Arduino IDE over USB. An upcoming Arduino IDE-supported version will feature an on/off switch and microUSB connector.

MCUATtiny85

TinyLily Mini

2

A brainchild of TinyCircuits, the TinyLily Mini is an Arduino-compatible module in an ultra-compact package. Geared towards Makers looking to devise e-textile and wearable applications, the board is very similar to the Arduino LilyPad, with the same processing power and software compatibility – but at 1/12th of the size. The TinyLily Mini also is equipped with sew tabs for eight I/O (four digital, four analog/digital) and four power sew tabs (two for power, two for ground).

MCUATmega328

SquareWear

Sqw

SquareWear is an open-source, wearable board. The Arduino-compatible MCU measures 1.7″x1.7″ in size, and is equipped with a built-in rechargeable Lithium coin battery. It is designed to be sewable, which allows Makers to stich conductive threads through its large pin pads, solder a wire directly onto the pads, or solder snaps onto the pads for quick attachment or detachment from textiles and fabrics. Additionally, the MCU packs an on-board miniUSB port that can be used for programming, charging batteries and serial communication, as well as a color LED, a pushbutton, a buzzer, a light and temperature sensor, and three MOSFETs to drive the high-current load. See, it’s hip to be square!

MCUATmega328

Xadow

Xadow_MainBoard

Seeed Studio’s Xadow is a high-performance, low-power board that is perfectly suited for wearable projects. The microcontroller can be powered either via USB or a Lithium battery. Also, there is charge circuit on this module that you can charge for the Lithium battery through the USB port. Xadow has a diverse selection of compatible modules, including a barometer, UV sensor, LED, OLED and even a full GPS antenna.

MCU: ATmega32U4

Trinket

adafruit-trinket-5v

Trinket goes to show that big things really can come in small packages. In fact, the tiny MCU is one of the lowest-cost Arduino IDE programmable boards on the market today. Adafruit designed a USB bootloader so Makers could easily plug it into any computer and reprogram it over a USB port just like an Arduino. It comes in two different versions: 3V and 5V. Both work the same, but have different operating logic voltages.

MCU: ATtiny85

Pro Trinket

MFG_2000

A bigger sibling of the aforementioned board, this 5V unit combines everything you love about Trinket along with the familiarity of the common core found in Arduinos. It’s like an Arduino Pro Mini with more pins along with built-in USB. The Pro Trinket, which still only measures 1.5″ x 0.7″ x 0.2” in size, features 18 GPIO, two extra analog inputs, 28K of flash, as well as 2K of RAM. Like its older brother, the MCU has onboard USB bootloading support and Optiboot support, so Makers can either program their Pro Trinket over USB or with a FTDI cable just like the Pro Mini. (Recently, paying homage to our friends at Hackaday, the Adafruit crew even unveiled a Hackaday.io branded board — black solder mask, Jolly Wrencher and all. And, it’s stunning.)

Atmel MCU: ATmega328

Ones to Watch

BITalino

Bit

BITalino is a low-cost, easy-to-use toolkit designed for anyone looking to build self-tracking applications based on information from their body. The platform enables Makers to quickly bring projects entailing body signals and quantified self wearable devices to life, as well as learn how to create actual medical devices — which otherwise can cost upwards of $10,000. BITalino is described by its creators as an out-of-the-box solution that offers an array of Arduino-compatible software and hardware blocks equipped with sensors for electrocardiography (ECG), electromyography (EMG), electrodermal Activity (EDA), accelerometry (ACC), and ambient light (LUX).

MCUATmega328

Printoo

Printoo

Launched by Ynvisible, Printoo is a printed electronics prototyping platform that is capable of bringing everyday objects to life. Comprised of various hardware modules that can all be connected to each other, it is currently the only platform that appears to have a robust flexible form-factor. This enables Makers to quickly and seamlessly create first product concepts for smart wearable devices. Moreover, the board is fully-compatible and programmable with the Arduino IDE.

MCUATmega328

SuperDuino

SuperDuino

Introduced by Maker Mohsin Farooq, SuperDuino is a coin cell operated, Arduino-compatible board with a built-in 1.7-inch color display and a three-axis accelerometer. As you can imagine, this makes the MCU a suitable match for a wide-range of DIY games, gadgets and most of all, wearable devices.

MCU: ATmega328

Rewind: Oh. My. God. Becky, look at those wearables…

From GPS logging dog harnesses to MIDI drumming gloves, Adafruit’s Director of Wearable Electronics Becky Stern has unveiled some pretty wonderful wearable projects over the past couple of months. So much so that we’ve decided to pay homage to the LED-lovin’, gadget-glowin’ Maker by showcasing several of our favorites.

While the inherent versatility of Atmel’s MCUs have made our silicon a favorite amongst engineers for next-gen smart devices, evident by Becky’s latest designs, they have also increasingly emerged as the go-to choice for Makers creating DIY wearables.

Interior Purse Lights

gemma_interior-purse-light-20-crop2

Never fumble through your purse in the dark again, thanks to this fashionable yet practical innovation. The project makes use of Adafruit’s GEMMA Sequin Starter Pack (ATtiny85), conductive thread and conductive hook and loop tape.


NeoPixel Punk Collar

neopixel-punk-collar-02

Punk meets goth in this one-of-a-kind cybergothpunk creation — a leather collar studded with five color-changing NeoPixels. The project is powered by the ATtiny85 based GEMMA platform — which can also be substituted by a Trinket — and will surely make you the life of any party!


Cyberpunk Spikes

3d_printing_cyberpunk-spikes-gemma-adafruit-overtheshoulder

As we continue to delve deep into cyberpunk territory, check out these slick 3D-printed spikes! Add these bright spikes — which uses a NeoPixel strip diffused by NinjaFlex 3D printing filament — to any ensemble. This project again employs a GEMMA microcontroller that animates the LEDs.


NeoPixel Ring Bracelet

flora_09-bracelet

Sure, you can catch the attention of onlookers with the latest smartwatch or fashionable jewelry, but how about adorning your wrist with an eye-popping bracelet instead? Passerby won’t help but stare at the various light patterns displayed on this nifty DIY bracelet, which boasts set of four NeoPixel rings along with the tiny GEMMA.


Tank Girl Goes Cyberpunk

Images

Whether you’re a fan of the 1995 American sci-fi flick Tank Girl or not, you will surely appreciate Becky’s 3D-printed, LED-embedded Bandolier of Light. Similar to the aforementioned cyberpunk spikes, this unique getup is comprised of NinjaFlex filament, some NeoPixels, and of course, an tinyAVR driven GEMMA.


Laser Dog Goggles

trinket_olive-becky-stern-laser-dog-goggles

What would a bright night on the town be without an appropriate getup of man’s best companion. Here, Becky transformed once-ordinary Doggles into a paw-some pair of cyberpunk-style glasses with a rotating laser. Using a Trinket 3v MCU (ATtiny85), a set of clear dog goggles and a laser diode as the center of the device, this invention will surely be a hit on the scene.


Light-Activated Pixel Heart

light-activated-pixel-heart

Talk about wearing your heart on your sleeve, or in this case, shirt. The embedded GEMMA and light dependent resistor detect when a wearer’s NeoPixel heart is uncovered, and just like that, triggers the heart light on.


Superhero Power Plant

gemma_dsc_3790-crop

If there’s one thing you should know when it comes to Makers and DIY wearables, it’s that we love Iron Man! Incorporate a Tony Stark-inspired arc reactor into your next Comic Con cosplay costume with an uber-small GEMMA, laser cut acrylic frame, and NeoPixels to round out the handheld power plant.


Firewalker LED Sneakers

flora_becky-stern-firewalker-sneakers-adafruit

Think of it as a DIY version of those old-school LA Lights you wore as kids, only cooler. And, much brighter. Cheaper, too! This project — a collaboration between Becky and the creative Phillip Burgess — shows just how easy it is to mod a pair of high-tops with a NeoPixel strip and FLORA (ATmega32u4 MCU). A velostat step sensor inside each shoe activate a light animation with every step taken in these new DIY kicks.


LED Sparkle Skirt

flora_jmd_1715_rbr-crop

Add a simple sparkle to your skirt or other piece of attire using a [megaAVR basedFLORA controller and accelerometer, conductive thread, and RGB NeoPixels.


Plushy Game Controller

main_handheld_adafruit_nes_flora_controller-crop

Throw pillows? That’s boring. An oversize plush pillow that functions as a game controller? Now we’re talking! This idea was brought to life with just some conductive fabric, a FLORA board, and a capacitive touch sensing circuit to round out the electronics.


Wearable GPS Tracker

wearable-gps-tracker

Make a wearable GPS tracker for you, or even your furry friend. Use an ATmega32U4 powered FLORA main board and GPS to log your distance. Simply integrate it into a backpack, dog harness, or whatever you want to track for that matter.


Pac-Man Animated Pixel Suspenders

flora_shelly-pacman

This set of “blinken-braces” boasts 30 NeoPixels, each of which are sewn to these suspenders and controlled by a FLORA board running a dazzling Pac-Man inspired animation.


MIDI Drum Glove

force___flex_midi-drum-glove-34

Look like Michael, keep the beat like Iggy. Play your favorite synths by finger drumming! Stitch up four piezos into a glove and use a FLORA to transmit signals to your favorite music-making software.


GPS Jacket

GPSGJack

Built around FLORA, this slick, megaAVR powered GPS Jacket reacts to your whereabouts with color-changing, pulsing LED lights around the collar.


FLORA NeoGeo Watch

flora_FLORA_NeoGeo_Watch_Risa_Rose

Based on the wearable FLORA platform and an accompanying GPS module, the NeoGeo Watch can be tastefully paired with Adafruit’s futuristic goggles and GPS Jacket for a full cyberpunk/steampunk wardrobe.


Zipper Switch

braincrafts_zipper-switch-03

Zippin’ awesome! In one of her latest projects, Becky explores yet another innovative way of turning otherwise relatively dull clothing into more fun, interactive attire. Take zippers, for instance. Here, the super talented Maker transformed them into a momentary switch for activating lights, sounds, and more using stainless steel conductive thread. As the zipper pull travels along the teeth, two pads of conductive thread are bridged, momentarily creating an electrical connection. This connection can be sensed by an Atmel based MCU, such as the FLORA or GEMMA, with an activated internal pull-up resistor.


If you’re feeling inspired to make your own project using Adafruit’s FLORA, GEMMA and Trinket wearable electronics platform, explore everything there is to know here.

Adafruit’s Pro Trinket gets the Hackaday.io treatment

Last year, Adafruit launched the Trinket, a tiny microcontroller board built around our ATtiny85. Then back in August, they shared the news that the uber-mini board was getting a big sister, the Pro Trinket. Based on the incredibly-popular, Maker favorite ATmega328, the Pro Trinket offers the familiarity of an Arduino Pro Mini with more pins and USB thrown in the mix.

adafruit_products_2000-09

Today, paying homage to our friends at Hackaday, the Adafruit crew has even unveiled an Hackaday.io branded Pro Trinket — black solder mask, Jolly Wrencher and all. And, it’s stunning.

io

As Hackaday points out, the board features a micro-USB plug on one end, integrated voltage regulator, 16MHz crystal oscillator, and the chip is running a modified version of V-USB (meaning that it can be programmed via USB). With the Pro Trinket, Makers have the choice of either programming with the Arduino IDE, using AVRdude with the “-c usbtiny” programmer flag, or flashing the chip directly with an AVR programmer like the AVR Dragon.

Don’t let its size fool you. The super small Pro Trinket boasts more flash and more RAM — 18 GPIO, a pair of extra analog inputs, 28K of flash, and 2K of RAM. While the Pro Trinket may only measure 1.5″ x 0.7″ x 0.2″ (without headers), it possesses the same capabilities as a much larger Arduino Uno.

rirn

Aside from the on-board ATmega328P, other key specifications include:

  • 16MHz clock rate, 28K FLASH available
  • USB bootloader with an LED indicator
  • Headers for an FTDI port for reprogramming
  • Micro-USB jack for power and/or USB uploading
  • On-board 5.0V power regulator with 150mA output capability and ultra-low dropout
  • Power with either USB or external output (such as a battery)
  • On-board green power LED and red pin #13 LED
  • Reset button for entering the bootloader or restarting the program.
  • Works with 99% of existing Arduino sketches (anything that doesn’t use more than 28K, and doesn’t require pins #2 and #7)
  • Mounting holes

According to our pals over at Hackaday, “This is also perfect for taking with you on the road. The board is so small you’ll always have space for it. I already travel with an external battery and a micro-USB cable for topping off my cellphone. These will work perfectly as a power source and programming cable for the Trinket Pro. The board itself and any hardware I want to hang off of it is all that I’m adding to my backpack. Above you can see the quick proof-of-concept I made while at the Hackaday anniversary party. It’s a row of 8 LEDs and some current-limiting resistors. Want to try your hand with PWM and visualization? You can do it on a plane, you can do it on a train, or a bus, or a boat (Trinket prototyping while bicycling is not recommended).”

adafruit_products_2010-02

Are you just wrapping up a prototype on an Arduino Uno and looking to shrink it down? Do it in style with the Hackaday.io Pro Trinket. Interested? Head on over to the official Hackaday Store here.

Meanwhile, following the success of their 10th anniversary Trinket Pro boards, Hackaday has just announced their latest Trinket Everyday Carry Contest, which encourages Makers to create pocket-sized electronics projects using the ATmega328 based board.

Tank Girl goes cyberpunk this Halloween

Whether or not you’re a fan of the 1995 American sci-fi flick Tank Girl, you will surely appreciate this 3D-printed, LED-embedded Bandolier of Light design from Adafruit’s Becky Stern. Just in time for Halloween festivities, this cyberpunk ensemble will surely be the life light of the party!

led_strips_bandolier-of-light

The build is relatively easy, comprised of a meter-long strip of 60 white Adafruit NeoPixels, some wire and sewing supplies, and most importantly, an ATtiny85 based Trinket or GEMMA microcontroller.

led_strips_becky-stern-cyber-tank-girl

The bandolier itself is 3D-printed in white NinjaFlex, enabling it to be comfortable and flexible enough for easy flinging across the shoulder in Rambo-like fashion. After soldering some wires from the NeoPixel strip to the Atmel based MCU, the lights are placed between what Stern calls the “3D-printed bullets of pure love” and a strip of fabric.

Think this costume is for you come October 31st? Find the step-by-step tutorial from our friends at Adafruit here.

 

3D print your own Daft Punk helmet

Just last year, Daft Punk’s ‘Get Lucky’ shot to the top of the charts and launched the mysterious duo back into the center of popular culture. Shorty thereafter, we began to see the emergence of several Daft Punk-inspired, Atmel powered projects ranging from animatronic cakes to slick Tron bars. Today, we’re showing off yet another… okay, just ‘One More Time.’ Adafruit recently created quite the dazzling cosplay outfit influenced by the techno giants mixes two of our favorite things — wearable technology and 3D printing.

light_hero-look-lp1

Whenever the Daft Punk duo rocks the stage, there is something undoubtedly cool about them. Whether it is their thumping beats, or scintillating laser shows, fans have been enthralled for over two decades. The group’s one standout characteristic has always been their signature flashing helmets. The iconic headwear has become synonymous with classic dance music, and now you can have your very own!

The Ruiz Brothers over at Adafruit have put together a complete step-by-step guide on how to craft a customized Daft Punk lid, including everything from the 3D printing schematics to the required coding.

After a three-day 3D printing session using a semi-transparent PLA filament, the builders had their helmet base. To power the front facing light show, they incorporated the GEMMA and Trinket wearable platform boards — both built around the Atmel ATtiny85 — to serve as the brains of the operation. NeoPixel strips (144 pixel per meter) were laid inside the hollowed out shell, whose translucent material allowed for colorful LEDs can light up just about any room. “This makes the headset great for Maker Faire, household parties, and underground EDM raves,” the folks at Hackaday suggest.

Once installing the LED strips to their liking and programming them to hypnotize onlookers, the helmet was ready to ‘Get Lucky’ and jam! Be careful though, visibility is limited behind those blinding lights!

If you recall, last year the Wall Street Journal reported on the countless amount of people who devised perfect replicas of the helmets worn by the band and sold them for thousands of dollars. Now, thanks to our friends at Adafruit, with just a few microcontrollers, LEDs and a 3D printer, you can make a fully-functional version of one of the designs without breaking the bank. Don’t be daft, go check out the project’s entire breakdown here!

Light up your day with this Trinket bracelet

Maker Marcus Olsson has designed ED bracelets before. Marcus’ last project featured an accelerometer so that the LEDs would react to the wearer’s movement. Now, his newest iteration sports a microphone that allows the illumination to react to the sounds that surround it.

The Maker’s friends began to pester him for a creation that interacted with the soundscapes in their environment, so he quickly got to work on this device. Powered by an uber-mini Trinket MCU (ATtiny85), the bracelet allows a microphone to communicate with a Neopixel strip affixed within the casing.

2014-07-31 12.30.42

After an initial test, Marcus needed to make some adjustments to the 3D-printed shell of his bracelet to better incorporate the microphone. After some slight tinkering, foam tape enabled the microphone to be secured.

If you want to rock Marcus’ bracelet design at your next dance party, head over to his blog for a full tutorial on how to put the gadget together. For more stylish wearable designs, you always check out the Bits & Pieces archive.

This geiger counter is powered by Adafruit & Atmel

The Geiger–Müller counter, also known as a Geiger counter, is an instrument used for measuring ionizing radiation. According to Wikipedia, the device detects radiation such as alpha particles, beta particles and gamma rays using the ionization produced in a Geiger–Müller tube.

Recently, Johan of dynode.nl designed geiger counter powered by Adafruit’s Atmel-based (ATtiny85 MCU) Trinket.

“Lately I have been messing around a bit with microprocessor powered geiger counters. One smart guy came up with the idea of generating high voltage using PWM signals from the microprocessor itself,” Johan explained in a detailed blog post.

“With some additional external parts a HV supply and negative going pulse suitable for microprocessors is easy to make.”

So, how does the circuit work? Simply put, a ~1 Khz squarewave turns the MPSA44 high voltage transistor on and off – generating high voltage when the inductors current is shut off.

As Johan notes, the specific voltage is contingent upon the pulse width of the square wave which can be tweaked on a software level.

“The 1N4007 diode rectifies this voltage, and the HV cap removes most of the ripple on this voltage. The resistor limits current to the GM tube,” he continued.

 “The current pulses from the tube generate a voltage drop over the 100K resistor which turns on the BC546. When this happens, the voltage [via] the 10K resistor is pulled to ground, generating a negative going pulse each time the GM tube detects an ionizing ray or particle.”

It should also be noted that Johan’s design supports serial logging capability using a tx only software serial library tasked with outputting the measurements in CPM every 10 seconds on pin 4.

So, what’s next for the Trinket-powered geiger counter? Well, Johan says the platform still requires some tweaking, as the circuit is quite susceptible to electromagnetic interference which causes erroneous counts.

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

From Shanzhai to OSHW: The Maker Movement in China

Although the Maker and open source hardware movements are a global phenomenon, the DIY culture in China can actually be traced back to the ancient concept of Shanzhai. As Gabrielle Levine, the newly appointed president of the Open Source Hardware Association (OSHWA) notes, China is going to be a huge driving force in the open source hardware landscape.

“There are many similarities between [the local concept of] Shanzhai and the open source hardware community,” Gabriella Levine told OpenElectronics in February. “Both Shanzhai and open source hardware projects borrow information, tools, source code, CAD files and techniques; both improve upon other’s work to accelerate development.”

SeeedStudio founder Eric Pan expressed similar sentiments during a recent interview with Atmel’s official blog, Bits & Pieces.

“MakerSpaces will likely enable a new wave of tech startups in China as in the US,” he confirmed.

“Clearly, hardware development is becoming a more agile process with the aid of [open source] prototyping tools like RepRap and Arduino boards – both of which are helping to facilitate innovation across the world and particularly in China.”

Similarly, David Li, co-founder of Shanghai’s first Maker Space, told The Economist that the DIY movement has inspired the creation of legitimate and innovative products, with socially progressive Makers teaming up with more traditional manufacturers in China.

We at Atmel are at the strategic heart of the international Maker Movement, with a comprehensive portfolio of versatile microcontrollers (MCUs) that power a wide range of Maker platforms and devices, including 3D printers (MakerBot Replicator 2 and RepRap), the vast majority of Arduino boards, as well as Adafruit’s Gemma, Trinket and Flora platforms.

Indeed, Arduino boards are currently used by millions of Makers, engineers, schools and corporations all over the world. At least 1.2 million Atmel-powered Arduino boards have been sold to date, with the ATmega328-based Uno being a particular Maker and prototyping favorite. Of course, stand-alone AVR microcontrollers like the tinyAVR lineup are also popular amongst the DIY crowd.

As we’ve previously discussed on Bits & Pieces, an increasing number of Makers are kicking off project prototyping with Atmel-based Arduino boards. Concurrently, we are also seeing a jump in professional engineers relying on Atmel-powered Arduino boards to create initial models for their devices, platforms and solutions.

According to Gartner, 50% of companies expected to help build the rapidly evolving Internet of Things have yet to coalesce. This is precisely why Atmel views China’s Maker Movement as one of the primary tech incubators for future IoT companies and devices, many of which will undoubtedly use Atmel microcontrollers (MCUs) to power their respective platforms.

Atmel will proudly be attending Maker Faire Shenzhen this year on April 6-7. Our booth – #4 – is located right next to Center Stage. We’ll be showcasing a number of Atmel-powered products including a Zigebee-based lighting demo, robotic model car, various Seeeduino boards, the Rainbow Cube (LED light controlled by Atmel MCUs) and an e-ink badge.

I’ll also be giving a presentation about Atmel microcontrollers, the IoT and Makers at 2PM on April 7th at the Center Stage. Hope to see you there!

Interfacing with Adafruit’s Atmel-powered Trinket



Bits & Pieces recently covered a project by a Maker named Pocketmoon who wanted to demonstrate just how many components can be hung off Adafruit’s 3.3v ATtiny85-powered Trinket.

Today, we’re going to be taking a closer look at constructing a Trinket RGB shield clock, courtesy of the Adafruit crew. 

According to Adafruit’s Mike Barela, the project was inspired by a forum member who asked if the Trinket can be interfaced with an RGB LCD shield, which was originally designed to link with more “classic” Arduino boards using a standard shield pin layout.

“Obviously the shield cannot stack onto Trinket but with four wires, the display shield can hook up to a Trinket project well. This is accomplished as both use the I2C or two-wire bus to communicate,” Barela explained in detailed tutorial.

 “As a further demonstration, the Adafruit I2C based DS1307 real-time clock module is used to display the time and date. The display shield’s buttons allow for changing the hour in case of daylight savings time and toggle the backlight.”

Before kicking off the project, Makers will need to download three code libraries (TinyWireM, TinyRTClib, TinyAdafruit_RGBLCDShield) all optimized for Atmel’s ATtiny85 microcontroller (MCU) powering the Trinket. Next up? Modifying the Arduino IDE to work with Trinket by adding the hardware definition file, the avrdude.conf file, changing the ld.exe program (or download the preset Arduino 1.05 from Adafruit).

“Since we’re using I2C for the shield and real time clock, hookup is fairly straightforward,” said Barela.

“Don’t forget, I2C allows you to use multiple devices on two shared pins, perfect for when you don’t have a lot of pins like the Trinket.”

On the code side of things, Barela uses two programs are used to save space. The first, typically runs once (initialization) and sets the battery-backed DS1307 RTC, while the main code displays the clock value and polls the buttons. Meaning, if the up or down buttons are pressed, the value offset is incremented/decremented. This is added to the RTC clock time to form the hour.

“The combination of Trinket and the RGB LCD Shield is a good combination for display and input. There is enough code space to hook a number of sensors for real-time readout,” Barela concluded. “If you believe the shield form factor is not ideal, use of the LCD with the I2C backpack is a good combination. See the tutorial for the Trinket Ultrasonic Rangefinder as an example. If you want a more precise clock, you can swap the DS1307 for a Chronodot, it is code-compatible and ultra-precise!”

Interested in learning more? You can check out Adafruit’s detailed tutorial here.

How much you can hang off a Trinket (ATtiny85)?

Adafruit’s Trinket platform – based on Atmel’s versatile ATtiny85 microcontroller (MCU) – has been used to power a number of diverse projects in recent months, including an audio playerflickering candle in a jar, a knock drawer lock, a sound-reactive LED color organ and even a rover.

Today, we’re going to take a closer look at an Adafruit forum post by Pocketmoon who wanted to demonstrate just how many components can be hung off the 3.3v ATtiny85-powered Trinket.

Over I2C

  • DS1307 Real Time Clock (includes 24C32 32K Bit I2C EEPROM memory which is also visible on the I2C bus)
  • HMC5883L 3 Axis Compass Magnetometer
  • PCF8574 – Remote 8-Bit I/O Expander for I2C-Bus

Over SPI

  • OLED 128×64 SSD1306
  • 23K256 SRAM Chip – 32K of lovely SPI accessible memory.

“The SRAM provides a screenbuffer for the OLED module, which has no built in RAM. To draw the buffer to the display I read a ‘page’ worth of data (128 Bytes) at a time from the framebuffer and push these to the OLED, both over SPI. So a local 128 byte buffer is needed in the Trinket. All the Trinket pins are in use so I use a small switch to disconnect #3 and #4 during programming,” Pocketmoon explained.

“With SPI you need a separate Slave Select line for each device. These are provided by the PCF8574 which is an I2C IO Expander. I write to this first (over I2C) to select one of the output pins which act as Slave Selects for each SPI device. The outputs (I’m using 2) are then AND’ed with a single Master SS (on #3). This allows the individual SS’s to be driven low by the master SS. Code eequires a bit of jumping between I2C mode and SPI mode and both are using the serial hardware on the ATtiny.”

The display in the photo above shows the time, a compass reading and a time per frame in milliseconds. Pocketmoon says the display is running at about 13fps, with additional room for optimization.

Interested in learning more? You can check out the original forum post here and pick up a Trinket from Adafruit’s official store here for $7.95.