When I first designed this project I did not expect to publish it open sourced. I thought that it was a great idea and had commercial potential as a item I could sell at a craft show. It is perhaps due to some inherent lack of experience or maybe lack of ambition on my part that it never came to pass. But, I still think it makes a great project and a cool idea to make either for oneself or that special geeky person in your life.
My first version was rather bulky and harder to build since it required a printed circuit board. This version is a re-design that is smaller and can be made using point to point solder connections.
I hope you enjoy reading about this project and perhaps you would like to make one yourself. I had a lot of fun building the hardware and software.
What is it, you ask?
Its a small pin-on device 1 1/2" in diameter that displays moving patterns for major holidays throughout the calendar year. While the pin I made reflects the US holidays and calendar, it can be easily modified (in software) for any nations holidays or such personal displays as birthdays, sports teams, special occasions or just fun.
It supports display of up to 12 different holidays and a large (32) color pallet. It also, as coded, supports 40 different animation patterns with multiple patterns selectable for each holiday capable of different rates of change and number of repeats. And if the included patterns or the color pallet are not sufficient, you can change them by adding pattern functions in code to suit.
Sound interesting? Read on!
Step 1: Specifications
The Holiday pin displays 4 colors for each of 12 different holidays ( I have defined 10) in a circular pattern of multi colored LED lights of 16 positions assigned from a pallet of 32 different colors. Multiple patterns are displayed for each holiday from a pallet of 40 basic patterns. The patterns are animated with each pattern capable of changing at different rates and repeating different number of times making for almost infinite possibilities.
These choices are not user selectable but may be easily changed by a programmer since the color pallet, assignment of colors for a holiday and the pattern, repeat and speed for a holiday are specified in EEPROM.
Physically the pin consists of two parts. The display element contains 16 programmable LED lights contained in a 3d printed plastic holder with attached clothing pin , connection jack and a light diffuser cover. It connects to a separate 3d printed power/controller unit through a standard stereo audio cable. That element contains 4 AAA batteries, and on/off switch, the display processor, a audio jack and the holiday selection push button switch.
I tried to mount all the components in a single unit small enough to wear as a pin but the power requirements of the LEDs prohibited use of small button batteries.
Step 2: Operation Overview
A note about the video shown above. The colors shown do not due it justice. But, please have a look at it for a sample of the animation capabilities.
Selecting a Holiday to Display
Holiday selection can be made by the user just after the display is turned on. When the pin is connected and the units on/off switch is turned on, the current holiday colors are displayed indicating the current selected holiday. The user then may either allow that holiday to be displayed by waiting 10 seconds or press the selection switch to change the holiday, If pressed, the display will cycle through the holiday options displaying the 4 colors for each holiday in turn. To select a particular holiday the user only has to release the push button when that holidays colors are displayed. After a short pause, the holiday patterns will be displayed.
The possible holidays (in display order) as I have defined them are:
- New Years
- Mardi Gras
- July 4
- Memorial Day
Two additional holidays may be easily defined by a programmer.
Ready? Then lets build one!
Step 3: Parts You Will Need
1 x NeoPixel Ring - 16 x 5050 RGB LED with Integrated Drivers
1 x 1/8" Phone Jack 3.5 mm 5 contacts 3 conductors TRS audio stereo socket SMD
1 x Bead Landing™ Bar Pin, 1" You should be able to find these at Michaels store or order on-line
3D printed pixel ring holder
3D printed diffuser lens
1 x Arduino Pro Mini 5V (ebay/ amazon) see the parts photo I used one I had in my parts box purchased on ebay for less than $3, it needs an FTDI board to program. If you buy another type of Arduino you may need to modify the enclosure.
1 x Miniatronics Corp DPDT Sub Miniature Slide Switch MNT3820005
1 x Battery Case Holder Box 4 x 1.5V AAA Battery with Black and Red Wire Leads
1 x Uxcell 6x6x12mm PCB Mount 4 Pin Push Button Tactile Tact Switch w Cap
1 x 3.5mm Stereo 3-Pin TRS Plug Jack Socket Adapter
1 x Lovup Stripboard Veroboard Uncut PCB Platine Single Side Circuit Board 6.5x14.5cm
for mounting Push Button & power distribution. We'll be cutting this down to connect the button and as a power buss
used for connecting 3D printed and injection molded parts.
3D Printed case and Belt clip retainer
1 x Set of 10 Colors 3ft 3.5mm Male To Male M/M Flat Noodle.
Select one to match the color to your clothing
In addition you will need:
Small gage (28 or 30) hook up wire , 4/40 machine screws, small piece of ~2mm thick plexiglass ( for belt mount clip) , 3d printer filament (see instructions), Epoxy glue, Heat-set insert installation tip or solder iron (for threaded inserts) and small screws (2.5mm for plastic ~4mm long) for mounting the small piece of strip board to the case as well as small screws for the slide switch.
Note: I sourced most of the parts from Amazon to save on the overseas shipping time. This was more expensive than sourcing from ebay. Also many of these items are for multiple parts when all you need is one for the project... sorry. As you acquire these parts save them in a box so they will be easily accessible when you start your build.
Step 4: Print the Control/Power Unit
Print the Case
The case consists of 4 parts: top, bottom, belt clip and clip retainer (retainer). Three of the four require 3d printing ( .stl files included) in your choice of filament. I used PLA but PETG or ABS are also acceptable. They are printed at normal settings for your printer and at a fairly high 30 -35 % infill for strength with support turned on at 50 degrees. The third is the belt clip constructed out of a single piece of plexiglass (see instructions below).
The bottom holds most of the components: Battery case, 3.5 mm jack to provide connection the pin, On/Off switch, and the interconnection circuit board. The top attaches to the bottom and holds the Arduino mini in a special snap- in bracket. The retainer is a simple bar that holds the plexiglass belt clip onto the bottom piece. This is also how the case is held closed.
The belt clip, once constructed will allow the user to attach the control unit to a waist band. The case also may be placed in a pants pocket, in this case the clip can be eliminated.
Two template .stl are included to assist the drilling and cutting of the clip. There is also a curve template .stl that is used to create a jig to bend the flat sheet into its final shape.
Build the belt clip jig
Using a short piece of 2x4 lumber, about 5 " long trace the curve on the short side (2") so that the curve is about half way. Using a band or hand saw cut it in half, Sand and smooth both halves and using the flat clip template locate the two screw holes to fit 4-40 machine screws and drill part way through Screw two 4-40 machine screes into the retainer to help position the screws, cover the screws and retainer with blue tape. Put a bit of cyanoacetate glue into the holed that you drilled into the wood jig then screw the two into place. Allow to set up before continuing. After the glue is dry press the retainer flush with the wood surface, cut off the screw heads and sharpen the screw ends with a Dremel tool. Match up the two pieces and tap with a hammer to mark the screw location then remove the retainer. Drill out the marks with a slightly oversized bit all the way through so that the pieces mate almost flat, countersink these holes to allow quick mating. Cover both pieces with aluminum foil and smooth.
Construct the belt clip
Using the belt clip template mark outline on the piece of plexiglass using a sharp knife. Also mark the two holes carefully and drill slightly over-sized to accept a 4-40 machine screws. Now cut out and file along the knife marks being sure to smooth out sharp edges so it will not catch on clothing. Make sure you support the plastic as you file to prevent cracks and damage. Place the piece over the screw ends on the curve jig and using a heat gun, heat evenly until the plastic just begins to bend. Now quickly place the top half of the in place and press down. Hold in place till cool, about 2 minutes.
Add the screw Inserts
Add the heat set screw inserts into the top piece and when cool test assemble all 4 pieces using two 4-40 machine screws (see photo above). Disassemble again when fitted.
Try fitting the case together to verify the build.
Step 5: Program the Arduino
Load the Arduino code onto your computer
In your Arduino Sketches directory create a sub-directory named Holiday_Pin. Move the following three files into that sub-directory Holiday_Pin,ino, lightControl.h and effects.h.
Next create a Utilities directory in the Arduino Sketches directory and create 4 sub-directories in that directory named LoadinitHoliday, LoadCtable, LoadDtable. and LoadHCtable. Move the 4 .ino files into their respective directories.
Load the code to the Pro Mini
Follow the order shown below to program the Pro Mini's EEPROM. You must follow these steps any time you make changes to the EEPROM Tables. Open the serial monitor @ 115200 baud will show verification messages of the table update.
1. Load and run the LoadInitHoliday program.
2. Load and run the LoadCtable to create the table of 32 colors.
3. Load and run the LoadHCtable to create the colors assigned to each holiday.
4. Load and run the LoadDtable to create the display patterns for each holiday.
Now load the main program, Holiday Pin. I have provided documentation on the pin operation and programming guide as a separate file named Wreath Description(,rtf). Please consult it if you intend to make any modifications to the code or settings. It is also a good idea to read the code since I believe it to be well commented.
Step 6: Construct the Signal Distribution Board
The design incorporates a small circuit board to hold the tactile switch and to route power and signals between the Arduino MPU and the other components. This is not a custom board but rather is constructed using standard 0,1 inch perf board or, as preferred, strip board. A drawing of this board appears above, your will need 5 rows of strips by 10 holes in each row. Cut the board using an X-acto saw blade or Dremel cut-off wheel, Drill two holes as indicated in the drawing at locations (middle row, 1 hole from each end) of sufficient size to allow your screws to secure it to the case. Next locate the tactile switch on the opposite side (copper) as shown, so that when soldered it will protrude through the hole in the case. Solder it in place. Now place the 1x5 pin header on the front of the board next to the screw hole, secure it with a bit of cyanoacetate glue. Turn the board over and solder it to the perf board pads. Next locate the pin at the second position of the header counting from the bottom edge of the board (marked with x in diagram) and cut it flush with the plastic carrier. This will be used to establish polarity of the Dupont connector.
Prepare the battery holder (see illustration above) by filing a notch in the case down to the metal battery contact. Place the holder so that the end with the wires is facing away from you and place the notch between the second from the right metal contact and the internal battery separator. The notch is needed for the Dupont connector clearance.
Wire the on/off switch, phone jack and the battery connections in the indicated columns. Allow enough wire to reach from these devices to the board but don't allow too much slack that may get in the way when closing the case. It may be easier to solder the wires to the jack and switch first before soldering to the board as follows:
Solder the ground wire between the jack's sleeve terminal and ground strip;s phone jack column
Solder the V+ wire between the jack's ring terminal and the + Power strip in the same column.
Solder the Din wire between the jack's tip terminal and the Pin Control strip also in the above column
Solder a wire between the center connectors of the slide switch and the Battery 6V strip in the slide switch column
Solder a wire between on of the end connectors of the slide switch and the V+ strip in the slide switch column
Cut the black and red battery wire to appropriate length and solder the black to the ground strip and the red to the V+ strip in the Battery column.
When wiring to the distribution board be sure to push the wires through the front of the board and solder to the pads in the rear. If using standard Perf board you will need to add bare wires to connect all solder joints along each row. Trim the wires flush. Test connections to the battery holder before snapping it into the back of the case. Also test the continuity of the switch and jack connections before attaching then to the case bottom.
The battery holder will be very tight if the case is printed in PLA. You may need to file the holder at a 45 deg angle on the bottom where the case tabs fall and also file the ends of the case tabs so the holder can be pushed into place. When you push the holder into the case make sure the battery wires are sticking out the opening.
The Arduino is snapped into the position on the case top. Before doing this you need to prepare the Dupont connector and wire it to the Arduino board. Prepare 4 wires 26 or 28 gage one red, one black and two additional colors, 4 inches long. Strip about 1/4 inch from each end then twist and tin with solder. Attach one end of each to crimp on female crimp in connectors for Dupont connectors , Insert each into a 5 pin connector shroud in the following order starting at one end position 1 black 2 empty, 3 color1, 4 red, 5 color2 . Now solder the opposite ends into the Pro Mini as follows:
Black to Arduino GND on the bottom edge
Red to Arduino RAW pad
Color1 to Arduino's Pin 8
Color2 to Arduino's Pin 5
Test all for continuity.
Place a bit of epoxy glue to block position 2 of the Dupont shroud (this will prevent a pin from entering that hole), allow to set. Trim the soldered wires so only a small amount of wire extends beyond the back of the Arduino. Snap the board into the case top as indicated above. It may be helpful to add a bit of hot glue to fix the wire to the Arduino and provide strain relief.
Now insert the Dupont connector into the pin header being sure to observe polarity. Add 4 AAA batteries to the battery holder (observe polarity) and turn on.
The Arduino's power led should light. If not double check your work with a multi meter.
Attach the Slide switch and the phone jack to the case then using two small screws attach the distribution board to the case at location shown.
Turn it off and begin work on the pin.
Step 7: Print the Pin
There are two .stl files included that need to be printed for the pin. The first file (PinParts)contains the three discrete parts that make up the pin body to be assembled into the complete pin. The second is a diffuser lens that is used to soften the bright output of the LEDs. I printed the body using ABS plastic since it is softer than PLA and has a bit of give when inserting the pixel ring and glues up easily using ABS cement. PETG or PLA may work as well but you will need to use a compatible glue. Its a trade off. on use of base plate support for these parts since there is clean-up will be needed in either case before glue up. For now, print and clean-up the three parts: main body, clasp mounting and jack shroud, extras of the mounting and shroud are included.
The lens (Pin Lens) needs to be printed using a clear filament on a base plate with a smooth surface. PETG is the filament that I used but you are welcome to try another type of plastic. The lens is just slipped over the assembled base, it is a tight friction fit so use caution when test fitting. Some slicer settings that should be used for this part are: full infill (ie. 100%), lines, all combing, no support and, if PETG, no fan for improved layer adhesion strength.
Step 8: Assemble the Pin
Aside from the above printed parts you will need:
- NeoPixel ring
- Surface mount phone jack
- Three colors thin 28 or 30 gage wire
- Jewelry clothing clasp
- ABS or other compatible glue for the plastic
- epoxy glue for the clasp
- Soldering supplies
The steps are simple but a bit delicate.
- Determine the orientation of the pixel ring within the main body and the length of wires needed to solder it to the jack ( see above pictures).
- Cut and strip the end of the wires and solder one end of each to the ring at Din , V+ and Gnd.
- The jack will be mounted in the square hole make sure the wires will reach from the ring to the jack plus about 1/4 inch more.
- Bend the solder tabs on the jack 90 degrees so that they are sticking out from the bottom
- Carefully solder the other ends of the wire to the jack tip tab (Din), ring tab (V+) and sleeve tab
This would be a good time to test the soldering and programming.
Plug a cable into the controller and the other end into the jack. Turn on and verify that the neo pixel works and that the holiday can be changed using the tactile switch before continuing, When verified remove the cable and turn off the controller.
- Now thread the jack through the hole in the pin body
- Push the jack into the shroud with the tabs and wires sticking out of the bottom and the plug hole exposed in the arch.
- Place the shroud into the pin case and holding it firmly against the pin case glue in place Hold or clamp till set.
- Run the three wires in the trough from the ring to the jack and press the ring in place so that the LEDs are flush with the top of the case. Be sure the wires are in the trough and not pinched between the ring and body Do Not glue.
- Glue the clasp mount (with the three pins) to the case in the indicated area using ABS (or other type) gue and allow to set.
- Rough up the back of the clasp with a small piece of sand paper then test fit over the three pins, remove and cover back of clasp with epoxy and then press into place over the pins. Clean up any glue squeezed out between the pins Allow to set overnight.
- Use a soldering iron to flatten the pins flush with the clasp so the back of the clasp is smooth and will not catch on fabric.
- Plug the pin into the controller and re-test.
- Push the lens over the pin body, press till flush with the top ,
Step 9: Project Compleated
You have completed the holiday pin project. I hope it was enjoyable and maybe a bit challenging. Enjoy wearing your pin or giving it as gift to a friend.
The attached file contains instructions for the pin user that they may find helpful.
If you liked this project please have a look at some of my other instructables, Just look for me, Souperman2
Want a bigger challenge? I am working on a larger holiday display instructable which will allow you to share your holiday spirit with your neighbors. Check back for the Super Holiday Wreath Project, I hope to have it ready for you to build in time for Christmas.