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 ads by
Signing UpStep 1: Parts Bin:
- 200 pcs 1210 SMD LEDs, blue ones can be found here
- 1 pcs Black shutter shades, use these as I have provided a template for use with these glasses.
- 2 pcs PCB vero board, 90x127mm, found here
- Arduino nano, or alternative.
- 3 pcs 74HC595 8-Bit Shift Register, a pack of 10 can be found here
- 1 pcs HCF4017 Decade counter with 10 decoded output, a pack of 5 found here
- 8pcs BC337, a pack of 10 can be found here
- 24 pcs 1/4W resistors, 82ohms if using white, blue or green leds, or 150ohms if using red, orange or yellow leds. A pack of 100 resistors can be found here
- 8 pcs 1K 1/4W resistor can also be found via the above link
- 2 Meters of 40 way IDC 0.05 pitch multi-strand cable, found here
- 1 IDE hardrive cable, found here
- 1 project enclosure, it may be better to choose one after you have finished the driver and chosen your power supply.
- 1 pcs 4 x AA battery pack*
- 4 pcs AA batteries*
- Hot Glue sticks*
- SuperGlue*
- Solid core wire*





















































Visit Our Store »
Go Pro Today »




I want one, also brilliant
Thank you
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 :)
Scale from 1 to 10 with 1 being easy and 10 being extremely difficult.
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.
http://www.youtube.com/watch?v=VmupkTehaq8
Thanks
Nick.
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);
}
cheers
Then copy and paste it into the arduino IDE software.
Congratulations on the contest too!
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
genius !
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 !
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 !
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 !
Also, I ment "good luck" in a good way :D
ima pretty laid back individual and always take all comments with kindness !
once again thanks for sharing this greatly inspiring instructable with us all !
Jim (in london)
I was looking to make the drivers using 3 max7219's tha way i can remove the decade and transistors from the equation. I would like to make my next design but I don't have access to a laser cutter to produce acrylic frames. I was going to use 3mm blue diffused to have easy to make kits. oh well
Cheers for your interest.