Thursday 16 February 2012

Lights ... Cameras ... Action!

One thing I’ve been meaning to do for some time is to rig up some sort of illumination for my printbed. The room where I do my printing is reasonably bright, but the X-Carriage and Extruder casts quite a shadow over the printing area, and it can be quite hard to see what is going on, especially if I am printing with filament which is similar in colour to the printbed (formerly blue painter’s tape, now red / orange for my Kapton-on-PCB heated printbed).

I’ve been thinking of hooking up a LED under the X-axis carriage; this could either be powered in parallel with the heating element (meaning it would switch on and off with the hot-end heater), or preferably, would have its own wires back to the power supply so it is always on. I hadn’t got around to working out what specification of LED(s) I should install, when I came across a cheap USB LED-Magnifier in a “Specials” bin at the local supermarket – only $4 for a really bright lamp with 18 LEDs in a ring, and a nice flexible “gooseneck” for positioning (and you can find similar items on the internet):

[Image copied from http://www.goodluckbuy.com/18-led-usb-flexible-light-lamp-laptop-notebook-with-4x-magnifier.html?&sl=en   – I forgot to take a picture before I hacked the lamp!]
This should cast a lot more light than a single LED, can be positioned to put the light wherever I need it (handy for cleaning out a jammed extruder!), and also has the advantage of not adding any mass to the moving X-carriage. I figured it should be pretty easy to hook it up to my RepRap power supply.

First, I cut off the USB plug (which was surprisingly difficult – the spiral wire which creates the “backbone” of the gooseneck is very tough!) and exposed the two wires – black for ground and red for 5 volts. Then, a bit of testing with my multimeter and adjustable DC power supply showed that the LED lamp draws about 180 mA @ 5 volts (and gives a really bright, uniform light in the process!) – OK for a PC USB port, but probably a bit too much load for 5 volt line on the Arduino.

The Arduino Mega is only rated at 40 mA per pin http://arduino.cc/en/Main/ArduinoBoardMega2560 , so I was concerned that connecting the light to the 5 volt rail could overload the Arduino, and I sure didn’t want to find out the hard way! However, my ATX power supply http://julianh72.blogspot.com.au/2011/08/my-parts-list-power-supply.html is rated at 500 W, so has plenty of capacity to power a little LED lamp on top of the existing load of the RepRap printer and heatbed.
I could have attached the lamp to the 5 volt binding posts on my ATX power supply http://julianh72.blogspot.com.au/2011/08/my-parts-list-power-supply.html , but this would have meant running an extra pair of wires from the power supply to the lamp – simple enough to do, but not very “elegant”. A tidier solution was to hard-wire the LED lamp to the incoming 12 volt supply, so the light would be “always on” whenever the RepRap is powered up. (The lamp has its own on / off switch, so I can turn it off if I want to.)

Of course, the lamp is designed to run at 5 volts, so I needed to step the voltage and current down to avoid blowing the lamp. A bit of basic maths suggests the effective load of the lamp at rated voltage is about 30 ohms, and that I would therefore need to add about 40 ohms in series to maintain a current of about 180 mA @ 12 V. I rummaged through my “box of bits”, and found a 100 ohm resistor, and the maths suggests the lamp should draw about 95 mA when run in series with the 100 ohm resistor @ 12 volts.

(I hope this maths makes sense – I’m a structural engineer, not an electrical engineer!)
Anyway, I hooked it up in series, ramped up the voltage to 12 volts, and turned it on – success! None of the magic blue smoke escaped, and the lamp lights up nicely (but not quite as bright as before – as expected). I guess my maths can’t be too far wrong after all!

So I soldered the resistor to the ground lead, wrapped the leads in heat-shrink and taped them to the gooseneck, and then fixed the gooseneck to the frame with cable ties, so that I can point the light where I need it. Finally, I wired the leads to the incoming 12 volt supply on my RAMPS:




So ... how does it work?

In a word – great! The following video shows how much easier it is to see what is going on while printing.

No comments:

Post a Comment