This project comes from a short, introductory level rapid prototyping workshop that I am teaching. Further details about the course can be found on the workshop page.
The project for students in the course is to design and construct a small accent lamp, with focus on 3D design (using Tinkercad) and 3D printing, accompanied by very introductory experiences in soldering and Arduinos. A shade/diffuser for the lamp can be hand cut or done on a stencil cutter, such as a Cricut machine. The lamp runs off of a USB cable and has a push button that cycles through different lighting effects (which are customizable with Arduino programming).
Skills and Tools
This project was designed for a course taken by complete beginners in all skill areas. To build this project (or something similar) without taking the course will require introductory 3D design skills (I suggest the Tinkercad tutorials), access to a 3D printer, introduction to and access to soldering, and the ability to hook up an Arduino for programming. A complete tutorial on the example 3D design is provided, below.
The lamp consists of a few inexpensive parts. Although I provide cost estimates for the lowest priced version, suppliers such as Adafruit and Sparkfun can provide these parts faster and with better support, albeit at higher cost:
- A 3D printed base, designed and printed by the student.
- An Arduino Nano or clone. These are available as low as $2 on Ebay.
- A 16 element LED ring with WS2812 (aka NeoPixel) elements. As low as $3.50 on Ebay.
- A power switch. The project is designed for a SPST momentary “mini” pushbutton switch with a thread diameter of about 6.9mm / 0.27 inch. About $0.40 from a variety of sources
- A 10k ohm 1/4 watt resistor. Pennies.
- About 12″ (300mm) of small diameter hook up wire. Scavenge something.
- Diffusion/shade material. I prefer scraps from a sheet of Rosco #116 white diffusion gel, available from photography suppliers. However a wide variety of materials can be used since this project does not generate significant heat. You can even design and 3D print something using thin shells of translucent filament. Natural PLA works well for this purpose.
- A micro B USB cable and a USB power source. The cable will be used to download the program to the Arduino but it will also be used to power the lamp once it’s finished.
The primary purpose of this page is to provide access to a video tutorial of the creation of the lamp base. Students in the rapid prototyping course are taken through the creation of the example base and then encouraged to develop something of their own. The 30 minute video tutorial is available on Youtube.
The 3D design files are available for download as a zip archive. The archive contains the project parts (which the video starts with and uses), a finished example of the lamp base, and a vector (svg) file that can be used to make a shade. They are also available on Tinkercad and Thingiverse.
A brief version of the electrical and mechanical assembly follows.
The wiring is quite simple. The Arduino provides power via the 3.3v power pin (3V3) and ground (through the 10k resistor) for the switch (GND). The switch also attaches to pin D2 on the Arduino to detect when it has been pressed. If you are not familiar with wiring a switch of this type to an Arduino please consult the guide on the Arduino website.
The LED ring receives power from the Arduino via the 5v out power pin (+5V), data from the Arduino via pin D6 and returns ground to the Arduino (GND). The data out pin on the LED ring is not used.
The assembled guts are inserted into the lamp base with the Arduino seated in its tray (some double stick tape might be helpful but shouldn’t be necessary). The switch is inserted from the inside of the base out and its washer and nut are secured. The LED ring sits on top of the supports in the base.
A shade can be cut and rests between the outside of the LED rind and the inside of the base wall. The example shade included in the zip archive provides the correct arc for the bottom of the shade.
The programming for the Arduino uses the Button Cycler example program in the NeoPixel Library from Adafruit. The library is available from Github. The pin assignments and pixel count in the Button Cycler example program are exactly right for this project so you can just download that program to the Arduino and you are all set to go. For more information on how to customize the display options consult Adafruit’s comprehensive NeoPixel guide, and the library examples in particular.