Capacitive Touch Lamp Made With Protopasta Conductive PLA

by Protopasta in Workshop > Lighting

4408 Views, 80 Favorites, 0 Comments

Capacitive Touch Lamp Made With Protopasta Conductive PLA

IMG_20210812_143301.jpg
IMG_20210803_162533.jpg
IMG_20210803_153807.jpg

Have you ever needed to quickly get out of bed and fumbled around to turn on your bedside lamp? If so, you need a touch lamp! Simply reach over and touch it! The magic gnome does a little dance and turns it on, simple as that... Okay, it's a little more complex, but don't fear! We're here to help! This guide contains everything you need to know about making your own 3d printed touch lamp at home. Let's do this thing!

Supplies

(Printing) Lamp Components

Whole Lamp on Bed.png
Whole Lamp on Bed Settings.png

We took some time to design an adjustable, modular lamp that can be moved to suit your needs. We specifically liked the idea of having different bases available as well, so you can either use an empty proto pasta spool, print out the hexagonal base we designed for it, or design your own.

For the best results and strong threads, we recommend 4+ perimeters for the arms and 0.2mm layer height for all threads. Lower resolutions will not work. For the simplest lamp, only the touchpad needs to be printed in conductive filament, but if you print the base mount and middle few layers of the arms as well you'll be able to touch anywhere on the lamp to turn it on.

The files for printing can be found here

You'll need:

  • 4x Arms
  • 5x Arm nuts
  • 4x Wire clips
  • 4x Circuit spacer
  • 1x Base nut
  • 1x Top bolt
  • 1x Base mount
  • 1x Touchpad
  • 1x Lampshade of your choice (more about this in the next step)

(Printing) Custom Lamp Shade

Vase Mode Printed.jpg
Prusa Vase Sliced.png
Prusa Vase Mode.png

This is a fun one! We thought it'd be great to enable the use of all the amazing vases already on the web. This can simply be done by finding a vase you think would be a good lampshade, scaling it so the small opening is between 35-59mm (making it closer to 59mm allows you to slip it on without having to remove the bulb from the lamp) and printing it using vase mode with 0 top and 0 bottom layers

Printing with vase mode will vary between slicers but using Prusa Slicer, Navigate to Print Settings -> Vertical Shells and click the "Spiral Vase" checkbox. When the dialogue box pops up, click "Yes". Next, navigate to Horizontal Shells -> Solid Layers to change top and bottom to 0, slice your part, and you're done! It's best to use some Magigoo or other adhesive as there will be little bed adhesion.

(Electronics) Gathering Electronics and Tools

IMG_20210803_153807 (1).jpg
IMG_20210810_130932 (2).jpg

This will be the toughest section of this guide. Knowing how to solder is preferred, but if you don't know how to, we'll briefly guide you through it. To connect the circuit to the lamp, we used a strip of copper braid that was laying around. If you don't have any on hand, we recommend using some solder wick instead as it will work well and adds one more tool to your arsenal for other electronics projects.

If you do not have the materials needed to solder you can either order/buy all the tools needed (this can get expensive real quick), or go the cheaper and preferred way of visiting your local maker space. Maker spaces are all around the globe, search for one in your area and see if you can use their equipment and if you're able to visit them they'll probably help you through the soldering process, and who knows you might make some friends along the way!

WARNING: We listed a leaded solder, but "lead can give rise to serious chronic health effects. Exposure will primarily be through accidental ingestion from your skin, wear gloves if directly handling solder. Limited fumes may be generated by soldering" (Department of Engineering Health & Safety). Unleaded solder is also available. If you use leaded solder proceed with caution.

Electronics (links are with the first step):

  • 2.54mm male & female pin headers
  • 150ohm & 1Mohm 1/4 watt resistors
  • Copper braid or solder wick
  • Mini solderable breadboard
  • Logic level MOSFET (30N06L)
  • Micro USB breakout board
  • Female USB A breakout board
  • USB powered LED lightbulb
  • Assorted wire (22awg)

