Jan 8, 2014

Making Gemma even Smaller!

Adafruit's Gemma, a very nice platform a little over an inch in diameter, is ideal for small and wearable projects. The device is inexpensive and based on the ATTINY85 microcontroller. Adafruit has, once again, done an excellent job of designing a cool tool for the electronics hobbyist.

Small as this is, I found myself wanting to shrink the electronics footprint of a wearable circuit even more. I didn't have a need for some of the Gemma extras such as USB connector or JST for LiPo battery. So, I decided to experiment a little to get a wearable circuit to the bare essentials.

I already had in my toolkit the Adafruit USBtinyISP programmer, and the Evil Mad Scientist '2313 Target Board with ZIF socket. This board has a simple jumper modification to allow it to be used with ATTINY45/85. 


This tutorial is written using Ubuntu 12.04LTS as the OS. For Windows or Mac, you will have to make some changes.

Process:
  • First, you must have an arduino environment modified for ATTINY. Here's a straightforward explanation, using an ISP (In-System Programmer).
  • Choose ATTINY85 8Mhz internal as your board.
  • "Burn Bootloader" using the USBtinyISP attached to the target board
  • You may need to burn fuses as per Ray's forum post
avrdude -c usbitny -p attiny85 -b 19200 -U lfuse:w:0xF1:m -U hfuse:w:0xD5:m -U efuse:w:0xFE:m

Now, you're ready to upload the strandtest sketch. In the Arduino IDE, go to File/Preferences and make sure that "Show Verbose Output during Compilation" is checked.


Load your sketch. In my case, it was from the Adafruit NeoPixel libary, strandtest. Compile/Verify the sketch. At the bottom of the Arduino IDE, you will see the verbose output. The target compilation directory for all the files, including the hex file, will be shown in this window. Mine went to /tmp/build786510750882563862.tmp.


Go to a command line and change to the compilation target directory. Do a search for your hex file. From the command line issue a command similar to this one, using your hex file:

avrdude -c usbtiny -p t85 -F -U flash:w:strandtest.cpp.hex

Now, transfer your ATTINY85 to your circuit. In my NeoPixel soft circuit, Adafruit recommends using a 470 Ohm resistor on the digital output connected to the first NeoPixel in a strand.

Here's the simple circuit detail:


 First run with strandtest sketch:





No comments:

Post a Comment