Instructables

LED Matrix Glasses: First Prototype

FeaturedContest WinnerContest Winner
UPDATE: http://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.


 
Remove these adsRemove these ads by Signing Up
diabloboy1 year ago
i tried making something similar to this but have problems with mine. i had uploaded the test code thinking that even though it is a 12*9 matrix it would still work with the copied test code. however when i plug it in some LED's turn on quickly but then it shut's off and no animation comes up. I've recorded a video so you could see what is happening every time i plug it into the computer. i would like to have some help on what the problem is.
eXtremeSomething (author)  diabloboy1 year ago
The test code will only work if your wiring is the same as mine, ie. by using the schematic. Unfortunately its not a universal code and won't work with a 12x9. Send me schematic diagram of your exact circuit and i might be able to help.
hey man after 8 months later until today i finally got around to fixing my problem. i ended up making a new led matrix board and a new board for the decade counter, transistors and shift registers. The problem i had at first was that i connected the wires to the wrong pins on the arduino, but when i fixed that problem i encontered another problem which was atleast 4 or 5 rows wouldn't turn on. so i gave up on it. a couple of days ago i ended up figuring out that the reason to why those rows wouldn't turn on was because my dumb self wired the transistors all wrong. instead of connecting each row of l.e.d's to the connector node i ended up connecting it to the emitter node. -_- Anyhow thanks for a superb tutorial and trying to help me!
1512649_10151926611769775_815693056_n.jpg
J-Five11 months ago
COOL!!!!!

I want one, also brilliant
denulrix11 months ago
Just another question, will this code work on an arduino uno as wel?
Thank you
denulrix11 months ago
Hey nice work:)
I'm currently making this but there is one thing on the schematic that's a too little pixelated to read :( Just to be sure, row 1 is the top layer of the glasses and row 8 is the bottom layer of the glasses???
Cheers :)
timshel1 year ago
How difficult would this be for someone who has little experience in electronics? I've done basic wiring and soldering before but thats about it.

Scale from 1 to 10 with 1 being easy and 10 being extremely difficult.
eXtremeSomething (author)  timshel1 year ago
Its a little hard and really fiddly but I've done the electronics for you, so all you have to do is glue and solder it. Give it a try, whats the worst that can happen? so I would say 4
Excellent tutorial! I'm in the process of soldering the leds now. Are there any tips on testing the soldered connections during the process? I'm concerned about my bridged connections over the nose (and the cathode rows)! Thank you!
eXtremeSomething (author)  timpossible1 year ago
Try checking it with a continuity tester or resistance meter against the schematic diagram.
Hi, I am so excited to make my own pair! I am just wondering what gauge the solid core wire must be? Thank you for making this awesome tutorial and sparking my interest in Electrical Engineering :)
That's great to here! The solid core wire is 0.6 mm standard breadboard wire. Thank you for your interest and good luck !!!
sniper69jr1 year ago
How would i be able to expand the matrix driver to control a 40x8 led matrix?
eXtremeSomething (author)  sniper69jr1 year ago
Using more powerful transistors, so 40* 20mA is 800mA so they should be able to handle 800mA. You would have to have 5 shift registers and cascade them like be for, it pin 9 on chip 1 goes to pin 14 on chip 2 and you would need a different code. Also it will have a frame rate that is slower than my one. And you won't be able to store as many programs. Are you making a message board or a daft punk helmet or something because there are different ways of doing a matrix: http://www.youtube.com/watch?v=wTQM6VPTsQo , http://www.youtube.com/watch?v=mDXlQFcbWhA
im interested in doing a daft punk helmet and thanks
Shaguerete1 year ago
Hy please I'm from Argentina and I want to buy some of them, contact me
nkukich1 year ago
Ah. A bit, but not badly.
nkukich1 year ago
Do you mean through the sides of the goggles? Those are totally opaque; I just spray painted them black (and let it cure for a few days). In a darkened room you can only see the display and the red air vents.
eXtremeSomething (author)  nkukich1 year ago
Oh right, but I ment does the lens glow and make it hard to see out of?
nkukich1 year ago
eXtremeSomething (author)  nkukich1 year ago
Wa hey, finally someone else made one and shared it here!
Does the plastic glow a little when in a dark room and operating ? It is however much better finished than my one, and I really like the quick release connector on the matrix data lines.

