Introduction: Muslin Clock - LED NeoPixel
The design and creation of this instructable was created for the purpose of an Open Design and Digital Fabrication paper at Massey University, NZ. Based in the Fab Lab WGTN, the aim of the paper was to utilise open design methodologies and digital fabrication tools to produce an open design project. The design was inspired by this instructable and was adapted in both code and form. This instructable will give you the necessary tools and information to create your own LED NeoPixel Clock.
If you're wanting to see more of my overall process while creating this instructable you can check out my blog. I've posted all of the research sources that I used to help me understand the project and technology.
Step 1: Things You'll Need
Electronic Circuit and Production
- Arduino Software 1.8.8
- Arduino Nano 3.0 (Pro Version)
*1x Nano 3.0 Atmel ATmega328 Mini USB Board (Arduino Compatible) - DS130
- CR 2032 3V RTC Battery (I bought the brand Eclipse)
- Male to male wires
- Micro USB Charging Cable (Samsung)
- 1x 60 LED Neopixel Strip
- One sheet of 4mm Plywood (1200mm by 600mm)
- 4x 10mm Chicago Screws
- Fabric, Muslin (1000mm by 1000mm folded into x4 layers)
Machines and Apps
- Laser Cutter
- Soldering Iron and Solder
- Hot glue gun
- Masking Tape
- Industrial hole punch (if applicable)
Code, Drivers and Libraries
- NeoPixel Strip Clock Code
- RTC Update Code
- Illustrator, Laser cut document
- Driver - Download this driver if you're using a Mac. This will ensure the Arduino Nano 'Clone' is compatible with your device. If you're using windows you will need to find a different driver.
- Adafruit DMA Neopixel Library
Step 2: Arduino Nano, RTC and LED NeoPixel Strip
This clock tells the time through the LED NeoPixel Strip, presenting seconds, minutes and hours. Before you can use the Arduino software to code your neopixels, you will need to set up and give power to your 3 main components, the Arduino Nano, RTC and LED NeoPixel Strip. To do so, you need use a breadboard to insert all of your wires or you can solder them into place by following the diagram. I changed my power supply to the Arduino itself so that it could be turned on through a USB Cable, for this I made sure the red wire went to 5, black to ground and blue in PIN8.
Once all of your wires are in place you can plug the micro USB charging cable into your computer and into the Arduino Nano. Throughout this electronic circuit we are supplying power to the Arduino Nano through the charging cable. From here, you can insert your code and upload it to the neo pixel strip (see next step).
*Once you've uploaded the code onto the Arduino Nano you can then swap from plugging this from your laptop/computer into a wall adaptor for the clock to be hung up.
Step 3: Setting Up Code
There are a few steps you will need to take before you can run the code through the Arduino Software. You will first need to install the driver and libraries (these can be found in the first step). Once you've done this you can open the Arduino software and then the zipped file of my code, "NeoPixel Strip Clock Code". You will then need to change the Board to Arduino Nano and change the port and processor. I have my Port set on the option that pops up after plugging in the usb, /dev/cu.usbserial-1420 but you can also use this port /dev/cu.wchusbserial1410 or /dev/tty.wchusbserial14210. My processor is connected to ATmega328P (Old Bootloader).
The next step is to ensure your (#define) PIN is set to the correct number corresponding to how you've set up on the Arduino Nano - In my case, PIN 8.
To change the colours of your LEDS you can update the code with different hexadecimal values. You can do this by changing this part of the code:
By changing the 6 digits before 0x you can create a variety of cool colours to display your seconds, minutes and hours in. *If you're unsure what the corresponding code for a colour is, you can have a look in the sources step where I've linked a colour generator. You can also change the brightness of your LEDs by changing this segment of code:
strip.show(); // Initialize all pixels to 'off'
By adjusting the number on the last line, you can change the brightness of your LEDs from 0-255. I find adjusting the strip brightness completely changes the colour of my LEDs, give it a try!
Once you've had a play around and you've verified and compiled your code, you need to open the RTC Update code in your Arduino software. You then need to verify and upload this code to the Arduino Nano. This will update the RTC to link with the time set on your laptop/computer. After doing this, you can re-upload your NeoPixel Strip Clock Code to the Arduino, creating an accurately time LED clock.
Step 4: Building the Clock Frame
For this Instructable, I created a laser print document on illustrator which includes all 5 components/parts that you will need to print to produce the clock form. The five components are the outside ring, back support, inside support, outside support and cable enclosure. All components managed to fit in one illustrator file which is 1219.2 x 609.6mm (as this is the size of the laser bed I was using). You may need to print parts separately if your laser cutter has a smaller bed or your piece of ply isn't big enough. Each part is created in a 255RGB Red and 0.1 line to ensure the setting are correct for the laser cutter.
Once you've printed out all of your parts, you can now slot everything together. Start with the ring, you can now line the outside support within the ring (as you can see in the imagery), connecting all 4 tabs. After clicking In all 4 tabs you'll want to test your inside support. Insert the inside support so its resting up against the outside support. You'll need to make sure all of the screw holes line up.
Now that the inside and outside supports are in place and sit comfortably, you can begin to work with the fabric component of the clock. After sourcing your piece of muslin fabric you can fold it in half and in half again so that it has 4 layers. It will need to be thick enough to conceal the Arduino Nano and wires. After doing so you will need to:
- Place the ring and outside support (clicked in) down so the ring is on lying flat on the ground
- Drape the fabric across the frame and push it down into the inside of the ring
- Insert your inside support inside the outside support and fabric
- Mark where the screw holes meet x4
- Cut or hole punch out a small hole of fabric where the screw holes meet x4
- Place your Chicago screws through the inside support - fabric and outside support. Screwing and securing everything in place
- Make sure you stretch the fabric out to create a seamless open face (depends what look you're wanting to create).
- Stick LED strip along the inside support as close to the fabric as possible
- Tape Arduino Nano, RTC and wires to the back support
- Plug In USB Cable to Arduino and string through the hole in the back support (to connect to a wall plug)
- Trim and Fold the fabric into the centre of the clock
- Attach the back support to its four tabs and ensure the USB cable is running down the back piece in the part provided
- Plug into a wall plug
*You will need to use tape throughout this process, this will help you secure everything one step at a time.
*I also used hot glue where necessary to secure the supports to the ring where is bulging out of place from the pressure of the stretched fabric and wood
*If you had issues cutting through the plywood, see trouble shooting
*Note that the last two image of the design are printed in cardboard but hopefully It makes the idea of the form clearer.
Step 5: Trouble Shooting
Due to plywood often being warped in its structure, there's a couple of handy tips you can use if your laser cutter isn't cutting all the way through the design. I weighed down my plywood with long steel rulers, taping them to the ply, and the ply to the machine. I also poured and rubbed in small amounts of water over the ply as it was printing, this prevented the design from a harsh laser burn. This step is especially useful if you have to re-print your illustrator file after it's already been printed (to cut through entirely).
I couldn't figure out how to have all three LEDs lot for the hour to cross over from 12-1. This would be a great element to implement into the code
The dimensions of the laser cut document aren't perfect, for a more seamless end product these will need to be adjusted.
Step 6: Sources and Acknowledgments
Driver - Download this driver if you're using a Mac so that the Arduino Nano 'clone' is compatible with your device.
- Adafruit DMA Neopixel Library
Original Instructable - What I based my design off - specifically the code for the Microcontroller and RTC.
Colour Picker - Chose your hexadecimal colours from here
Living Hinge - Where I found the pattern that I used to create my inside and outside supports. I changed the form of these to long rectangles and added in my tabs and screw holes.
Fab Lab WGTN - Throughout this project I worked in the Wellington Fab Lab to create my design. I worked with the staff (Wendy, Harry) through any adjustments I was unsure in making.
Open Design and Digital Fabrication, Massey University
NOTE: Due to adapting the Living Hinge swatch in my own design, I abide by their CC license for my own design.
I hope you managed to find eveyrthing throughout my instructable so that you can make your own LED NeoPixel Clock. Let me know if you need any further information