Powering LilyPad LED Projects a learn.sparkfun.com tutorial

Available online at: http://sfe.io/t435

Contents

Introduction

One of the most commonly asked questions when getting started with e-textiles is "How many LEDs can I put in my project?" In this guide, we will cover conductive thread's resistance and how that affects powering LEDs, calculations to predict battery and power requirements, and some construction tips.

alt text

Suggested Reading

If any of the following topics sound unfamiliar to you, we recommend checking out the corresponding tutorial before continuing.

If this is your first time working with e-textiles, we recommend starting with this tutorial:

LilyPad Basics: E-Sewing

December 17, 2016

Learn how to use conductive thread with LilyPad components.

Conductive Thread Resistance

One of the most important things to consider when building a wearable project is the resistance of conductive thread. Unlike copper wire, which has very little resistance, conductive thread's resistance will vary depending on the metal used to make the thread and the thickness of the thread. Most conductive threads list resistance in Ohms/Ft. The lower this number is, the better, because less resistance means more electricity can get through to the components used in your project.

alt text

The basic electrical property Ohm’s Law states that running an electrical current through a material high in resistance causes the voltage to drop. The higher the current, the greater the voltage drop. This means that even though a LiPo battery powering your LilyPad may put out 3.7 volts, by the time it gets through the thread to your components, it may drop to 3.0 volts or less.

Many electrical components, such as LEDs, need a certain voltage to function properly. For example, in a project with LilyPad LEDs if the voltage drops below 3 volts, a blue LED will stop working, followed by the green and finally the red. To get full-color output from RGB LEDs like the LilyPad RGB LED Board, you should always try to run at 3 volts or above.

Forward voltages of LilyPad LEDs

LilyPad LEDForward Voltage
Blue3.2 Volts
Green3.2 Volts
Pink2.5 Volts
Purple (retired)2.8 Volts
Red2.0 Volts
White3.3 Volts
Yellow2.0 Volts

Forward voltages of LilyPad RGB LEDs:

LilyPad LEDRed LED Forward VoltageGreen LED Forward VoltageBlue LED Forward Voltage
LilyPad Tri-Color LED2.0 Volts3.5 Volts3.5 Volts
LilyPad Pixel Board2.2 Volts3.4 Volts3.4 Volts

To minimize voltage drop, we'll need to decrease the resistance of the power connections. There are a few ways to do this:

TIP:
Use a non conductive thread to stitch bundled thread (either placed together or braided) to your base fabric. Leave enough open spaces in the stitching so you are able to stitch conductive thread to the larger thread bundle when connecting components. This video from e-textile expert Lynne Bruning shows this technique at around the 4:10 mark:

Conductive Thread Alternatives:

For large projects that require thread to travel long distances, projects with a lot of power-hungry pieces such as a large amount of LilyPad Pixel Boards, or in spots where thread may break under stress, here are some alternatives that work well for wearables:

Conductive Ribbon

Conductive Ribbon - 3-Conductor (1 yard)

DEV-10172
Retired

Specialty nylon ribbon with flexible stranded wire woven into it is a great alternative to conductive thread with low resistance. You will need to solder to the tinsel within the ribbon in order to use in a project.

Conductive Fabric Traces

Conductive Fabric - 12"x13" Ripstop

DEV-10056
4 Retired

Conductive Fabric - 12"x13" MedTex130

DEV-10070
Retired

You can create your own low resistance traces using thin strips of conductive fabric. We recommend using iron-on adhesive to attach to fabric or ribbon, then using conductive thread to hand stitch components to the traces.

alt text

Don't forget to insulate the fabric traces as you would conductive thread.

Stranded Wire

Ribbon Cable - 6 wire (15ft)

Ribbon Cable - 6 wire (15ft)

CAB-10646
$3.50
3

Another alternative is to switch from conductive thread to traditional wire. Wire has a much lower resistance than thread, allowing you to use more LEDs than a conductive thread circuit. You’ll have to switch from sewing to soldering, but it’s easy to solder wires to the same sew tabs to which you would normally connect thread.

Wire is prone to breaking if it is flexed repeatedly. For wearable projects that require maximum flexibility, use stranded wire (not solid), and look for special silicone-jacketed wire that is extremely flexible. For projects that will be washed, water may wick into exposed stranded wire, becoming trapped and potentially corroding it over time. Apply a small dab of silicone sealant to the cut ends of the wire to prevent this from happening.

