How to Make [Almost] Anything | Life + Times Of v.2020

Cody Paige | Ph.D. Candidate
MIT | Aeronautics and Astronautics

 

 

 

 

 

 

Projects

[09 Output Devices]

Now we've covered input decives, it's time to get to all those fun displays and motors and lights and and and.... Output devices! We had two goals this week. One was to design a board with an output device and to program it to do something with a microcontroller. The second was to measure the power consumption of an output device. I wanted to try a few new things for this week so I went with two different designs (mainly because one was very simple just to try out the vinyl cutter and batteries! You'll see.).

Vinyl cutting a light bulb

So my first project was so that 1) I could try out making a circuit on the vinyl cutter and 2) I wanted to power something using a battery. So, I designed a very simple circuit to light up a little LED, but I made it so that to close the circuit you'd have to fold the board. Its basically a bookmark that can fold into a tiny reading light. Here's the simple circuit design and the traces I used (no outline since on the vinyl cutter you can stick your circuit onto any old shape afterwards).

The simple LED circuit.

The simple LED circuit traces.

Some important design rules. The first print I did, the traces were WAY too skinny, almost fiber like. And I hadn't nailed down the speed/feed for the vinyl cutter yet so they peeled off and made a bit of a mess. I found 2 mm traces worked great. For the printer settings I used:

  • Cutting Speed: 6 cm/s
  • Force: 40 gf
  • And don't forget to make sure you aren't doubling up on your traces! You can do this by following these steps:

    1. Highlight traces, right click and hit 'Ungroup'

    Once printed, I stuck the circuit onto a clear plastic sheet and cut out the outter shape and the bendy part to close the circuit. Here's the final product!

    The bookmark flat.The bookmark as a light.

    Join the light side!

    So, while my bookmark was fun, and technically an output device, it didn't use a microcontroller. For this, I decided to do something for my newphew, who is absolutely OBSESSED with Yoda (he was baby yoda for Halloween). I wanted to make a Yoda who's light saber lights up. And, since this will be a toy, it needs a switch to turn it on and off, and it needs to work on battery (Yay, I get to use something I learned how to do with the Bookmark!). I decided to use an RGB LED for my output device and have it run be in Yoda's light saber. I wanted it to run through a bunch of colours when turned on (I needed something that wouldn't require a computer connection to do something fun).

    I used a pre-made Yoda that I got from Thingiverse (Baby Yoda). I printed this on the Prusa using no fill (so that I could wire it up afterwards) and supports everywhere (those ears just stick out too far for no supports). Once that printed, I drilled a small hole in his hand to wire up the light saber. Next, the board. Here is the schematic and board design. Note that for the LED I just used holes with outline traces since the actual LED would be wired up off of the board in Yoda's hand. Another important thing to note, I didn't use a power supply pin here. I wanted to eliminate the possibility of accidentally having the battery switched on while plugged into a power supply since this can be dangerous.

    The Yoda-light schematic.The board with all the traces.

    Next I stuffed the board and connected the external RGB LED. To connect the LED I made small copper pads at the end of connector wires and soldered the LED onto these pre-made pads. This was WAY easier than the first attempt I made which was to just try to solder the wires onto the LED pads (which are about 0.2mm wide) individually. I also used appropriately coloured wires since once I fed these through the hand it was next to impossible to tell which wire went where.

    A few important notes here for trouble-shooting a board:

  • I accidentally used 470k ohm resistors instead of 470 ohm resistors. Luckily, when you put resistors in parallel, the resistance is: 1/Rnew = 1/Rnew +1/Rnew +1/Rnew + ... So, rather than have to rip up all the huge resistors I had it there, I just soldered the new 470 ohm resistors on top of the old ones. This made my Rnew very close to 470 ohms.
  • There is an LED test mode on the multimeter! And thank goodness! Even though I had my RGB LED set up correctly based on the datasheet, it turns out it was incorrectly manufacutred and two of my wires needed to be switched. I used the multimeter to determine which wire was which (touch one side to power, the other to the LED and it completes the circuit for you and lights up the color you're touching).
  • Taking parts off of the board can be challenging! I needed to wire the RGB LED through Yoda's hand and attach it to the board. Other than the copper tape for pads on the LED side and using colour specific wires, I also found that it was best to put holes through the board and thread the wires (specifically threaded wires, not solid since threaded are more flexible) through the holes and solder them that way. Soldering directly onto the board ended up pulling off the copper.
  • The battery also is a bit complicated. I needed to make sure the bottom of the battery touched the ground pad, but that it didn't touch any of the rest of the copper that hadn't been milled out. In future, an easy solution would be to mill out the footprint of the battery except for the ground. However, to not redo the board, I just used kapton tape to insulate the copper under the battery.
  • Programming Light Sabers

    I used Arduino to program my RGB LED. Making sure to use the Arduino language pins for my Attiny412 I wrote a code that would have the RGB LED run through a series of colours. This came from an Arduino tutorial. Here is my final code:

    The light saber code.

    I used my mini programmer and serial adapter to program Yoda's light saber, then disconnected and tried it out! (This did take a number of tries while I was debugging my board -- hence all the notes above on how to fix the board!)

    Yoda with his light all lit.

    I still need to add a little light saber (I'm going to use a clear pen tube). But I am pretty pleased with how this turned out!

    Powerful forces

    For the second part of the project we needed to test the power consumption of our output device.

    P = IV

    Voltage is measured in Volts and is measured in parallel to the device. Resistance is measured in Ohms and is measured in parallel to the device. Current is measured in Amps and is measured in series to the device. For the RGB LED I measured 2.32 V across the LED and 5.21 mA. This means the LED has a power consuption of 12 mW.

    It was very interesting to note that it was actually challenging to do this because the light was programmed to turn on and off and had different colours. I used the same resistors for all colours but you could technically change the size of the resistors since different colours have different brightnesses. You could make the brightnesses all the same if you changed the resistances to match what they needed. Interestingly also, when measuring the resistance across the LED, when the light first comes on for a colour the resistance is highest, then it slowly drops, when the light turns off, there remains some resistance (470 Ohms to be precise!) because of the resistors.

    I also measured the LED for the bookmark. This had a voltage of 1.95 V. I measured the resistance in parallel and found 7.55 M \ohms. Using the equation I = V/R we know that P = V2R. So we know then that the power consumption of the single LED is 0.5 mW.

    The Source Code

  • Bookmark board (Eagle)
  • Bookmark traces
  • Yoda schematic (Eagle)
  • Yoda board layout (Eagle)
  • Yoda board traces (to be used in mods)
  • Yoda board holes (to be used in mods)
  • Yoda board outline (to be used in mods)
  • Yoda board code (Arduino)
  • Yoda board coding .hex file
  •