What is the difference between the Flora, Gemma & Trinket?

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
LucidSage
 
Posts: 15
Joined: Thu Dec 05, 2013 1:12 pm

What is the difference between the Flora, Gemma & Trinket?

Post by LucidSage »

Other than size/shape, what are the differences between those? and how would I know which one should I get for my project?

Thanks

User avatar
michaelmeissner
 
Posts: 1821
Joined: Wed Aug 29, 2012 12:40 am

Re: What is the difference between the Flora, Gemma & Trinke

Post by michaelmeissner »

From the top of my head:
  • Flora is $25, Trinket/Gemma are $8;
  • Flora is based on the ATmega32u4, Trinket/Gemma are based on the ATtiny85;
  • Flora has 30K of flash memory usable by the user (not counting the bootloader), Trinket/Gemma have 5.25K (flash memory is the memory to hold your program);
  • Flora has 2.5K of SRAM, Trinket/Gemma have 0.5K (512) bytes (SRAM is the memory to hold user variables -- note you can't target screens like the 128x64 TFT screens on Trinket/Gemma due to the screen needing more SRAM, similarly you can only do 100 or so neopixels for the same reason);
  • Flora has no EEPROM memory, Trinket/Gemma have 0.5K (512) bytes (EEPROM is memory that is preserved when the power goes out);
  • Flora has 8 digital input/output pins plus the builtin LED port which is not an external pin, Trinket has 5 digital input/output pins (2 overlap with USB and care needs to be taken when installing new firmware when using those pins), Gemma has 3 digital input/output pins;
  • Flora has 4 analog input pins, Trinket has 3 analog input pins, Gemma has 1 analog input pin -- note all analog input pins are overlapped on digital pins;
  • Flora has 4 PWM pins, Trinket has 3 PWM pins, Gemma has 2 PWM pins (PWM is pulse width modulation where the chip turns the pin on/off rapidly to simulate putting out a lower voltage under program control);
  • Flora has serial support, both writing to the USB which you can read via the IDE, and hooking up a serial device, while Trinket/Gemma do not have serial device support. You might be able to use software serial on Trinket/Gemma. Since Trinket does have its USB pins available, you could write limited code to send information to the host via USB, Gemma does not have this as an option;
  • Flora and Gemma have the plug to directly run off of 3.7 Lipo battery, with the Trinket you need to use an adapter to use Lipo batteries;
  • Flora has full servo support while Trinket/Gemma need to use software servo support due to not having a 16-bit timer in the ATtiny85;
  • Flora uses the normal Wire.h support for i2c devices, while Trinket/Gemma need to use TinyWireM.h/TinyWireS.h which has various limitations (also I believe you need 4.7K pull-up resistors for Trinket/Gemma i2c, but the resistors are optional in Flora due to the internal pull-ups that are available, but they still are a good idea);
  • More 3rd party code will run on the Flora compared to the Trinket/Gemma due to issues with the ATtiny85 limitations (serial mode, servo mode like I mentioned);
  • Flora runs on 5v, Gemma runs on 3.3v, and you can order Trinkets that are 3.3v or 5v (obviously what other devices you have have to live with the voltage the chip runs at).

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: What is the difference between the Flora, Gemma & Trinke

Post by Franklin97355 »

and how would I know which one should I get for my project?
You should get the one that does the things you need done to complete your project within its constraints. Without knowing what you want to accomplish an answer is useless. Michael gave you a rundown of the devices now you need to choose.

LucidSage
 
Posts: 15
Joined: Thu Dec 05, 2013 1:12 pm

Re: What is the difference between the Flora, Gemma & Trinke

Post by LucidSage »

Well I did reply to Michael and wrote what I was trying to do in detail but this seems like the second time I have written an extensive reply and submitted it only to come back later and see that it has never showed up for some reason. This is a bit frustrating now twice in a row. Not sure if you will even get this message. I am about to give up on this forums which is such a shame, with the wealth of knowledge and cool people that are here.

User avatar
michaelmeissner
 
Posts: 1821
Joined: Wed Aug 29, 2012 12:40 am

Re: What is the difference between the Flora, Gemma & Trinke

Post by michaelmeissner »

I've used some forums like dpreview.com that silently disallow really long postings. Perhaps try breaking it up to smaller paragraphs, and posting multiple message.

Note there are words you can't use, such as c*h*e*a*p, and it can be missed that it is complaining about the word. I also find myself hitting 'Save' instead of 'Submit' quite a bit.

LucidSage
 
Posts: 15
Joined: Thu Dec 05, 2013 1:12 pm

Re: What is the difference between the Flora, Gemma & Trinke

Post by LucidSage »

Thanks for the detail Michael.

My post wasn't really long, neither was the one on the other thread that disappeared, but oh well, the tech is not perfect I guess.
My drafts are also empty so I don't think I hit save.

Anyway, here is the quick rundown:

I want to take this (http://www.adafruit.com/products/1247) and connect it through a microcontroller (Flora or any other that works) to the VS1053 (http://www.adafruit.com/products/1381).

I want that when a certain motion is detected for the VS1053 to play a very short audio clip. I want to send the sound to 2 little headphones (see image below) which look like they are using a JST 2-pin cable

(that's the two little pieces at top of image)
Image

Is this doable? am I missing some component here?

Thanks

User avatar
michaelmeissner
 
Posts: 1821
Joined: Wed Aug 29, 2012 12:40 am

Re: What is the difference between the Flora, Gemma & Trinke

Post by michaelmeissner »

Unfortunately, I don't think any of the 3 boards can handle the VS1053. The reason is the VS1053 uses SPI. I didn't see any support for SPI on any of these three products. Assuming you don't want something big like an Uno, you would have to go up to a processor like a Teensy 2.0, Atmega32u4 Breakout Board, Arduino Micro, Teensy 3.0, or if you can deal with raw processors, Arduino 328 chip with bootloader and a few extra components.

The accelerator (LSM303) looks like it can be used with any of the processors, as it uses i2c (but you may need voltage converters, I didn't look at it in detail). It is designed to be used with the Flora, and its pins line of up with the Flora.

LucidSage
 
Posts: 15
Joined: Thu Dec 05, 2013 1:12 pm

Re: What is the difference between the Flora, Gemma & Trinke

Post by LucidSage »

Cool. Thanks again for the info.

User avatar
michaelmeissner
 
Posts: 1821
Joined: Wed Aug 29, 2012 12:40 am

Re: What is the difference between the Flora, Gemma & Trinke

Post by michaelmeissner »

Now, if the objective is just to play a single sound like a musical greeting card that plays something when you open it up, you would want something like an ISD1820 or ISD1700, such as: http://www.ebay.com/itm/ISD1820-voice-m ... 4acc3a61a4. These devices will allow you to record a few seconds of sound, and then be able to play it back. I imagine the quality is not going to be that great.

One other possibility for processor is the Adafruit Menta, which is an Arduino Uno compatible processor that comes in kit form, and fits in an Altoids mint tin, but you would also need a FTDI programmer to program the chip.

LucidSage
 
Posts: 15
Joined: Thu Dec 05, 2013 1:12 pm

Re: What is the difference between the Flora, Gemma & Trinke

Post by LucidSage »

The second one might be too big. this all needs to fit into a headband.

Also I want to send the audio into headphones, so the audio playing components need either a headphone out like the VS1053 has or those (bone conduction) little headphones in that picture.

User avatar
michaelmeissner
 
Posts: 1821
Joined: Wed Aug 29, 2012 12:40 am

Re: What is the difference between the Flora, Gemma & Trinke

Post by michaelmeissner »

I was curious, and looked at the VS1053, and it looks like even though the Flora might not support SPI, the code in the library has support to do a software emulation of SPI on certain platforms, including the Flora, Teensy 2.0, Teensy 3.0, and I believe the Adafruit mini. The library will not compile on the Trinket and Gemma, since it uses Serial for debugging, and those don't have Serial support.

If the Flora was available it might be a good answer, as it mates with the Accelerator. If you need to get to work on it soon, the other chips I mentioned might work. I tend to use the Teensy 3.0 myself (I have a Trinket and Gemma I bought on a whim, and I'm planning on doing something with a raw ATtiny85), so I would go with that (but as an experience software engineer, I can fix library issues if there is an incompatibility with the Teensy 3.0 which uses a different processor underneath).

Note, the VS1053 is fairly big, and I imagine a headband might just barely cover it.

LucidSage
 
Posts: 15
Joined: Thu Dec 05, 2013 1:12 pm

Re: What is the difference between the Flora, Gemma & Trinke

Post by LucidSage »

What is a good place to learn how to code for these controllers? I have programing experience for the web (html/css, some php etc') but unfamiliar with these items.

I would need to program the controller to detect a specific movement or type/level of movement from the accelerator and it would need to tell the audio device to play the sound. I am not sure I know how to go about it.

User avatar
michaelmeissner
 
Posts: 1821
Joined: Wed Aug 29, 2012 12:40 am

Re: What is the difference between the Flora, Gemma & Trinke

Post by michaelmeissner »

In terms of a forum, the Arduino forum (http://forum.arduino.cc/) is perhaps the main stepping place many people go to first (even if the device is not branded Arduino, most of these processors use the Arduino programming interface and most things transfer over, but of course not everything does). This forum (adafruit) is fairly helpful, but it is split between the people doing complex things, and the people just starting out. If you get either the Teensy 2.0/2.0++/3.0 processors, the PJRC forum is also very helpful: http://forum.pjrc.com/forum.php

There are a lot of books recently on programming Arduino and compatible processors. When I first got started, I got the Getting Started with Arduino from my local Radio Shack, but after getting past the setup, I haven't gone back to it, as I've been more learning by doing. http://www.amazon.com/Getting-Started-A ... ke+arduino. Other books that might be interesting are listed as follows:

I noticed this book on making Arduino wearables that might suit what you are trying to do: http://www.amazon.com/Arduino-Wearables ... ds=arduino

This book was just published by one of the more helpful posters over at the Arduino forum (Crossroads), and while you are presumably not a teenager, it probably goes into good detail: http://www.amazon.com/gp/product/128542 ... d_i=507846

Simon Monk has made a cottage industry of doing various how-to books for microprocessors: http://www.amazon.com/s/ref=nb_sb_noss_ ... %20arduino

LucidSage
 
Posts: 15
Joined: Thu Dec 05, 2013 1:12 pm

Re: What is the difference between the Flora, Gemma & Trinke

Post by LucidSage »

Thank you so much. you have been incredibly helpful.

1chicagodave
 
Posts: 564
Joined: Wed Jun 19, 2013 3:35 am

Re: What is the difference between the Flora, Gemma & Trinke

Post by 1chicagodave »

Michael's listed a ton of great resources!

I just wanted to throw in my 2¢ -

On top of everything he mentioned, going through example code (MUCH available at learn.adafruit.com & GitHub.com) is helpful...and a great way to get 'starter code'. :o

To help with understanding some of that, and to pick up where most most of Arduino.cc leaves off, I've found cplusplus.com to be quite valuable. (Arduino is essentially/mostly C++.)

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”