This tutorial will show you how to make a 3D printed microcontrolled LED nametag with Electrifi 3D Printer Filament. Adding the ATtiny85 microcontroller gives you the ability to get a variety of different lighting effects, as well as turn the name tag off at the push of a button.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Make the Circuit in EAGLE (Optional)
This is not a step you actually have to do, as I provide you with an .stl file for printing, but I'll briefly touch on this step so you know how to make and modify this circuit. The figure above shows a picture of the ATtiny name tag schematic and board files that we made in EAGLE. For more info on using EAGLE, see our previous "3D Printed LED Name Tag" tutorial. The circuit consists of four sets of 15 LEDs, each connected to a different output pin from the ATtiny85. There is also a pushbutton switch between the ATtiny microcontroller RESET and GND pins to enable switching between various programs in the microcontroller. If you'd like to mess around with the design of this circuit, feel free to download the necessary files here: attiny_nametag_eaglefiles.zip.
Step 2: Convert the Circuit to an .stl File and Print.
Following the steps outlined in our "3D Printed LED Nametag" instructable, we converted the .brd file to a png image, and converted this image to an .svg file in Inkscape. Finally, we imported this .svg file into Blender for extrusion in the Z-direction. The basic circuit came out fine, but when we tried to add more virtual blocks of material to hold the pushbutton and ATtiny in place, we had some issues with all the layers showing up in Cura. So instead, we imported the .svg file into Autodesk 123D, another free 3D modeling tool. Figure 2 shows the 2D circuit image and the final 3D model of the circuit in Autodesk. After joining the circuit to the extra 1-mm-thick blocks of material we added, we exported the final 3D model as an .stl file, and loaded it into Cura to convert it into gcode using our Cura printing profile. The ATtiny nametag image, autodesk file, and .stl file are available for download here: attiny_nametag_modelfiles.zip. We printed the circuit out on foam board, but most hard substrates would work. If you haven't printed with Electrifi Filament before, check out the instructable on 3D printing circuits with Electrifi conductive 3D printing filament.
Step 3: Program Your ATtiny 85.
In order to program the ATtiny85, we started by following this very helpful instructable that will show you how to (1) setup the Arduino as the programmer, (2) wire up the Arduino to the ATtiny85 for programming, and (3) program the ATtiny85 through Codebender. We found it was not necessary to use the recommended capacitor, so give it a try anyway if you don't have a capacitor laying around.
After following the instructable, you should now know how to use the embedded codebender code below to program your ATtiny 85 with the nametag sketch.
Step 4: Assemble the ATtiny Name Tag.
Here is a list of the things you will need to make this name tag:
1. An ATtiny85 microcontroller.
2. A pushbutton switch.
3. Silver paste. (This is the best one we can find)
5. An Adheisve-backed Pin.
6. A connector or some solid-core wire to connect to a battery.
7. A lithium polymer rechargeable battery. Different batteries seem to come with different connectors, so you can either stick wire into the connector and tape it together, or cutoff the existing connector, strip the ends of the wire, solder a new connector onto the end, and cover the connection with some heat shrink tubing or electrical tape.
12. A multimeter is also handy but optional.
13. A 3D printed circuit on foam board.
The figure above shows the printed name tag circuit before and after adding the LEDs, battery connector, pushbutton, and ATtiny. Similar to the process outlined in this video, we used a solder reflow station to slightly melt the Electrifi filament, allowing us to stick down the components in a matter of minutes. After connecting a lithium ion polymer batter to the circuit, you should be able to cycle through the various effects by pushing down the switch. We added a tiny amount of silver paste down on each ATtiny pad with an needle to improve the electrical contact with the chip and get more consistent performance. Be careful not to make an electrical connection between the two pads when adding silver paste.