Introduction: LilyPad Arduino Stuffed Fox Toy
For a class on technology in libraries, I had to create a project that used the LilyPad Arduino, and I chose to create a stuffed animal that sings “Jesus Loves Me” while lights flash with the notes. I made a fox, but the pattern to which I’ll link can be used to make a raccoon as well.
Step 1: Materials
- LilyPad Arduino Simple board - https://www.sparkfun.com/products/10274
- 5 white LilyPad LEDs - https://www.sparkfun.com/products/10274
- 1 Tri-Color LilyPad LED - https://www.sparkfun.com/products/10274
- 1 LilyPad Buzzer - https://www.sparkfun.com/products/10274
- Li-Po battery - https://www.sparkfun.com/products/10274
- Conductive thread - https://www.sparkfun.com/products/10274
- LilyPad FTDI basic - https://www.sparkfun.com/products/10274
Note: All the items listed above are included in the ProtoSnap LilyPad Development Board
- Mini-USB cable (the chord for a Canon camera works)
- Sewing needle
- Sewing machine
- 1/2 yard dark brown material for body
- 1/4 yard light brown material for tummy/ears
- Red felt for heart
- Black felt for nose
- White material for snout/tail end
- 1/4 yard scrap material in whatever color available
- Dark brown thread, red thread, black thread, white thread
- Two buttons for eyes
- Velcro “sticky back” circles
- Small bag of polyester fibre fill
- Small bag of polyester quilt batting
Step 2: Coding the LilyPad
I have never coded anything before, which made this the trickiest part for me. Before I began, I used Leah Buechley’s LilyPad Tutorials to familiarize myself with how the LilyPad worked. This taught me how to use the software, what the different terms in the code mean, what different sections are necessary when you write a code, etc. I recommend that you play around with these tutorials before you start to write a code for yourself.
I really wanted to have the stuffed animal play a song, and I thought it would be fun to have lights flash along with the notes. I used the setup for a song that Leah Buechley has in her tutorial. I wrote out the notes to “Jesus Loves Me” before I used this chart to assign frequencies to the notes, and I sang the song repeatedly to decide which notes needed to be longer/where to put a delay in the code. I tweaked a lot along the way, keeping multiple drafts when I changed things, and I tested it out continually as I worked, loading every version I tried onto the LilyPad with the Mini-USB chord. When I was happy with the song, I added “digitalWrite” instructions before/after each note to have different LEDs turn on/off with each note. The code is attached.
NOTE: I wanted to have the pink LED from the Tri-Color LED stay on throughout the song, and I found that to do that I needed to specify in the code that the light be on HIGH as well as on LOW. I don’t know why it works when the code is written that way, but it does!
Step 3: Plan
It’s important to know where you’ll put the components of the LilyPad on the stuffed animal before you start, which is why it’s a good idea to draw it out first.
- Trace the body piece on paper with a pencil, and trace the ears on top, where the snout is, where the heart is, and where the LilyPad Arduino Simple Board will be attached.
- Draw where you want the white LEDs, the Tri-Colored LED, and the buzzer, and draw the positive connections as well as the negative connection. The connections cannot cross each other, and that’s really what’s important about this step. My drawing is attached.
Step 4: Start to Make the Stuffed Animal
I used this pattern for a stuffed animal, adjusting the instructions slightly in order to incorporate the LilyPad.
The material that you use is up to you, but you might want to use a lighter material if you want the LEDs to be able to shine through the material. I used a thicker material, and I had to cut out holes for the lights to be seen. Use whatever colors you like!
- Print out the pattern pieces that are provided, cut them out, pin them to the material, and cut out the legs, arms, tail, ear, body, and tummy. You should make the tummy about an inch larger than is recommended, and cut out two tummy squares rather than one.
- Cut two identical tail ends from white scrap material, and use the zigzag stitch (which should be a setting on your sewing machine) to attach them to the two pieces of the tail.
- Pin the two pieces for each arm, each leg, and the tail together with the outsides facing in, and use a sewing machine to sew them together along the edge. Turn them inside out (or outside out!), and stuff the arms, the legs, and the tail with the polyester fibre. The instructions that accompany the pattern does not have you stuff the tail, but I recommend that you do. It’s cuter with a stuffed tail!
- Cut smaller triangles from a different material, and sew those onto the front, outside pieces of the ears with a zigzag stitch. Then pin the two pieces of each ear together with the outsides facing in, and use a sewing marching to sew them together along the edge. The ears won’t be stuffed.
- Cut out a small red heart from red felt.
- Cut out a small white snout from white scrap material.
- Use the zigzag stitch to sew the heart as well as the snout onto the front body piece.
- Sew the ears by hand to the top of front body piece; you should not have turned the ears right side out yet, and you should only sew the back piece of each ear onto the body.
- Rather than sew the material for a tummy onto the animal, make a small pad with the tummy, cutting out two squares rather than one, sewing them together like you did with the arms/legs/tail/ears, and stuffing them with the quilt batting.
- Attach small Velcro circles to the tummy that corresponded with Velcro on the front body piece. (I used “sticky back” Velcro pieces, but you can use ones that you sew on to be more durable/classier.) These changes to the tummy allow you to use the tummy as a removable cover for the LilyPad Arduino Simple Board that will be sewn on to the stuffed animal.
Step 5: Sew in the LilyPad Simple Board, LEDs, and Buzzer
- Take a large piece of scrap material and cut it to be the same size as the body piece. Pin them together. You will sew the LilyPad Arduino Simple Board as well as the LEDs to the front body piece, but the conductive thread that will connect them will be sewn on the scrap material that backs the front body piece, and the buzzer that plays the song will be attached to the scrap material as well.
- Use the plan from Step 3 to sew the LilyPad parts on. This is a little tricky, and you’ll have to do it carefully. Use tape to secure the LilyPad Arduino Simple Board to the front body piece, and use a felt marker to draw on the side of the scrap material that faces away from the front body piece where the Simple Board is.
- Use the conductive thread to sew the positive pin on the buzzer onto the scrap material on the side that faces away from the body material. Sew the conductive thread along the scrap material towards where you marked the location of the Simple Board. When you reach that point, push your needle not only through the scrap material but also through the front body piece, and circle the thread multiple times through pin 11, which attaches the buzzer to pin 11.
- Next, use the conductive thread to attach the positive pin on one white LED to the tip of the snout on the front body piece. Then push your needle through the material onto the scrap material, and sew a path with conductive thread along the scrap material; be careful not to hook the front body piece material as you go. When you reach the place where the Simple Board is located, push back up onto the front body piece, and sew the conductive thread to pin A2.
- Repeat what you did for the white LED on the tip of the nose with four lights in the ears, two in each. Use conductive thread to sew the positive pin on the LED to the ear (and remember that your ear is inside out at the moment, which means you should sew with the light facing into the material). Don’t sew the conductive thread into the ear. Instead, leave the thread slack, and start to stitch the conductive thread into the scrap material that backs the front body piece, going down to connect to the Simple Board. Later, use brown thread to anchor the conductive thread to the ear.
- Cut a small hole in the front body piece where the felt heart has been sewn on; don’t cut through the felt heart. Place the Tri-Color LED with the light at the hole, and use the conductive thread to fasten the LED on the positive pin to the front body piece. The light as well as the fastening should be hidden under the felt heart. Push the needle into the scrap material once you have properly attached the Tri-Color LED, and sew your way down to the Simple Board.
- Once you have the positive connections for each light as well as for the buzzer, you’ll sew one long conductive thread from pin A5 (which the code specifics is the ground pin) to each negative pin on each LED (and on the buzzer). Be careful not to let your negative thread touch the positive threads at any point. Like you did with the positive threads, sew the connections on the scrap material, pushing up into the front body piece when you reach the Simple Board/each LED/the buzzer. Follow the plan carefully at this point.
- Sew the button eyes on the front body piece above the snout.
- Sew a small black felt triangle on the tip of the nose to cover the white LED that is there; you may want to poke a hole in the felt to allow the light to shine through.
- Turn the ears right side out. If the lights from the white LEDs in the ears are not able to shine through, poke small holes to allow that.
- Test it out! Turn on the LilyPad Simple Board, and see whether it works. If not, go back over everything to be certain that your conductive thread never crosses. Only proceed to the next step when once are certain that everything is working the way that you want.
Step 6: Finish the Stuffed Animal
- When you are satisfied that everything works correctly, sew the arms, the legs, and the tails onto the edge of the front body piece by hand. Fold them in, and pin the outside of the back body piece to the outside of the front body piece as carefully as possible. Use the sewing machine to sew around the left side, the bottom, and the right side, catching the arms, the legs, and the tail in. While I did this, I noticed that the cap had been knocked off the buzzer, and it would not play the song without the cap on. I taped the cap back on, testing the LIlyPad to be certain that the buzzer still worked. Be careful while you work that you continually check to be certain that the different LilyPad components are in order.
- Turn the body right side out, and stuff it. Sew the top side closed by hand, and your fox is ready for fun! :)
Participated in the