Introduction: LilyPad Arduino E-Reader Case
For a youth and technology class, we were assigned the creation of an Arduino LilyPad project. I liked the idea of connecting the LilyPad project to literacy, so I chose to make a Kindle case that would play music [Hedwig’s Theme from the Harry Potter movies] and display white LED lights—illuminating the word read—when the case flap was opened.
Step 1: Finding Your Materials.
• Sewing Machine [while it may be theoretically possible to create this Kindle case without a sewing machine, it would be difficult]
• Two ¼ yard pieces of upholstery fabric [or thick cotton quilting fabric]—these are for the outside of the case and the lining, so pick two patterns that complement each other. 1/4 yard is MORE than enough, but it's always nice to have extra.
• One ¼ yard piece of batting
• Eight inches of sewable velcro
• Sewing needle
• Thread [I used pink and white]
• One sheet of felt [a complementary color to your fabric]
• Glue gun [could also use fabric glue]
• ProtoSnap Arduino LilyPad Developent board - https://www.sparkfun.com/products/11262
[this project uses the light sensor, four white LEDs, Piezo buzzer, battery, and the simple board]
• Mini-USB cable
• FTDI driver (http://arduino.cc/en/main/software) and Arduino IDE (http://arduino.cc/en/main/software) should be installed on your computer
• Conductive thread
Step 2: Thinking About Your Design.
Measure the e-reader you would like this case to fit.
Your electronic parts are going to be on the outside of the case, with a fabric envelope flap on top. As you will basically be sewing this case inside-out, you will add the electronic components before you sew the bulk of the case together. Therefore, these steps call for coding your project before any actual sewing steps take place!
Step 3: Coding Your Project.
Do NOT take your LilyPad apart before you have successfully coded your project. Not only is it easier to work with the LilyPad pieces when they are fused together on the board, but knowing that your coding is correct and working BEFORE you take the pieces apart to sew on your case is crucial. If you encounter any future problems, you’ll know that the problem is not with the coding!
This is what I wanted my project to do: When the top case flap was opened, the newly exposed light sensor would sense light and turn on four white LEDs and play a short snippet from Hedwig’s Theme on the buzzer. The envelope flap would remain closed over the electronic pieces while this was happening. The music would play once with the lights and then go off. The sensor would have to go dark again and then sense light to start the music/lights again.
My project code is contained in the first file below. I tried to explain my steps throughout the coding text. I took most of my code from the Arduino examples [Blink, ToneMelody, and AnalogInput], modifying to fit my project. I coded the first 14 notes from Hedwig’s Theme using the guide in ToneMelody and the song’s sheet music. I got it as close as I could get to the real sound—some imagination might be necessary! The second file contains the ‘Pitches’ information, necessary to play the melody.
What is the third code? I somehow damaged my sensor after completing the project. I therefore had to change the coding so the case would play music and light up [just once] when I turned it on. The third file below represents this code. Unless your sensor somehow gets damaged [and I’ll include a warning about this at the appropriate spot in my sewing instructions], you will not need the third block of code!
Step 4: Testing Your Program.
With your board connected to your computer via your mini USB cord and the FTDI board, you can test your program. This will also charge your battery. Once everything in your program works as you had anticipated, you can remove the FTDI board.
Step 5: Sewing the First Part of Your Case.
I apologize for not having a pattern! I learned how to make these cases from a master sewer who does not use patterns.
1. Use your measurements from Step 2 to prepare your main fabric. You are going to add 1 inch to each side of the width to make sure the fit is generous and to provide enough extra fabric for sewing the seams. I made this case for an e-reader that is 5 inches wide, so my fabric had a width of seven inches. For the height, you are going to double your measurement [as the case will be essentially folded in on itself] and then you need to add four inches to provide room for seams and for creating the top flap. My e-Kindle is 7 inches high, so the length of my fabric piece I cut was 18 inches. It will seem like too much—it won’t be! Cut out both pieces of fabric and the batting to this same measurement [in my case, 7 inches by 18 inches].
2. At the top of the outside fabric [for my project, it was the striped fabric] attach two strips of the fuzzy velcro pieces [the velcro that gets connected to]. At the top of the inside fabric [in my example, fabric with circles], attach two strips—same size and same location—of the spiky velcro pieces [the velcro that connects to the other]. Make sure that your velcro pieces will line up perfectly. [This is the sewing mistake I made with my project. My velcro pieces did not line up and my guess is that the velcro scratched my light sensor. As long as your velcro lines up, this will NOT happen to you!]
3. Lay the fabric together to mimic how your case will look. Take your outside fabric with the velcro facing you and fold it backwards up behind the front flap. Add your batting directly underneath the outside fabric—the entire way. Take your inside fabric and fold it on the inside of the outside fabric and batting[see picture], so the batting is sandwiched between the two pieces of fabric. Both pieces of fabric and the batting will be folded so that the pieces on the bottom are longer—this makes your top flap!
4. Now, we need to cut out material for the envelope flap that will cover the electronic components of your project. For my project, I chose the striped fabric, but I think using the inside fabric would look great, too! Your envelope flap is a doubled piece of fabric [no batting necessary] that will start just below the outside fabric velcro and reach almost all the way across [see picture]. Use a measurement that is the width of your e-reader, double it, and add one inch. For the height, you can take your e-reader height and just add one inch. So, the width for my envelope flap was 11 inches and the height was 8 inches. Fold your piece of fabric, width-wise, with the right sides together and sew up two sides, then turn the flap right side out. The left side can be open and not sewed together at this point, as you are going to sew it directly into the main case seam.
5. On the bottom of the envelope flap, I wanted to put felt letters spelling out read. The purpose for this was threefold. One, it gave some decoration to the front. Two, it tied the whole project into literacy for me. Three, and perhaps most importantly, the letters covered up the holes I cut in my envelope flap to allow the LED lights to shine through. The LED lights are bright enough to be visible through the felt. To cut out my letters, I simply printed r e a d in an appropriately sized font [I used Century Gothic] and then used those cut letters to trace and cut the felt letters. Set your letters aside for now.
6. Take a look at your case. Laying it out the way outlined in the steps above allows you to see how the case will be put together. We’re going to switch to sewing on the circuits in the next step. When we start sewing the case together [Step 7], the sewing will almost seem backward as we sew inside-out. It’s good to pause and visualize the finished case at this step.
Step 6: Attaching Your LilyPad Components and Circuits.
We attach the LilyPad circuits at this step so that the back of your stitching is hidden inside the case. It is also a lot easier to sew on the circuits just going through a single piece of fabric!
1. Plan your circuits. Above is the circuit drawing that I created for my project. Separate lines [i.e. the thread] cannot touch! If this happens, the project will not work. In the diagram it appears that two lines are crossing—when sewed, fabric was insulating the threads from each other.
2. Carefully break apart the components on your LilyPad board. You can use tweezers or a small sharp knife to 'score' it first. I was very nervous about this part, but it worked fine. [Only remove the main board, four LED lights, the buzzer, and the light sensor.]
3. Attach the main board in the upper, middle part of your outside fabric piece [below the velcro]. I used just regular white thread to attach the board from pins A3 to 9.
[For all sewing of components: all stitches should be up and through the fabric to anchor the thread and also allow room for crossing thread, when necessary. (See picture.) Also, when connecting the pins, loop the thread through the hole at least three times, pulling it snug each time. Always use the gray, connective thread.]
4. I would suggest starting with the LEDs on the bottom as they are the easiest! To mark where the LEDs will go, lay out your felt letters on the envelope flap, and make a mark on the outside cover for a light approximately where each letter will be. Starting with the far left light, stitch with a long thread through each positive hole [place all the positives on the top]. Moving to the right, connect all four positive pins on the LEDs with this same thread. After all four are connected, stitch and connect/loop the thread to the 6 pin.
5. Then, starting with the far right LED, connect all of the negative holes with another long thread, working your way over to the far left LED and then up the far left side to connect this thread to the negative pin of the buzzer. This will be the first time you’re using the buzzer—you will anchor it with these loops from the LEDs through its negative pin. The buzzer goes to the left of the main board with the negative pin placed at about the 11 O’Clock position. Then, sew the positive pin on the buzzer to the 5 pin on the main board. To finish the buzzer, sew the negative pin of the buzzer to the negative pin on the main board—be careful with this thread. In the next step, you are going to have to sew across it, so make sure that you have enough room between stitches.
6. On to the sensor! This is the trickiest one. I placed the sensor between my velcro pieces with the S pin at the 11 O’Clock position. I then connected the positive pin to the positive pin on the main board—my stitches for this line went to the left of the sensor straight down and crossing the present thread [from the negative on the buzzer to the negative on the board] by going under this thread. In this way, fabric was sandwiched between the two lines. After going underneath that thread, I connected it to the positive pin on the buzzer. Using this same method for crossing lines, I then connected the negative pin on the sensor to the negative pin on the main board. Finally, I connected the S pin on the sensor to the A5 pin on the main board [again using the over/under for crossing threads when necessary].
7. Before moving on, test your program again, with the FTDI board and mini USB. This will also charge your battery. Once everything in your program works as you had anticipated, you can remove the FTDI board. Turn the switch on the board to ON. Test again.
8. With white thread, I tacked down the cord for the battery to keep it from flopping around.
Step 7: Putting the Whole Case Together!
Place the right sides of the lining together [this means it is inside out]. Then, place on top of that the piece with the electrical components matched to the envelope flap, again with the right sides together. It may seem backwards, but you will sew it on the inside, so the seams will not show. Then, sew up three sides--the left and right side and very top of the top flap. [On the top flap, cut the excess fabric at the corners to make the flap lay flatter.] There will still be a space at the bottom. Now, put your hand in through that open space and carefully pull it right side out. Your case should almost look like your final case at this point.
All that's left is to sew up that open space through which you pulled your fabric. This is right above your velcro pieces and sensor. Sew this together, closing up the hole / open seam.
The sewing part of this is simpler than it sounds and relatively quick [compared to the other steps]--it's the piecing together in the right way that is tricky. I apologize for not having pictures--I was concentrating hard on getting this part right and forgot to stop and take a picture! For more information on this concept, please visit the following blogs to familiarize yourself with this sewing technique.
Steps 20 through 25 in this Laptop/Kindle/iPad Sleeve Tutorial from The Cottage Home.
Steps 5 and 6 in this iPhone Case instruction sheet from PennyDog Patchwork.
Step 8: Adding R E a D to the Envelope Flap.
Paying attention to where the LED lights are located on the outside cover, cut holes in the envelope flap to expose the LEDs so that the lights will shine through when the envelope flap is closed.
Position your r e a d letters over the holes and attach with just a few drops from your hot glue gun. Don’t glue the entire letter—you do not want any glue where the light needs to shine through.
Your case is finished!
[You may have noticed in the pictures that I placed a velcro piece connecting the envelope flap to the main case. I decided this was unnecessary and if I made the case again, I would leave this off. This is why I didn't include it in this instructable.]
Participated in the