I sold mine but I am working on a secret weapon, in wearable technology....wait and see.
nkukich1 year ago
Thanks for the Instructable. Here's my take:
http://www.youtube.com/watch?v=VmupkTehaq8
singhnick1 year ago
I'm going to Ultra Music Festival in Miami. It will be awesome if i could buy a pair from u.
Thanks
Nick.
mrlights1 year ago
Wow those glasses are awesome! I am a magician and have a routine that is perfect for those glasses. I am not hot on electronics. How much would you charge to make a pair for me? Thank you for your time in this. Look forward to hearing from you. Thanks
lhwong1 year ago
Hey everyone!

As some of you may remember, I brought up the possibility of using program memory to store animations a while back.  Well, now I've completed my LED glasses and they're working, I've been able to work on this modification, and am happy to say I have it working now!

Currently, the frames are stored in static RAM, which is only 1024 bytes on the Arduino Nano. This modified code uses FLASH memory instead (with a much larger capacity of up to 32768 bytes, minus code space) using the PROGMEM command. This increases the animation frames you can store from about 40 frames (using SRAM) to a whopping 1000 frames (which is what I estimate you should be able to get using this FLASH program memory technique).

I've modified the original code provided by eXtreme Something and here it is.  I've also added a little animation I put together.

Just copy and paste this code into the Arduino application developer, Verify it, and then Upload it to your Arduino and it should work.

Here it is:

/////////////////////////////////////////////////////////////////////////////////////////////
// LED Glasses code by Lok H. Wong
// ===============================
//
// Written 11/18/2012, based on code originally obtained from www.instructables.com.
//
// Code has been modified to take advantage of the PROGMEM command, which allows animations
// to be stored in program memory, instead of static Random Access Memory (SRAM).  SRAM is
// limited to only 1024 bytes on Arduino Nano.  Program memory, on the other hand, has up to
// a roomy 32768 bytes, minus the space your code takes, allowing for many more animation
// frames.
//
/////////////////////////////////////////////////////////////////////////////////////////////

int DataPin = 11; //shift input
int LatchPin = 10; //rstclk on shift
int ClockPin = 13; //srclk on shift
int clock = 9; //decade clk
int Reset = 8; //reset

unsigned char rain_P [][8][3] PROGMEM = {                              //In this example the animation is called rain,
{{0,2,4},{32,0,0},{1,0,16},{0,0,0},{0,0,64},{2,0,0},{0,0,4},{8,0,0}},  //Paste the array values you got from excel here
{{4,0,32},{0,2,4},{32,0,1},{1,0,16},{0,0,0},{0,0,64},{2,0,0},{0,0,0}},
{{0,0,0},{4,0,32},{0,2,4},{32,0,1},{1,0,16},{0,0,0},{0,0,64},{2,0,0}},
{{8,0,0},{0,0,0},{4,0,32},{0,2,4},{32,0,1},{1,0,16},{0,0,0},{0,0,64}},
{{0,0,0},{8,0,0},{0,0,0},{4,0,32},{0,2,4},{32,0,0},{1,0,16},{0,0,0}},
{{0,0,4},{8,0,0},{0,0,0},{4,0,32},{0,2,4},{32,0,0},{1,0,16},{0,0,0}},
{{2,0,0},{0,0,4},{8,0,0},{0,0,0},{4,0,32},{0,2,4},{32,0,0},{0,0,16}},
{{0,0,64},{2,0,0},{0,0,4},{8,0,0},{0,0,0},{4,0,32},{0,0,4},{0,0,0}},
{{1,0,16},{0,0,64},{2,0,0},{0,0,4},{8,0,0},{0,0,0},{4,0,32},{0,0,0}},
{{32,0,0},{1,0,16},{0,0,64},{2,0,0},{0,0,4},{8,0,0},{0,0,0},{4,0,32}},
{{0,0,0},{32,0,0},{1,0,16},{0,0,64},{2,0,0},{0,0,4},{8,0,0},{0,0,0}}
};  //When you get to the last frame of your animation, you need to replace the comma with };

