-
Notifications
You must be signed in to change notification settings - Fork 1
Build Mark One
- Arduino Nano (ATmega328) without the pinheaders soldered on
- A couple of WS2812 LED chips (we use 4 or 6)
- Double Side Prototype PCB 7x9cm
- Tactile button 6x6x6
- Some wire
- Pingpong ball
- Filament for your 3D printer
In this design we use some prototype PCB with the same size as the Nano. This means cutting up a PCB in to pieces with 7x15 holes. We picked a 7x9cm piece, which can be cut in to 6 functional pieces of PCB for our purpose
Surprise: We're not soldering the pinheaders on the Nano to start with. Instead, we will solder the pinheaders on to the prototype PCB. A nice way to do this is to use push the headers in to a breadboard so they will stay fixated while we solder.
Solder the button on the PCB. The right spot is 5th row from the top, in the middle between the pinheaders.
Solder a connection from the button to D2. Because D2 is right next to the button a nice way to do this is to hold some wire aligned with the two soldering spots, and do not cut it until you have soldered the connections.
Solder a connection from the button to GND. The Nano offers multiple GND pins, but an ideal one is the one right next to D2 (see above).
If you're asking: Hey, where's the pull-up resistor? You are right, we did not add one. This Nano has built-in circuits to handle this, and you can see in the sketch that we enabled the pin as INPUT_PULLUP. This should do the trick.
Note that we have chosen to solder the button connections on the top side of the PCB, and the LED connections on the bottom side. This is mostly personal preference though...
Connect wiring for 5V, GND and the LED data pin. The data pin connects to D5.
We've used individual WS2812 chips so we have soldered a chain, connecting each LED in a row. These LED chips do have a particular direction they need to be connected in, so keep an eye on the arrow at the back of the chips.
In this example the LED's are in a straight row, but you can get a little creative here. We've tried a few models, folding the strip, making a circle or even a twist. It kind of depends what you want to be able to do in terms of 'special effects'. Do make sure it is small enough to fit inside the pingpong ball...
Now it's time to hook up the Nano. Because we want to be able to reach the button without too much hassle it's important to solder it in a 'floating' fashion, i.e. don't press it down as far as possible.
You can now switch states by pressing the button or by sending commands over the serial port. The Nano also reports state changes so you could also do smart stuff on your PC if you listen to it.
Now it's time to upload the sketch. Open up your Arduino IDE, select the right device (we had clone Nano's so we also needed to pick the 'Old bootloader' setting). Flash the code.
Grab your 3D printed case and put the contraption in there. We chose to glue on a simple pingpong ball, which makes for a nice diffuser. Stick it to the back of your monitor or laptop with a piece of hook-and-loop fasteners (also known als velcro).
Feel free to modify, enhance and tinker. We'd love to see what you've done with it. Have fun!