Friday, September 25, 2015

Milwaukee Maker Faire: paperSynth Workshop.

I wasn't able to attend Maker Faire Milwaukee last year because I was (literally) exhausted after TEDx UWMilwaukee and the talk I gave there.  I really regret missing it - so this year I wanted to do something special as part of the event.

I decided on hosting a workshop, and that I'd feature the ATTINY85 chip.  I've used it in a few projects - it is inexpensive and quite versatile, with 3 analog pins and two pwn pins.  It can also run without much additional hardware - and on a 3v coin cell battery!

I decided, rather than traditional breadboarding, I'd take inspiration from Jie Qi and use copper foil tape on paper.  Below full build instructions for the project - I am hosting it here both for people who attended the workshop, but also for anyone else interested in making a paperSynth circuit.

If you attended this workshop, and are interested in my other projects, please visit

Step One: Aquire Materials



BILL OF MATERIALS:

For building the paperSynth:
1.) Force Resist Sensor: $6.00 from Digikey, here.
2.) Piezo Speaker: $0.60 from Digikey, here.
3.) ATTINY85 Chip: $1.50 from Digikey, here.
4.) 8-pin IC Socket: $0.17 from Digikey, here.
5.) Potentiometer: $6.40 from Amazon, here.
5.) 3mm LED: $0.23 from Digikey, here.
6.) 200 Ohm Resistor: $0.021 from Digikey, here.
7.) 1k Ohm Resistor: $0.10 from Digikey, here.
8.) Coin Cell Battery: $8.45 from Amazon, here.
9.) 1/8 Inch Copper Foil Tape: From Amazon, here.
9.) 1 Binder clip
10.) Craft Board or Card Stock
11.) paperSynth Schematic/Template: See below
12:) Spray Mount: $9.41 from Amazon here.
13.) Super Glue: $5.56 from Amazon, here.

Required Tools:
1.) soldering iron and solder
2.) scissors or x-acto knife

And if you havent programmed an ATTINY85 before, you might need these:
1.) Arduino Uno Board: $21.00 from Amazon, here.
2.) Breadboard: $4.66 from Amazon, here.
2.) Jumper Cables: $7.50 from Amazon, here.
3.) 10UF Electrolytic Capacitor, $1.05 from Digikey here.

Required Files/Software:
1.) Arduino 1.0.1 (Newer versions don't support the ATTINY core we'll be using):
link here.

2.) paperSynth files (ATTINY board profile, and the paperSynth code):
link here.

3.) paperSynth Template:























For the IC socket, I am using the "Squashed bug" technique.  You'll want to bend the pins on the socket to roughly match the template.

Step Two: Assemble Template:



Using spray mount, mount the template to craft board or card stock.  Be sure you spray in a well-ventilated area!







Trim with scissors or x-acto knife.





Use a narrow blunt object to score the fold lines - this will make it much easier to fold precisely later on.  I used the head of a small nail - alternatively you could use a folded paperclip or a ballpoint pen tip.



Step Three: Create Copper Traces



Next, place copper foil traces along the light grey paths on the template.



After applying the tape, use a credit card or the back of your thumb nail to smooth the tape down: 


Be sure to overlap the corners of each trace - this will make soldering easier.


This is the most time consuming part of the project - it took me around 30 minutes to trace each path with tape - though I took my time so it would look pretty :)




Step Four: Solder Traces 




Next, join the overlapping traces on the corners with solder.




Step Five: Populate!


Before any glueing or soldering, lay the components out on the circuit and make sure you understand where each goes.  They are each labeled on the template (available above).


I like to first mount my components to the board with super glue.  Krazy Glue with the brush applicator is my all-time favorite. This makes soldering easier, but also helps hold the components to the board so we're not just relying on solder alone when we use it.



Once your components are tacked down, solder them!





Step Six: Programming the ATTINY

I learned to program an ATTINY using an Arduino Uno as an in-system programmer from a tutorial by High Low Tech.

I discovered the ATTINY85 core that includes the tone library here.

I am going to include my own instructions here, however.


To use an Arduino UNO as an ISP, create the above circuit on a bread board.  


***When it comes time to program the chip, you'll need to put a capacitor between reset and ground to keep the UNO from resetting after upload.  For now, leave that component out.




Unarchive the paperSynth_v1_files.zip.  Then, launch Arduino 1.0.1



Open the Arduino ISP example.



You'll need to make a slight change to the code... find the heartbeat() function and change delay(40); to delay(20);


Before uploading the ArduinoISP code, be sure to select Arduino Uno as your board.

Now that we have transformed our Arduino Uno into an ISP, it is time to load our code and board profile for the ATTINY85 chip...


First, set the paperSynth_v1_files folder as the Sketchbook location in Arduino.  Then restart arduino.


Next, select the PaperSynth_simple sketch from the Sketchbook menu.




And select "Arduino as ISP" from the Programmer menu.



Now we can set our board to ATtiny85. (It should show up as an option after we set the sketchbook directory ealier).  Be sure to select "ATtiny85 @ 8MHz (internal oscillator).


