Introduction: LED Matrix Glasses: First Prototype

About: I make things because its fun and I like the challenge.

UPDATE: https://www.instructables.com/id/Rave-Shades-The-Self-Assembly-LED-Glasses-Kit/

Introduction:
I came up with this idea after seeing similar videos on the internet. I however have improved on the design. What separates my glasses from the others out there, is that mine use an external matrix driver and battery. What this means is, for the cost of having a cable down your back when wearing the device, you get a greatly improved battery life. This also allows the device to use  ultra-bright 1210 LED's. Not only that, a full sized arduino can be used if you have one. This project uses cheap and easy to gain parts to allow you to create a one of a kind fancy dress party piece. These glasses do not obstruct your vision any more than the original shutter shades. Even with the glasses on turned on, no glare from the LEDs can be seen.

For me the most important thing about making these glasses has been, increasing my knowledge and attaining new skills. Here are some of the things I have learnt.

• Solder Surface mounted LEDs.
• Write my own C program and optimize it to store more visual effects.
• Using data arrays to store patterns and frames.
• Create an algorithm to shift out the data from a 3D array.
• Correctly control the chips of the driver circuit.
• Cascade shift registers.
• Use Microsoft Excel to my advantage to create many shortcuts whilst programming the on-screen visuals.
• Efficiently place components on vero board.


Step 1: Parts Bin:

To make this project you will need these parts:
* Can be found at most hardware shops or ebay.

Step 2: Tool Box:

To make a pair of these glasses you may need these tools:
  • Soldering Iron, preferable an adjustable one with a fine tip.
  • Hot melt glue gun
  • Side cutters
  • Wire strippers
  • Philips head screw driver
  • Tweezers
  • Scissors
  • Drill 
  • Selection of drill bits
  • Small rectangular file
  • Small round file
  • PC
  • Sewing needle or bobby pin
  • Pen

Step 3: Marking the Positions of the LED's:

The next four steps show you how to mark out the location of the LEDs on the glasses. All images are in chronological order and may have their own annotations to help you.
  1. Download the attached pdf file and print it out.
  2. Remove both arms from the glasses using a small Philips screw driver.
  3. Center the glasses on one of the grids. There are two grids just in case you get something wrong later on.
  4. Draw an outline of the glasses in pen. (Image 2)
  5. Cut along your markings. (Image 3)
  6. Cut down the middle line of the grid to seperate each side.
  7. Lay down some tape with the sticky side up and place one of the half grids face down on the tape. (Image 4)
  8. Try to position the cut-out grid on the corresponding side of the glasses, making sure the the the horizontal lines are in the center of the slats of the glasses. (Image 5&6)
  9. Repeat  steps 7 and 8 for the other side.
  10. When you are sure all is lined up, grab a sewing needle and press the tip on to each crossover of the grid, creating a small hole on the surface of the glasses at every point. (Image 8&9)

Step 4: Attaching the LEDs:

Now follow these steps:
  1. Use sticky tape to hold the glasses securely in place on, on your work surface.
  2. Drip some cooking oil onto a paper towel and wipe the prongs of your tweezers with a thin layer of oil. This will stop the LEDs from sticking to the tweezers when you carry out step 6.
  3. Clean the glasses with washing-up liquid and allow to dry. Do not touch the front of the glasses as grease from your hands will stop the superglue from working properly.
  4. Take an LED and locate the cathode, this can be determined by the recessed corner.
  5. Position several LEDs on your desk at a time with the recessed corner ie the cathode, away from you. Keep them close to the glasses to make transportation to the glasses quick and easy. 
  6. Pick up one LED at a time and carefully blob some superglue onto the base and then place it on one of the dots made earlier with the pin. 
  7. The superglue will not set immediately, so place the LED as quickly as possible and take the tweezers away. Then continue with the next one. The glue will start to set within a minute, so do not place another LED in a neighbouring spot for a couple of minutes so as not to disturb an unset LED.
  8. Repeat until LEDs cover every pin hole you made earlier.
  9. Allow the glue to cure for 24 hours in a dry, but ventilated area.
  10. Check that all LEDs are up the right way. The side with the recessed corner at the top of the glasses when worn* check the last photo of this segment.