Tools:

  • Soldering Iron
  • Solder (60% Tin/40% lead)
  • Flux
  • Tweezers
  • Desk fan/fume extractor
  • Tip cleaner (brass shavings)
  • Safety glasses
  • Gloves

(Electronics) How to Solder!

IMG_20210810_150017.jpg
IMG_20210810_161020.jpg
IMG_20210810_161025.jpg
IMG_20210810_161038.jpg
IMG_20210810_161044.jpg

While we will briefly be showing how to solder in this step a more detailed guide can be found here.

WARNING, solder at your own risk...

Soldering! This is definitely my favorite part. There's a lot to do, but with some patience and fine workmanship, you should have it done in no time! Start with a practice joint using a wire and a hole in the corner of the board.

Solder Guide:

  1. Preheat - Set your soldering iron to 380C/716F
  2. Tinning - Clean the tip with brass shavings/damp sponge and add a small amount of solder directly to the tip. This is called tinning and will need to be done repeatedly as the tip and solder oxidize.
  3. Mounting - Mount your component or wire by putting it through the hole or adjusting it so it sits in place without needing to hold it. This is important.
  4. Heat the joint - Heat the joint by touching the pad and component at the same time with the iron for a few seconds.
  5. Add solder - Add solder to the joint but do not add it directly to the iron. The joint needs to be warm enough for the solder to flow and prevent a cold solder joint. Just add enough solder to fill the joint slightly, but don't add so much that there is a blob.
  6. Remove iron - Remove the iron and allow the joint to cool.
  7. Admire your work!

Congrats you just soldered a component! If you had troubles with the solder flowing into the joint, then it may be best to tin the tip again, use a tiny bit of flux paste at the joint, or increase the iron temperature.

(Electronics) Circuit Assembly Steps

Wiring Diagram.jpg
IMG_20210803_160504.jpg
IMG_20210803_155501.jpg
IMG_20210803_155628.jpg
IMG_20210803_162506.jpg
IMG_20210803_163716.jpg

Remember when we said this was the toughest section? This is what we're talking about. Make sure you thoroughly understand the wiring diagram, and then carefully follow the steps below.