***At this point, add the capacitor between the RESET and GND pins.




Before we upload the paperSynth code to the ATTINY85, we need to burn the bootloader for the 8MHz setup.  You only need to do this step once (per chip).



Now it is time to program the tiny!  Select "Upload Using Programmer" from the File menu.



You may see this error during the bootloader burn or uploading the sketch.  It is okay, you can ignore it!  If it says "Done uploading" you should be good to go!



Congratulations!  You have Programmed your ATTINY85.





Insert the ATTINY85 chip into the socket.  Be sure to orient the chip so that the little "notch" faces upward.


Finally, place a 3v coin cell battery negative-lead-down on the template, and fold the corner down over it.



Place your binder clip over the corner to ensure contact between the copper foil leads and the battery terminals.



You've done it.  Enjoy your paperSynth Circuit!

Step Seven: Jam Session




Step Eight: Custom Code

Now that you've built the circuit, you may be interested in creating your own code.  I, myself, would like to create a version that limits tones to a pentatonic or chromatic scale so that I can actually play alongside other instruments.  When I create this (hopefully in the near future), I'll upload it here.

This ATTINY85 diagram might help when writing code for this circuit:



Thanks for reading, and hopefully you are now in the middle of an intense paperSynth jam session!

-Bryan

Wednesday, September 16, 2015

Paper Construction for Prototyping.

Paper construction has become an integral part of my prototyping process.  In fact, I begin almost any 3D modeling and fabrication project by first creating a paper mock-up.

Here is a brief tutorial, for beginners, to show the actual construction process.

**This tutorial assumes that you have already created a paper template.  There are many useful tools for creating flat templates, including Pepakura Designer, 123D Make, Rhino's flatten commands, and other CAD platforms that include sheet metal feature such as Autodesk Inventor or Solidworks.  Personally, I use Solidworks to create flat patterns because of its very intuitive sheet metal operations - and because that's generally where I do all of my 3D modeling.

Here, I have created a template for a simple box.  An over-sized matchbox, if you will.

I start by printing the template to scale, and mounting the paper to .3" cardboard. To mount, I use LOCTITE light-duty spray adhesive - this is tacky enough, but still re-positionable if I mess up alignment.

Shake the spray adhesive for a good 15 seconds before using.  Apply in a spraybooth or a well-ventilated area.  Often I do my spraying-of-things outdoors, if it isn't too cold or windy.  Here I'm using the spray booth at my University.

Here is a quick video demonstrating how I apply the adhesive.

Just a few light passes that overlap the entire sheet.

After applying the adhesive, I begin sticking it to the cardboard by first lining up two of the corners.  

A quick video demonstrating the rest of the application process:

Slowly roll the paper down onto the cardboard, smoothing it out with your hand to avoid air pockets or wrinkles.

Next, it is time to cut and fold.  You'll need a straight-edge (preferably metal), a cutting mat, an x-acto knife (sharp!), and optionally a scissors if you'd like to cut some of the simple parts of the pattern that way.

Additionally, you will need a tool to score the fold lines.  DO NOT use the xacto knife - you dont want to cut through the paper, only to slightly weaken it so it will bend where you want it to.  You want something firm and slightly blunt.  I have used a bent paperclip before - but recently I've been using a ballpoint pen.

Oh, and also you will need glue or tape if you want the thing to stay together.

I start with the outside edges.  Hold the straight edge along the line you'd like to cut.  Hold the x-acto knife firmly, just below the knurled part of the shaft.  Make sure the as you slide the blade, it is butting up against the straight edge, perpendicular to the work table.  The blade should literally slide along the straight edge, letting it guide the cut.


For inside corners, start your cut at the intersection and move outward.

For outside corners, it is best to overlap your cuts to avoid annoying little clinging corner bits.

Here I have finished cutting both patterns.  It is now time to score your fold lines.

Like I said, I often use a ballpoint pen.  They are easy to come by, and they provide a blunt surface, and the ball inside of the tip allows the tool to glide quite effortlessly, even when applying a lot of pressure.  I dont usually mind the fact that they leave lines of ink (obviously, they do) because after all, it is just a prototype.

Use the scoring tool just as you would the x-acto blade.  Apply lots of pressure as you score!

The point here is to disturb the consistency of the paper right at the folding points, so when it comes time to fold the paper does exactly what I want it to.

Here I have scored the pattern.

Next its time to fold.  If you score it properly, this part is a breeze.


Before gluing, I like to try to just hold the pattern together and make sure I understand how everything should line up.

For glue, I'm going to use one of my favorites: Krazy Glue.  It dries krazy fast, and hold very firmly. This bottle comes with a built-in applicator brush, which is quite handy for projects like this.

If you are worried about getting glue on your skin, toss on some rubber gloves!


Apply glue to tabs.

Hold glued areas firmly until dry.

And presto!  A paper thingy.



I now have a place to store my over-size paper prototype matches.  :)