Top tips before trying this are:
  • Have a good night sleep before attempting this.
  • Do not consume any caffeine that day. I cannot emphasize how much of a difference this made. 
  • Make sure you work in a well-lit area.

Step 5: Soldering the LEDs: Cathode Rows & Anode Columns

This step requires a lot of patience, concentration and a decent soldering iron tip. Follow these steps and use the related photos & diagrams to help you:

WARNING: Work in a well ventilated space with eye protection when soldering the LEDs as the superglue will emit a toxic vapour.

Cathode Rows:
  1. Strip some multi-strand wire to reveal the individual strands of wire. You will need 8 of these strands and they should be approximately 7 inches long.
  2. Starting on the top row with the LED furthest to your right as you look at them take an individual strand of wire and solder it to the cathode (recessed corner).
  3. Solder this wire along the cathodes of the LED’s in that particular row and leave any excess wire attached. (Image 1)
  4. Repeat this for the next 2 rows and you should be left with 5 more rows with a gap between for the wearer's nose.
  5. Repeat steps 2&3 for the next 5 rows but this time cut off the excess wire when you get to nose gap and keep for later.
  6. The 5 bottom rows require an electrical bridge to be made around the gap for your nose using insulated wire. I used IDE cable as the individual wires are insulated and flexible. When bridging the gap follow the shape of the nose cut out otherwise they can't be worn.
  7. Use the excess wire that you had previously cut off and put to one side, to continue connecting the cathodes of the LEDs on that particular row.
  8. Visually check connections for errors. (Image 2)

Now it is time to solder the anodes together to create 24 columns of anodes. Once again follow these steps and use the diagrams and photos to help you:
  1. Take some IDE cable, seperate out 24 wires, each 7 inches long.
  2. Strip ~1 inch off one end of all 24 wires. (image 3)
  3. Strip a further N pieces of insulation, where N is 1 less than the number of LEDs in that particular column. Each piece of insulation should be 0.25 inch long. Remember to keep them on the strand of wire. (image 4)
  4. Solder the wire on to the anode (the side opposite to the one with the recessed corner) of the bottom LED of that column. (image 5)
  5. To help you in the next step bend a stiff piece of wire to roughly match that shown in image 6.
  6. Use the tool you just made to bend the rest of the wire around the other LEDs, soldering each one as you go. (images 7,8,9)
  7. Visually check connections for errors. It should look like Image 10.

Step 6: Glasses Data Cable:

You should be at a stage where your glasses have 24 anode wires and 8 cathode wires. However they will not reach the driver as they are, so an extender cable is required. Follow the diagram (Image 6) now and you will be able to correctly connect up the cable later:
  1. Take your 40 way IDC cable and take off 8 wires to leave a 32 way cable leaving the red indicator strip on the cable. Note: I have used IDC cable as it has more than one strand of metal per wire. This will have an increased life over an IDE cable. That is why I have only used IDE cable where it doesn't need to be flexed
  2. Stick the cable onto the outside of the glasses using hot melt glue, being sure to leave around 7 inches of cable ahead of the joint and the other 6 foot arrears of it. (Image 1)
  3. Start with the rows and split the cable down to 8 separate wires all the way to the glue joint.
  4. Solder the wires to the corresponding row. Use hot melt glue to hold in in place. (Image 2,3,4 & 5) 
  5. TIP: lick your finger to shape the hot glue to a more streamline shape.  
  6. Strip the remaining 24 wires.
  7. Solder the wire to the correct LED column. (Image 6)
  8. Hold the wires in place with more, hot melt glue using the same technique mentioned above to create a durable frame.
  9. Bulk up the joint where the cable meets the glasses. (Image 7)

Step 7: Securing the Head Strap:

Follow the steps below to create a head strap:
  1. Remove the head strap from an old dust / voc mask but don't tear the elastic. I got mine from a 3M 4000 series mask
  2. Use some steel wire to attach the elastic to the side without the cable (Image 2 & 3)
  3. Bend the excess wire and hot glue it in place
  4. Put some wire around the elastic and then around the middle slat.
  5. Twist it tight but make sure you are not touching any LEDs wires or solder blobs (Image 4 & 5)
  6. Using duct tape or equivalent, bend and tape the data cable in a vertical position, to allow it down the back of your shirt when worn. (Image 7)

