Introduction: ATtiny Nametag
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.
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.
ATtiny85_nametag_sketch copy
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.
10. Tweezers.
11. 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.
10 Comments
6 years ago
Hey, nice instructable! But it seems that the code is broken :(
Could you post it again please?
Thanks!
7 years ago
Very educational, it looks awesome the way you structured the program, very uderstandable, the way you separated the programs, those functions, the use of an array and the millis() like function totally awesome!!
Reply 7 years ago
Thanks, but these guys deserve most of the credit for the code, I just made some modifications: https://github.com/ogrodnek/am-nametag/blob/master/nametag.c
7 years ago
Awesome name tag! This would be prefect for Maker Faire.
Reply 7 years ago
Definitely, we will be at the World Maker Faire in NYC in October, come check us out.
Reply 7 years ago
Oh, that's awesome! I'll be there on Saturday. Do you know where you are located?
Reply 7 years ago
Not exactly, probably somewhere in the 3D printing section. I just made an account on twitter (https://twitter.com/multi3d) so if you want to follow we can tweet out our exact location once we get there. Usually you don't know where you'll be until you get there.
Reply 7 years ago
Will do! When I stop by your booth with my nametag, you'll know it's me!
7 years ago
This is a really nice project :) but to avoid the cables rounding around the circuit you can drill the power inputs and you can put the cables below then solder it. It would looke better
Reply 7 years ago
Thanks! I agree we should have the wires go through the foam board, to do that we could have just poked some holes through with tweezers, didn't think of it at the time.