If you have never soldered before or worked with wire, we recommend visiting the following tutorials.

How to Solder: Through-Hole Soldering

This tutorial covers everything you need to know about through-hole soldering.

Working with Wire

How to strip, crimp, and work with wire.

How Long Will My Project Run on Battery Power?

To figure out how long your project will run on battery power, you need to know two things: how much current your project uses and the capacity of your battery.

You can measure exactly how much current your project uses by measuring it with a multimeter, but we can also make a pretty accurate guess by looking at the LED datasheets and doing some math.

A typical LilyPad LED uses 20mA of current at full brightness. Multiply that by the number of LEDs you’re using, add 10mA for the LilyPad that’s running everything, and you’ll have an estimate of your average current draw.

Example:
A project with 10 LilyPad LEDs controlled by a LilyPad Arduino

20mA * 10 + 10mA = 210mA

A single LilyPad Pixel Board will use 40mA when it’s set to white (all three internal LEDs fully on). For a worst-case estimate, you could multiply that by the number of pixels in your project.

However, you’ll probably be displaying different colors on your LilyPad Pixel Boards and turning them off entirely at times. The resistance in the threads will also drop the voltage, meaning the LilyPixels will run slightly dimmer and use less current. Usually, it’s safe to halve the above estimate, which gives us 20mA.

For more detailed information on working with LilyPad Pixel Boards, take a look at our LilyPad Pixel Board Hookup Guide.

Battery Capacity

Now, let’s look at the battery. Battery capacity is given in milliamp-hours (mAh). This number tells you how many milli-amps (mA) a full battery can provide for one hour before it’s empty. The e-Textiles Battery that comes with most LilyPad Arduino kits has a 110mAh capacity. For many projects, especially ones with a large number of LEDs, you will probably want to use a higher capacity battery for a longer run time.

To find out how long a battery will last, use this formula:
Hours = Battery mAh / Project mA

Let's use the calculation above to see how long a 110mAh battery will power the project we used in the last example:

0.52 hrs = 110mAh / 210mA

Thus, an e-Textile battery will only power the project for approximately half an hour. Here's an instance where a larger capacity battery would make sense, if the project needs to operate for a long time, such as during an event or showcase. The trade-off is that a higher capacity battery is also physically larger -- make sure to plan accordingly for proper battery storage/attachment on your project to reduce strain on the wires and fabric.

Here are some typical runtimes for various SparkFun batteries and numbers of LilyPad LEDs/LilyPixels:

Number of LEDs1251020
Battery NameBattery mAhHours of Operation
Polymer Lithium Ion Battery - 40mAh 401.30.80.40.20.1
E-Textiles Battery - 110mAh (2C Discharge) 1103.72.21.00.50.3
Coin Cell Battery - 20mm (CR2032) * 2508.35.02.31.2.61
Polymer Lithium Ion Battery - 400mAh 40013.38.03.61.91.0
Polymer Lithium Ion Battery - 850mAh85028.317.07.74.02.1
Polymer Lithium Ion Battery - 1000mAh100033.320.09.14.82.4
Polymer Lithium Ion Battery - 2000mAh200066.740.018.29.54.9
Polymer Lithium Ion Battery - 6Ah6000200.0120.054.528.614.6

* Note: the Coin Cell Battery is non-rechargeable.

Resources and Going Further

Ready to start stitching some circuits? Check out these projects from the LilyPad Sewable Electronics Kit:

Light-Up Plush

Craft a light-up plush with LilyPad LEDs controlled by pressing a button and sliding a switch in the creature's hands.

Night-Light Pennant with LilyMini ProtoSnap

Use the pre-programmed LilyMini ProtoSnap to make an interactive pennant that reacts to ambient light levels.

Glowing Pin

Create a quick and easy piece of e-textile art using a LilyPad LED, battery holder, conductive thread, and coin cell battery.

Illuminated Mask

Use LilyPad LEDs, a switched battery holder, and coin cell battery to make a fun light up mask for your next costume party.

learn.sparkfun.com | CC BY-SA 3.0 | SparkFun Electronics | Niwot, Colorado