Step 8: Schematic Diagrams:

The first schematic is the matrix driver. This will allow the Arduino to control all 162 LEDs and with slight modification up to 192 LEDs. If you want to view the Schematic of the whole system download the PDF below, as the image here is a little pixelated.

Step 9: Assembling the Matrix Driver: Shift Registers

To make the driver, you should use the schematic instead of copying what you see in the next steps and images. This is because you could make a mistake that you may not understand. You should create the layout yourself as this is an excellent skill to have when all you have is a schematic diagram. I have tried to describe each step as best I can:
  1. Take your vero board and lay it, copper side down with the copper strips in a horizontal position.
  2. Solder in a 74HC595 Chip with the indicator notch facing up. (image 1)
  3. Solder in a current limiting resistor from pin 15. I put some solid core wire insulation over the leg from pin 15 to save hassle later on. (image 2)
  4. Solder in the rest of the resistors ensuring they all straddle one hole. (image 3)
  5. Solder in a 74HC595 chip in the same orientation as before but leave 6 holes between each chip. (image 4)
  6. Repeat steps 3&4 for chip 2. (image 5)
  7. Solder in a 74HC595 chip as you did for chip 2 (same orientation + 6 hole gap)
  8. Repeat steps 3&4 for chip 3. (image 6)

Step 10: Assembling the Matrix Driver: Shift Registers Continued...

Continue the assembly by following these steps:
  1. Connect pins 10 and 16 together on each chip. (image 1)
  2. Connect pins 8 and 13 together on each chip. (image 2)
  3. Connect pin 9 of chip 1 to pin 14 of chip 2.
  4. Connect pin 9 of chip 2 to pin 14 of chip 3. (image 3)
  5. Connect pin 11 of chips 1, 2 & 3 together. I did this on the back of the board.
  6. Connect pin 12 of chips 1, 2 & 3 together. I did this on the back of the board.
  7. Look at image 6, it shows 8 connecting wires taking the output from chip 2 over to an area close to the output of chip 1.
  8. Now look at image 7, it shows where the output of all 3 shift chips and transistors could be.
  9. Using a small drill bit make 3 vertical lines of breaks in the 8 copper tracks, this is to separate each output. They have to be at least two holes apart.
  10. Strip and solder 16 pieces of wire to each output from chips 2 and 3.
  11. Route each wire neatly on the board and then solder it to the corresponding location in the output region. See image 8 for details.
  12. You should be left with 2 sets of connecting cables, one is for chip 2 and the other is for chip 3.

Step 11: Assembling the Matrix Driver: Decade Counter

Continue the assembly by following these steps:
  1. Solder in the 4017 decade counter, in line with the other chips and with the notch facing up. However it only needs a 3 hole, gap between it and chip 3.
  2. Connect pins 8 and 13 together on the decade / chip 4.
  3. Connect pin 13 of chip 4, to pin 8 of chip 3. 

Step 12: Assembling the Matrix Driver: Decade Counter Continued......

I would recommend using the 8x BC337 NPN transistors. I used 19x 2n3904 as I had them spare, however I had to put them in parallel to handle the current. So just ignore how many there are.  
  1. Find space on the board to put all 8 BC337s in line with each other. You will need 3 adjacent copper tracks and should start by soldering transistors along them. All tracks should have a like pin type, ie all collectors, or all base's or all emitters. This can be achieved by maintaining the same orientation of all transistors. You will need to leave 2 sets of holes before inserting the next transistor. This is because one of the holes on each track is required to isolate each transistor and the other is to insert the wires and the resistors. Image 1 shows a top view however you can also see an x-ray of the tracks and any required breaks in the tracks.
  2. Using a drill bit break the copper track that the collector and bases run on, leaving one hole for any wires or resistors to be soldered to. DO NOT DRILL THE TRACK THAT THE EMITTERS ARE ON, as this will be used to ground the transistors in the next step. 
  3. Solder a wire from the track that the emitters are on, to pin 8 of any one of the chips. This will ground the transistors.
  4. Solder a 1K resistor into each of the 8 bases.
  5. Solder the other end of the resistor to an isolated section of track that has a minimum length of 2 holes. 
  6. Solder a wire into the other hole on the above mentioned section of track and route it to the corresponding output of the decade counter. DO NOT FORGET OUTPUT 0 IS BEFORE OUTPUT 1. (Image 2, where Q is the output)
  7. Solder a wire from the collector of each transistor, to the output area. (Image 3)

