Lighting in the DICE

With the last small update on the z-plane there comes light into the DICE now.

This is really easy and cheap doable. I did test a lot of different electronics and circuits and in the end, there is only one reasonable way to do it: with a dimmable constant current source. I recommend parts like the following:

2 pcs 3W COB-LEDs for 1,95€ on ebay (klick)

 

100mA dimmable constant current source for 3,95 on ebay (klick)

 

Now you mount in the new z-sheet or just drill 2 holes right beneath the XY-plane, to get the wires for the LEDs through the metal sheet. The LEDs are simply glued on the sheets with doublesided thermal transfer pad (for ~4€ on ebay). This is the same thermal transfer pad I use for all the other heatsinks, e.g. on the stepper driver (TMC2100).

 

I connected the 'DIM'-contact to a I/O pin on the AZSMZ. It can be any unused I/O-pin, I used P0.27. In case you have a display connected, just use P2.11 or 2.12 or something like that.

Then, I configured a 'switch' alias in the smoothieware-firmware. This is quiet easily done via terminal commands. Just put the following line by line into the terminal to create one without the hassle of fiddling around with the SD-card.

config-set sd switch.light.enable true #create switch called 'light'
config-set sd switch.light.input_on_command M9000 #on-command
config-set sd switch.light.input_off_command M9001 #off-command
config-set sd switch.light.output_pin 0.27 # 'DIM'-contact on the CCS
config-set sd switch.light.output_type digital #switching mode 'on/off'

Don't forget to reset the board afterwards with the reset command. After 5 seconds, the board will then reboot. Now, I added two on/off buttons to the octoprint GUI with the "custom controls"-plugin. This way, I can switch off and on the light via a press on a button:

 

Tags: DICE, LED, LEDlight, smoothieware