Assembly Steps:

  1. Male pin headers - Begin with soldering the pins to the breakout boards and the Arduino Nano.
  2. Resistors - Solder in the resistors as they'll be difficult to reach as we progress. These aren't directional so you don't have to worry about orientation, just ensure you use the right holes.
  3. Topside components - Once the resistors are soldered, everything on top can be soldered (this includes the female pin headers and the MOSFET). It's best practice to have the pins in the pin headers when soldering so the heat can't mess up the alignment. Note: The MOSFET is directional and the middle pin must be bent around the board rather than through it.
  4. Underside wires - Solder the yellow one first (this is the sensor wire ~3.75" in length) then solder the black, red power, and ground wires.
  5. Print connection - Solder ~0.5" of the copper braid to the end of the sensor wire.
  6. Insert boards - Insert the boards into the female pin headers.
  7. Admire your work!

(Programming) Uploading the Arduino Sketch

Arduino Open.png
Arduino Board.png

It's okay, don't worry this isn't 'real' programming? Rather we will just be uploading a sketch. A sketch is simply Arduino's name for a program comprised of code. The code we will use for our program (or sketch) was adapted from Arnov Sharma's code posted here. This is also a great article to learn more about capacitive touch.

Uploading the sketch:

  1. Download sketch - Download the sketch attached to the bottom of this step titled "Touch_Lamp_Code"
  2. Download Arduino IDE - Download the Arduino IDE if don't already have it. This will be our bridge to reach the microcontroller.
  3. Open the sketch - Open the Arduino IDE, click 'file' in the top left then 'open...', navigate to the sketch, click it, and then click 'open' in the bottom right.
  4. Change board - Navigate to 'tools' near the top, then hover over 'Board:' and select 'Arduino Nano'.
  5. Plugin board - Plugin your Arduino Nano using the appropriate cable.
  6. Upload - Click the arrow pointing right near the top of the screen. This is the upload button.
  7. Celebrate!

If you encounter issues when uploading make sure the IDE is using the correct USB port in Tools -> Port.

This lamp works off the principle of capacitive touch. All materials have some sort of capacitance, or an ability to hold and release a charge. This Arduino library and code measures the time for the material to charge and discharge. Since humans are mostly water, we have a pretty high capacitance that can be measured even with a cheap microcontroller. When the circuit is touched, the capacitance spikes and the charge/discharge times increase. This time is registered by the code and turns on the light. One may ask, "How can you complete a circuit with just one point of contact?", the answer is quite simple, you complete the circuit with the earth. This is why the lamp MUST be plugged into a wall socket to function!

(Final Assembly) Gather Materials

IMG_20210810_172131.jpg

This will probably be the shortest section of this guide as it is fairly straightforward. You'll need everything we've made up to this point including the lampshade and led light. (Again

Materials:

  • 4x Arms
  • 5x Arm nuts
  • 4x Wire clips
  • 1x Base nut
  • 1x Top bolt
  • 1x Base mount
  • 1x Touchpad
  • 1x Base (3D printed part or empty Protopasta spool)
  • 1x Lampshade of your choice
  • 2x Circuit Spacers
  • 1x Arduino touch sensor circuit
  • 1x USB light
  • 1x 4mm long M3 screw
  • 1x 8mm long M3 screw

Tools:

  • Hex driver for the M3 screw

(Final Assembly) Lamp Assembly

IMG_20210812_143321.jpg
IMG_20210810_173412.jpg
IMG_20210810_174235.jpg
IMG_20210810_174958.jpg
IMG_20210810_175153.jpg
IMG_20210810_175606.jpg
IMG_20210810_175738.jpg
IMG_20210810_175809.jpg
IMG_20210810_175827.jpg
IMG_20210812_132653.jpg
IMG_20210812_132957.jpg
IMG_20210812_133256.jpg
  • This is the last step. You're so close! This step will differ from many of the previous ones as you may put together the lamp any way you'd like. This is just how we happened to do it.

Assembly:

  1. Base mount - Insert the base mount into the spool, place the touchpad through the rectangular hole in the mount, and tighten it down using the base nut with the cardboard sandwiched between them.
  2. Wire hole - Enlarge the semicircle in the spool so its 3/4" tall to pass through the large USB plug and give room to move things around.
  3. Circuit securing - Screw down the circuit without the breakout boards or microcontroller. Make sure to use the spacers so you don't bend the board (it's best to orientate the USB A header pins toward the enlarged hole).
  4. Sensor wire - Secure the sensor wire so it's in constant contact with the touchpad nub using an M3 bolt.
  5. If your lampshade won't fit over the bulb after completion, this would be the best time to put it on the cable.
  6. Wiring - Pass the USB A cable through the newly enlarged hole and out the center, plug it into its breakout board, slide it back and plug the breakout into our circuit. Repeat this step with the micro USB cord and breakout. Insert the micro controller, but be mindful of the orientation as seen in the photo.
  7. Arm assembly - Begin to assemble the lamp arm, slide an arm into the base mount and use a nut to secure it. It shouldn't take much force. Add another arm to the end of the previous one, but add a wire clip before the nut. Continue with however many arms you'd like. Finish off using the top bolt rather than another arm.
  8. Finishing touches - Start at the top of the arm with the LED light and clip it as you go down. Wrap the excess wire around the spool and flip the switch to the on position. Put your lampshade on now if it fits over the bulb.
  9. Finished - Plug it into the wall, touch the touchpad, and enjoy your new touch lamp! Any bright ideas for your next project?

If you made it this far, take a picture and tag us on social media @Proto_pasta