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):
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