Step 5: Switches and Housings

At this point you have a set of lights mounted in milk bottle caps and designed to run with a particular power supply. The PPE bottles, once you've delabeled and washed them, will just screw right back into the caps and act as nice looking diffusers.

You could now connect the lights up with a simple switch box, as I did at first, or choose to do something more complex, like drive them using the same power supply but also a microcontroller to make them do more interesting things.

Due to time constraints, I've had these lights around as a prototype in various stages of development for around 18 months, and in that time I've mounted them in two different ways with three different switch boxes. I also retrofitted them with some better LEDs, that gave a slightly bluer light and had diffused housings.

Rather than detail every step of each iteration, I've put a selection of pictures in this step with notes illustrating each of them.

The rest of this instructable will deal with the latest (and coolest) way I've chosen to use them: Mounted in plastic pipe and controlled individually.
<p>Excellent tutorial. I would like to use 10 x 230v 1.2w LED lamps with the same effect for staircase lighting triggered by pressure mats top and bottom. Should I use triacs to handle the extra power?</p>
<p>Really cool! I wonder if you could make this to change color! Or can it already? I skimmed through this, but one of the coolest things I've seen!</p>
Great instructable! By the way, for other readers in Canada/USA, Perspex is commonly known here as Plexiglass. <br> <br>This reminds me of a project my friend's dad made, which involved lights placed under inverted plastic 4 litre ice cream buckets. The string of lights were left beside the sidewalk before winter so that snow would cover them, and they'd light the snowbank from below. It would look awesome to add individual addressing and control as you did!
Very nice! thank u :)
Great looking lights! I love the idea of using milk bottles to diffuse the light. I find 'em pleasant to look at anyhow.<br/><br/>You might also want to look into straight AVRs (start <a rel="nofollow" href="https://www.instructables.com/id/Ghetto-Programming:-Getting-started-with-AVR-micro/">!)</a>. They're just as easy (almost) to work with as arduino, but 6X cheaper and 1000X more flexible (just a chip, not a board). In addition, with the combination of ladyada's USBTinyisp, you'll be able to get that easy usb -&gt; milklights that you're looking for.<br/><br/>If you'd like advice with that, just shoot me a pm, but great work, and congrats!<br/>
Thanks for that, really useful link. I've been thinking for a while that using a whole Arduino in each project is a bit excessive, and surely I can use them to program ATMega168's to wire up without the boards... great tutorial, thanks.
If you search (even this site) for 'AVR programmer using Arduino&quot; you should come up with several methods for programming basic ATMega's using an arduino board.
Great Work!!!
Can you use PWM with a transistor? Thanks
Thanks for your compliments. A google search suggests that PWM can be used with transistors. I'll give it a try this weekend.
Very Cool. Image having these fade down the line. The possibilities are endless :) Great Instructable btw, I'm still lovin' it.
Cheers :)<br/><br/>I just did a quick test with PWM on the bottles connected to the right pins:<br/><br/><div style="margin-left:15px;"> <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Kk_9uM75HT4"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/Kk_9uM75HT4" type="application/x-shockwave-flash" width="425" height="344" wmode="transparent"></embed></object></div><br/><br/>I've put the code up as a text file in the last step too (PWMtest-milklights.txt) if you want to look at it. However, don't learn code from me; I'm a beginner and have been told I use way too many curly brackets :)<br/><br/>Also, the Arduino environment contains a much more straightforward example of PWM using a single pin in File &gt; Sketchbook &gt; Examples &gt; Analog &gt; Fading<br/>
Or you could simply use the SoftPWM library for arduino that gives you PWM on all pins.
have a look at ti's tlc5940: <a rel="nofollow" href="http://focus.ti.com/docs/prod/folders/print/tlc5940.html">http://focus.ti.com/docs/prod/folders/print/tlc5940.html</a>, that has 16 pwm pins for leds, and can be daisy-chained for more. thats what i am using.<br/><br/>great instructable, keep up the good work.<br/>
ajtag, How do you hook up, program and use the flc5940? I'm an noob and a tad bit confused on how you would go about using this chip. Thanks in advanced, Joe
Never mind. I just found a great resource.<br/><a rel="nofollow" href="http://students.washington.edu/acleone/codes/tlc5940arduino/html_r012/">http://students.washington.edu/acleone/codes/tlc5940arduino/html_r012/</a><br/>Thanks,<br/>Joe]<br/>
I was about to recommend that! damn second... lol. (The TLC)
I wasn't sure whether I understood the wiring completely, so I drew up a little diagram. I put in (for simplicity's sake) only three sets of 3 LEDs (connected only to pins 4, 5 and 6 on the Arduino Mini). I think I got the pin order wrong on the NPN transistors. Also, I wasn't sure how to label the resistors on the LM317T, as I'm not sure what you ended up using (and because my eyesight is terrible!). Could you tell me whether I'm thinking this correctly? If not, where is it wrong? Thanks so much!
Really sorry, but it's been over two years since I touched this. It looks about right. I would have used an online calculator to put the right resistors to each trio of LEDs, and this was the first time I'd ever used transistors or the LM317. I had quite a few to spare, and experimented until I got it right.
Wow you drink a lot of milk!
&nbsp;nice work
NM my question it is yea you can do it and i looks cool to<br />
do u think that u cud stop the RGB LED colour fade and thin make it go again to choose a new colour?<br />
Hi this is a great project i think i will build this for my mum and dad's house as they always complaining about light because the voltage is low and you do need well alot of lights to be controled one by one would it be better to have a single ground wire for all the lights then just use Cat5 is this possible so far i think it is but i have not played with the Arduino PS i live in Australia i have only found one place that sells them :'( and its FAR
you could use two of those pipe fittings that make the pipe size larger and a short section of larger pipe to hold the arduino
Congratulations on the win Nachimir - it's a great project!
This would have been neater and easier for fault-finding if you had soldered all the transistors and resistors into a piece of Veroboard (Copper strip Board) and then soldered the wire onto solder pins. Alternatively, if facilities were available a small PCB made to fit into the pipe is another solution.
Yeah, I learned a lot from this, and would have loved to be able to make a PCB for it.
Have you considered using a LM7805? They drop the voltage to a regulated +5 instead of needing to regulate it with a 317. I like the 317, but the 7805 works better for a constant +5.
Thanks for the tip. I'm only just learning about all the components there are out there.
What a F-A-N-T-A-S-T-I-C instructable Nachimir,I commend you on your thorough detail,and neatness, (all things considered).I'm not too well up on Arduinos though,so I've got a pretty steep learning curve ahead of me,despite being an Electro-Tech.I have a just a project in mind for a setup like this,so I better get reading,once again,Congratulations!!
i wonder if you can make allot of OLED dolor changing suond to light system. imagine... color flashing milk bottles with a ipod connected... must invest in this, i think ill make a japan paper lantern theme and hang it on my celling everywhere, that be nice, any tips?
That sounds like a lot more work than this. You could make things sound reactive pretty easily, either with mics, or even piezos attached to speakers. I know those T-qualizer shirts that have the light up EQs on them and were everywhere in the UK a couple of year ago just react to volume through some components integrated with the battery pack, but I've never taken a close look and it only gives very limited responses to sound. If you want to do anything particularly fancy you'd probably need to route the signals through a computer. It would be cool to teach something the difference between Brian Eno and Extreme Noise Terror, and appropriate colours to display for each :)
what about adding a tepture sensor that controls the dimness or even coulour of ligt
Yes, that would work. You can do just about any basic sensing and processing with an Arduino. I have a load of RGB LEDs for my next electronics project, which will record data from somewhere else and pass it on to them...
My Buddy john Callaghan (www.johncallaghan.co.uk) has a costume made from Yakult milk bottles which light up. There's some photos knocking about my Facebook page of him playing a party at my house wearing it.
Aha :)<br/><br/><a rel="nofollow" href="http://photos-b.ak.fbcdn.net/photos-ak-sf2p/v166/99/109/573224364/n573224364_518937_6813.jpg">http://photos-b.ak.fbcdn.net/photos-ak-sf2p/v166/99/109/573224364/n573224364_518937_6813.jpg</a><br/>
i wonder how one could program the arduino to control dimness and creating a breathing light effect on various bottles. sweet project, very inspiring.
Thanks very much, everyone.<br/><br/>A breathing light would be fairly simple with PWM, though a standard arduino only has 6 PWM pins. Maybe you could get around that by routing the output of one pin to more than one bottle, then blocking with transistors for ones you want off at any time... that wouldn't allow you to control all simultaneously without some being perfectly in synch though.<br/><br/>I made a little demo of PWM with an RGB LED:<br/><div style="margin-left:15px;"> <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/hwV07dDHsaA"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/hwV07dDHsaA" type="application/x-shockwave-flash" width="425" height="344" wmode="transparent"></embed></object></div><br/><br/>I added a heatsink to the LM317 today just to be on the safe side. Aiming to get more video/images of the finished light too, but have to find a way to get it the 3 miles or so back to my house now :)<br/>
you could use the arduino mega it has 11 pwm pins
Indeed, I've been eyeing them up, but that's still one short for these :) I like the idea of the Mega, but it seems like overkill. For any project an Arduino seems to have a lot of unused capacity, so maybe deeper prototyping skills based on them could lead to custom PCBs and dedicated circuits that do exactly what you want. Though I think anything that makes physical computing more accessible to people is basically a brilliant idea :)
Very nice! Wouldn't be too much of a leap to seal the tops/lid and make some very unique Christmas lights.....
I love the way the light cycles up through the bottles. Quite a mesmerizing thing to watch! I would have been tempted to put reflective foil on the inside of the lids myself, give more glow in the actual bottle.
I thought about that too, but decided I quite like the blue glow cast up the cable by the lids :)
Beautiful video and pictures - great project!
The level of detail of this instructable is incredible. Great work.
Wow! Wow! Thats all I can say! This is simple amazing! I love it! 5 stars! This is a great instructable. Very in depth. I love it. I'm just getting into the arduino and this is exactly what I needed for a project I'm working on. Thanks, Joe

About This Instructable




Bio: I live in the UK. Half my working time is spent running indie games events, the rest is spent prototyping… things ¬¬ I used to take ... More »
More by Nachimir:Radio Controlled Cable Dolly for Small Format Cameras Addressable Milk Bottles (LED Lighting + Arduino) Bulb Lamp 
Add instructable to: