Intro: Fade Lamp
This project outlines the design and build of a simple jar lamp using the NeoPixel and ATTiny85. The purpose of this project is to demonstrate the use of multiple rapid prototyping machines here in our shop at Rev Ithaca including a CNC PCB mill (we used Bantam tools Othermill) and a CNC laser cutter (we used a Glowforge).
- Bread-board friendly NeoPixel, https://tinyurl.com/yc5gt7ht
- ATTiny85, https://tinyurl.com/y7eyp3lg
- CR2320 coin cell battery, https://tinyurl.com/yclgojnw
- Surface-mount 20mm battery clip, https://tinyurl.com/yaym8ajd
- 220Ω resistor, https://tinyurl.com/y74g7w5c
- 0.1uF capacitor, https://tinyurl.com/ycug5j4t
- Small canning jar, https://tinyurl.com/ycdgyck9
- DPDT, https://tinyurl.com/y8y6yy7r
- 2 x 1/4" M3 bolt and nut
- scrap plywood, 1/8" thick
- PCB prototyping material
- Computer with EAGLE and Arduino IDE
- Arduino Uno with USB type A to B cable
- Bantam Tools Othermill (or other method for PCB production)
- Soldering Iron
- Laser cutter
Step 1: Circuit Design
This is a pretty basic circuit, but there are a couple points worth explaining. The capacitor connected from VCC to ground is called a bypass capacitor. This helps to attenuate AC noise introduced to the DC source due to high-current components. The NeoPixel specifically has a signal structure that requires high-current pulls periodically. See the links below for further rationale for these design decisions.
Selected parts explained Neopixel Data signal structure: http://www.seeedstudio.com/document/pdf/WS2812B%2...
The resistor between the ATTiny85 and DI of the NeoPixel serves to buffer the signal and reduce error due to noise. Make sure you breadboard the circuit first to ensure everything works. See the next step to program the ATTiny85.
Step 2: ATTiny85 Programming
I pieced together a couple tutorials to set up the ATTiny85 and NeoPixel Library since I am not well-versed in Arduino IDE. See the links below:
Once this is set up you can either write your own code or use mine! The NeoPixel has particularly pleasing violet and orange hues which my program fades in between.
Step 3: PCB Design in EAGLE
To fabricate the PCB I used EAGLE to create a .brd file in conjunction with a DRC provided by the Othermill's resources. Using a custom DRC in an EAGLE file ensures the machine will accurately fabricate based on your design. See Bantam Tools resources:
Specifically, I used the 1/32" flat endmill and a single-sided FR-1 copper board. If you do not have access to a PCB mill, you can follow the circuit design per step 1 on protoboard. Follow the next steps to bring this design into reality.
Step 4: Milling, Cutting, and Testing
or use: OSH Park https://oshpark.com/ (This will require specification of multiple layers through gerber files)
Follow the circuit diagram to solder thru-hole components to your PCB
Glowforge (or other CNC laser cutter):
.svg attached, see below laser settings for different stages of the cut:
Logo: 500 speed, 30 precision, 0.190 focus height, 225 inches per inch
Shape: 120 speed, 45 precision, 0.190 focus height
The wooden rings, when glued together, serve to make the switch flush with the profile of the lid.
Use an oscilloscope to diagnose any problems that may remain after soldering, look for short circuits on the PCB
Step 5: Final Assembly
- Glue the wooden rings together using a glue of your choice
- Use M3 nuts and bolts to secure switch on the underside of the wooden insert
- Solder long leads between PCB switch holes and DPDT terminals to hold everything together (see picture)
- Screw ring to jar over wooden lid
- Enjoy your lamp!
Isaac Lawson-Hughes 2018