unsigned char rotatebox_P [][8][3] PROGMEM = {
{{0,0,0},{63,0,252},{33,0,132},{33,0,132},{33,0,132},{33,0,132},{63,0,252},{0,0,0}},
{{24,0,96},{22,0,88},{33,128,134},{32,128,130},{65,1,4},{97,1,132},{26,0,104},{6,0,24}},
{{12,0,48},{18,0,72},{33,0,132},{64,129,2},{64,129,2},{33,0,132},{18,0,72},{12,0,48}},
{{6,0,24},{26,0,104},{97,1,132},{65,1,4},{32,128,130},{33,128,134},{22,0,88},{24,0,96}}
};


// unsigned char your_new_animation [][8][3] PROGMEM = {
//};  //When you get to the last frame of your animation, you need to replace the comma with };


//You can only have a limited amount of frames even if they are in different animations.
//If you have too many frames, the code won't start on the arduino, so you will have to reduce the amount of frames.
//An animation can be played an unlimited amount of times.


void setup()
{
  pinMode(DataPin,OUTPUT);   //Basic setup of pins etc
  pinMode(ClockPin,OUTPUT);
  pinMode(LatchPin,OUTPUT);
  pinMode(clock,OUTPUT);
  pinMode(Reset,OUTPUT);
  digitalWrite(Reset,HIGH); //Reseting the decade to 0 as it can be at a random stage on start up
  delayMicroseconds(5);
  digitalWrite(Reset,LOW);
}

void run_animation_P (unsigned char frame_time,unsigned char frames[][8][3],unsigned char num_frames,unsigned char num_loops)
{  //My function called run_animation_P - this has been modified to use PROGMEM data
  int i, x, y, z;
  byte datasegment;
 
  //The display algorithm shifts out the 3 numbers in the array to display row 1 and then drops down a line....
  //and continues to output the data for that line. It drops down through each of the 8 rows then resets. It then does the next frame.
 
  for(i=0; i < num_loops; i++){              //number of times to play full animation
    for(x=0; x < num_frames; x++){           //number of frames in the animation
      for(z=0; z < frame_time; z++){         //times to display each frame (why do we need this?)
        for(y=0; y < 8; y++){                //cycle through each layer (controlled by the decade counter)
       
          //write the LED row data to the shift registers for the current layer
          digitalWrite(LatchPin, 0);
          datasegment = pgm_read_byte(&(frames[x][y][2]));
          shiftOut(DataPin, ClockPin, LSBFIRST, datasegment);  
          datasegment = pgm_read_byte(&(frames[x][y][1]));
          shiftOut(DataPin, ClockPin, LSBFIRST, datasegment);
          datasegment = pgm_read_byte(&(frames[x][y][0]));
          shiftOut(DataPin, ClockPin, LSBFIRST, datasegment);
          digitalWrite(LatchPin, 1);
         
          delayMicroseconds(700);    //wait
         
          //zero out the shift registers
          digitalWrite(LatchPin, 0);
          shiftOut(DataPin, ClockPin, MSBFIRST, 0);
          shiftOut(DataPin, ClockPin, MSBFIRST, 0);
          shiftOut(DataPin, ClockPin, MSBFIRST, 0);
          digitalWrite(LatchPin, 1);
         
          //reset decade counter
          digitalWrite(clock, 1);
          digitalWrite(clock, 0);
         
        }
        digitalWrite(Reset, 1);
        digitalWrite(Reset, 0);
      }
    }
  }
}


void loop()
{
  //Fill in this to call each of your animations:  run_animation(frame time, animation title, number of frames in the animation, number of loops);
  //e.g. run_animation_P(8, your_new_animation, 11, 12);

  run_animation_P(12, rotatebox_P, 4, 30);

  run_animation_P(4, rain_P, 11, 150);

}
eXtremeSomething (author)  lhwong1 year ago
Fantastic, I would test it but I sold them :D I am making another pair though
cheers
SwingNinja1 year ago
Hi, I'm kinda new to electronics and I want to make something similar to this. I'm reading your instruction, but not sure how to download the code for this project. Is there anyway you can PM it to me ? Thanks.
eXtremeSomething (author)  SwingNinja1 year ago
http://www.instructables.com/files/orig/FDT/R8EH/H6734J25/FDTR8EHH6734J25.txt

