SparkFun will be closed Friday 7/3/2020 for the 4th of July holiday. All orders placed after 2 pm MT on Thursday 7/2/2020 will be shipped out on Monday 7/6/2020. SparkFun Support will also resume on Monday 7/6/2020. Have a safe holiday!
The LilyPad LilyTwinkle and LilyTiny boards are a great stepping stone between simple circuits and Arduino circuits. Both boards will allow you to practice building microcontroller circuits without requiring that you provide your own code. Additionally, these are significantly less expensive than a LilyPad Arduino board, so if the effect you're looking for is relatively simple, the Tiny boards can make your project simpler and cheaper.
Here's all the parts you'll need to follow along:
The Tiny boards, much like traditional Arduino boards, take power from a power supply and then regulate what other connected devices it goes to. The Tiny boards are designed to be combined with LEDs.
*Before we start, I want to discuss, just briefly, the difference between the micro LEDs and the regular ones. The size of the micro LEDs is smaller because there is no resistor. This is important because that resistor prevents too much current from damaging the LED. In the case of this circuit, the LED can work without the resistor because I'm using a coin cell battery, which won't supply enough current to damage the LED. If I were using a Lithium Polymer battery for this circuit, it would be critical that I use a regular LilyPad LED, or place a resistor in-line with the micro LED.
I'll be using a painted and screen-printed canvas for my project, but this circuit will work just as well elsewhere- it's a very easy way to add some sparkle to a shirt!
First, plot out where you want things to go. You'll want the positive and negative pins on the controller to point at the positive and negative terminals on the battery. The LEDs should be placed so that you can easily connect each numbered pin on the board to an LED. It's also important to leave room to connect the other end of the LEDs to each other and to the negative pin of either the circuit board or the battery pack. Once you're happy with the layout of your parts, start with the battery holder. Sew the positive terminals down and to each other. I'm using larger stitches on the back of my project and very small stitches on the front, which helps make the sewing less visible from the front. Be aware, however, that if the stitches are too big, they'll be loose and more likely to connect traces that should not connect.
Next, we're going to connect the positive battery terminals to the switch. The switch will determine whether the Tiny board gets power, allowing you to turn the circuit off without taking the battery out. The switch isn't polarized, so go ahead and sew down either end, then tie a knot in your thread and cut it off.
Next, start with a new thread, and sew the other side of the switch to the positive pin on the microcontroller.
It's important to me to put the body of the LEDs on the back of my project. However, canvas and paint together are too much for the light to shine through, so I'm going to cut a small hole in the canvas where each of my lights will go.
Move on to your first light. I'm going to press mine against the back of the canvas, face down, so that the LED is visible on the front of the canvas. The positive side, marked on the back, should be pointed towards the microcontroller. Sew from one numbered pin of the controller to the positive side, then knot and cut the thread.
Repeat this process for the other three pins and LEDs.
Use one big trace to connect all 4 of the negative sides of the LEDs to each other, and also to the negative pin on the Tiny board. The shape of this trace will depend on your LED placement. It's often a sort of loop.
Finally, sew the negative terminals down, to each other, and to the negative pin of the LilyTwinkle
That should be it!
When you turn the switch on, the lights should fade on and off in a random twinkling pattern!
If it doesn't do what it's supposed to, check that your battery is in correctly- the side with the writing should be up. If that's correct, go back and make sure that you've connected everything the directions call for, and nothing that they don't. In particular, make sure that positive and negative on the battery pack are connected to positive and negative on the LilyTwinkle board. Also confirm that there is no point in the circuit where a positive trace and a negative trace are in contact, either where you've sewn the traces, or where a loose thread has fallen. If you have any more questions or comments, please drop them in the comments below.
Want to try your hand at other LilyPad tutorials? Have a look at these...