GEMMA and regular LEDs

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
amoeboar
 
Posts: 6
Joined: Mon Jun 16, 2014 2:42 am

GEMMA and regular LEDs

Post by amoeboar »

Hi there,

I want to use the GEMMA for a wearable project, and I have some questions about whether it's the right board for my project.

In browsing all the tutorials I noticed that they make use of the NeoPixels. I was wondering if I need to use these, or if I can use regular LEDs. Assuming the LEDs are around 20mA, can I string a few of them together with a current-limiting resistor at the front? How many LEDs could I use on each single output (if using the Lithium battery below at 3.7v)? And speaking of outputs, the GEMMA has PWM capabilities, correct?

My last question is about what to purchase. At the bare minumum, if I have all my LEDs and resistors, all I need is a GEMMA board, some conductive thread, and the Lithium Ion Polymer Battery - 3.7v 150mAh, correct? That should keep my project close to 20 dollars. The tutorials all call for the Adafruit Micro Lipo - USB LiIon/LiPoly charger, as well. Do I need that to use my board?

Thanks!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: GEMMA and regular LEDs

Post by adafruit_support_rick »

You can drive a single LED from a Gemma output pin, but you can't drive multiple LEDs in series. It's a voltage issue.
Also, you should limit the current draw per pin to 5mA.

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

Re: GEMMA and regular LEDs

Post by michaelmeissner »

You can use normal LEDs subject to the power consumption of the LEDs (i.e. one LED per pin + resistor is fine, stringing 20 LEDs off of a single pin probably needs a MOSFET to power the leds).

The Gemma has 3 data pins. Two of these pins (PB0, PB1) support PWM control . The one pin that does not support PWM (PB2 or A1) has the option of doing analog input for a sensor, but you can also use it for a LED output or digital input.

If you purchase a li-po battery, you almost certainly will need a charger of some sort (the micro charger is probably the cheapest solution). Alternatively, you could use an AA battery holder if you have rechargeable AA batteries (if you use non-rechargeable batteries, you ultimately will need to purchase more batteries down the road).

amoeboar
 
Posts: 6
Joined: Mon Jun 16, 2014 2:42 am

Re: GEMMA and regular LEDs

Post by amoeboar »

I'm surprised that I can only drive one LED per pin, 5mA per pin seems quite low and not enough for even a single LED!

Michael suggested using a MOSFET to string multiple LEDs in series, can I get a second opinion as to whether this is a viable option?

As for the voltage issue, I'm looking to drive white LEDs which have a voltage drop of 3.4V or so. Is there a battery option for the GEMMA that could support these LEDs in series?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: GEMMA and regular LEDs

Post by adafruit_support_rick »

The ATtiny datasheet specifies 5mA output current at 3.3V, although it says that it can go higher. However, the output current for all IO pins combined must not exceed 60mA.
amoeboar wrote:As for the voltage issue, I'm looking to drive white LEDs which have a voltage drop of 3.4V or so.
The output pins of the Gemma run at 3.3V. That's why you can't directly attach more than one LED in series.
amoeboar wrote:Is there a battery option for the GEMMA that could support these LEDs in series?
Regardless of the power source, the pins run at 3.3V.
amoeboar wrote:Michael suggested using a MOSFET to string multiple LEDs in series, can I get a second opinion as to whether this is a viable option?
Certainly you can do that. Depending on how much power you need, you could probably get away with a PNP transistor instead of a mosfet.

amoeboar
 
Posts: 6
Joined: Mon Jun 16, 2014 2:42 am

Re: GEMMA and regular LEDs

Post by amoeboar »

Thank you Rick, I'm a bit confused as to what I can and cannot do.

CANNOT:
Run more than one LED in series due to 3.3V output

CAN:
Depending on how much power I need, I can run multiple LEDs with the use of a PNP transistor.

Given the second option, my question is: how much power do I need?
Also, which Li battery would be best suitable for this application?

I appreciate your continued support.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: GEMMA and regular LEDs

Post by adafruit_support_rick »

You would need something with more voltage than a LiPo provides to run multiple LEDs in series. Again, your LED has a forward voltage of 3.4. To run two such LEDs in series, you would need at least 6.8V, to run 3, you would need at least 10.2V. You would use the transistor to switch this voltage to the string of LEDs.

You could wire the LEDs in parallel, and run them from a LiPo.

How many LEDs are you talking about? 2 or 3? 40 or 50? More?

amoeboar
 
Posts: 6
Joined: Mon Jun 16, 2014 2:42 am

Re: GEMMA and regular LEDs

Post by amoeboar »

I'd like to run around 20 of them on the two PWM outputs, perhaps 10 on each pin.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: GEMMA and regular LEDs

Post by adafruit_support_rick »

Try something like this. I only drew it for 3 LEDs, but it should scale to 10.
Parallel_LEDs.png
Parallel_LEDs.png (116.65 KiB) Viewed 382 times

amoeboar
 
Posts: 6
Joined: Mon Jun 16, 2014 2:42 am

Re: GEMMA and regular LEDs

Post by amoeboar »

Excellent, Rick. This will work for me. Thank you very much!

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

Return to “Wearables”