Step 13: Assembling the Matrix Driver: Arduino Hook-Up

Continue the assembly by following these steps:
  1. Score a piece of board and snap it over an edge of a table.
  2. Insert the arduino.
  3. Solder the arduino in place. 
  4. Connect pin 14 of shift chip 1 to pin 11 on the arduino.
  5. Connect pin 12 of any shift register to pin 10 on the arduino.
  6. Connect pin 11 of any shift register to pin 13 on the arduino.
  7. Connect pin 14 of the decade counter to pin 9 on the arduino.
  8. Connect pin 15 of the decade counter to pin 8 on the arduino.

Step 14: Housing the Matrix Driver:

To protect and hold all the electronics together you should mount them in a project box. I used an aluminum box or aluminium box in the UK :
  1. Work out where you are going to install everything in the box.
  2. Place the driver circuit inside the housing and mark up the location of the arduino's USB port.
  3. Drill 2 small holes for the USB port and file them into a single rectangular hole.
  4. Mark up the location of the power switch.
  5. Drill a hole for your power switch. If you do not have a larger enough drill bit you will have to file it out with a round file.
  6. Mark up the location of where the glasses cable will enter the box.
  7. Chain Drill a line for your ribbon cable and then file it  out into a slit.
  8. Cut a length of PVC tube twice the length of the slit.
  9. Slice the tube down the middle and use it to make a grommet for the slit.
  10. If you have used ribbon cable for the glasses cable, spit the unused end into sections of 8. i.e. one for each chip.
  11. Thread it through the slit you made in the enclosure.
  12. Strip each of the 32 wires.
  13. Insert and solder one wire at a time into the correct section of the output region. (Image 15, the last one)
  14. Insert some plastic sheet if using a metal box and tack it and the driver in place with some hot melt glue. (Image 12&13)
  15. Glue the battery holder in place with hot melt glue
  16. Solder the black wire of the battery holder to GND on the arduino
  17. Insert the power switch.
  18. Solder a wire from the VIN on the arduino to the switch.
  19. Solder the red wire from the battery holder to the switch
  20. Insert some batteries and test to see if the arduino lights up. If the arduino has no lights review your wiring.
  21. Only hot glue wires in place after a test run with code.

Step 15: Upload the Code:

To test your glasses:
  1. Download the test code and open it.
  2. Paste the text into the arduino IDE 
  3. Upload the test code.
  4. A sparkling rain pattern will fall down the screen.
To create your own animations:
  1. Start by opening the arduino IDE and pasting the attached code below into it..
  2. Look for the grey section of code with: // e.g. unsigned char your_new_animation [][8][3] {
  3. Remove the // e.g. from it and it should turn black. 
  4. Right click on the Array Calculator v1 link below and select save link as.
  5. Open the downloaded file in Microsoft Excel.
  6. Copy the light blue box titled "on".
  7. Paste this where you would like a particular LED to be on, you can have any combination of LEDs just make sure you only paste inside the glasses silhouette.
  8. It does not work from color so you can't just fill the boxes with that color, you do have to copy either an on, or off box.
  9. When you have finished, copy the number below the glasses and paste it into the code below the "unsigned char [][8][3] {"  line you just modified.
  10. This is the first frame of your animation. Repeat steps 5 to 8 for your other frames.
  11. When you get to your last frame replace the comma, with };
  12. Scroll down to the bottom of the code and you will find a grey "//e.g. run_animation(8,your_new_animation,11,12);"
  13. Remove //e.g. and again it should turn black.
  14. Change the number 11 to the number of frame your animation has.
  15. Change the number 12 to the number of loops you want to do. 
  16. Decrease the number 8 to speed up your animation.
  17. You can rename your animation as long as you change it in the array at the top and down here. 
LED Contest with Elemental LED

Grand Prize in the
LED Contest with Elemental LED

Hurricane Lasers Contest

Finalist in the
Hurricane Lasers Contest

Halloween Props  Contest

Participated in the
Halloween Props Contest