Then copy and paste it into the arduino IDE software.
KGuy1 year ago
Amazing Job! I would love to do this next Halloween!

Congratulations on the contest too!
eXtremeSomething (author)  KGuy1 year ago
Thank you !!!
It would be great to see someone actually make a pair. But hold on, i am in the process of simplifying the design, so click follow =P to receive any updates. Thanks again for your interest- Freddy
catmanduud1 year ago
if you enter this in the make it glow I will vote for you
eXtremeSomething (author)  catmanduud1 year ago
thanks but It was made before the threshold date and therefor it won't let me , but hanks anyway
cobysch1 year ago
YOU ARE FREAKIN' AWESOME!!!!!!!!!!!!!!!!!
DjLeeG1 year ago
wow !!! I have to say these are the best glasses i have ever seen !!! I have to have a pair of these in my life... I'm not good with building or making things, so what would it take to order buy a pair from you. I live in Lancashire England, and would really really love a pair of these :) my email address is lgeldart@msn.com.

genius !
Hey congratulations on winning !

A very very Well-Deserved Win considering all the effort and countless hours of hard work involved in making this prototype and more importantly - the sheer amount of time it took to properly document the whole procedure !!

So a huge round of thanks for also sharing !

I'm also from the UK and always find it difficult to source parts from instructables as they usually point to ebay pages from another country so its quite nice to see a fellow Brit on here too !

I'm totally hooked on these LED modified sun-glasses but i have a question:

I have started collecting parts for your awesome instructable and primarily want to use these sun-glasses mainly for working on my soldering projects as i NEVER seems to EVER have enough Decent Light for where im looking so i think this great instructable will help me out Sooooooooooooooo-MUCH and FOREVER fulfill my life working on soldering my SMD projects more of a joy without constantly FIGHTING with getting more light onto my work desk so my question is:

Would it be possible to have every LED 'Always On' ?
- Also, if so, Roughly how long would your battery pack last for ?

(okay so it was two questions, lol !)

Many many thanks in advance, please please would you be able to reply any chance you get !
Hey cheers!

It would be possible to have them all on but Im sure you could just have all the led's in parallel each with there own resistor but then how would you fit it on the glasses? The battery would last at least an hour if done using my method (ie the instructable). Good luck with your project !
Thanks for the luck - ima definitely going to be needing it as ive got my heart set on following your instructable but will be making a homebrew circuit board arduino for it and thats where im going to need the luck as it all SMD components! (& ive always managed to get super glue on me fingers so will need the luck there too lol !)

This way i can use the glasses when i need to work close-up on my soldering and also use them with your sketch like the one in your video, truly AWESOME !!!

Usually i would use the same Blue LEDs youve used as ive got a thing about turning every LED on any device i own to a Blue one but this case it'll be white !

Also last question, your test code thats here on instructables is only the rain pattern, would you be also uploading the whole string of patterns like in your video, the eyes, wavy line, rain etc ?

Thanks again for replying so quick too ! enjoy your weekend !
I hope you understand that I would like to hold some information back, as that is what will keep mine original, sorry. Plus it leaves you to be creative and make your own animations!

Also, I ment "good luck" in a good way :D
yaa no worries at all lol !

ima pretty laid back individual and always take all comments with kindness !

once again thanks for sharing this greatly inspiring instructable with us all !
jimthree1 year ago
Brilliant work, and a very justified grand prize winner! I've had a lot of fun recently playing with the TLC5947 chip from TI and some 0805 LEDs. I had to learn to etch my own boards (using instructables) and solder SMD by hand. I totally recommend you bin the vero-board and move over to DIY PCB, you won't look back! The TLC5947 chips, daisy-chained, could elevate your already awesome glasses into full-on video display goggles!

Jim (in london)
DSC_0089.JPG
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!