I always wanted to have some box on the printer (when I got MMU3), but my printer is in a room, where is not so much light, so I wanted to add lights over filaments in the box and also to have any light in the box.
Together with COREBOXX and SEMI-SMART and a lot of support from Voxel3D (author of COREBOXX and SEMI-SMART) I was able to create GPIO operated lights in the COREBOXX.
Based on current setup, the features are:
Connectors
Resistors
Other
Important information is, that each LED will be turn on/off with GND.
Cables should be around 70cm long (measured from the LED modul to semi-smart connectors)
LED preparations
During installation I highly recommend to install resistors on all LEDs and to shorten the connectors as much as possible (leave like 1 cm on LED positive connector and same for resistors)
MOSFET Preparation - only for 4th and 5th spool light
Place the MOSFET with the metal part with hole on table - that way the pins are from left: GATE-DRAIN-SOURCE. VERY IMPORTANT to do this right!
Rest should be pretty clear with the "schematic" which I prepared. It was done in EXCEL (sorry for that), but it should be enough for explanation how to do the wiring. Let me know, if any extra help is needed regarding the wiring.
At the end from the Lights module you should have 7 cables - 3x GND and 24V to upper connector, GND + 2x GPIO PIN to right connector
Colors in "schematic"
Shiny RED - 24V
Brown - GND - GND next to GPIO PINS 4/5
Dark RED - GND - Upper connector (RGB -> R)
Dark GREEN - GND - Upper connector (RGB -> G)
Dark BLUE - GND - Upper connector (RGB -> B)
Shiny GREEN - Signal - GPIO PIN4
Light BLUE - Signal - GPIO PIN5
You need to first setup your printer to tell, that PINs 1-5 are output pins. In order to do that, create empty file, put in those lines and save it like .gcode and run it in printer like normal printing. It will beep at he beginning and in the end.
M300 S880 P200 ; Beep to indicate start
; Set pins as outputs
M262 P1 B0
M262 P2 B0
M262 P3 B0
M262 P4 B0
M262 P5 B0
; Light up all LEDs
M264 P1 B1
M264 P2 B1
M264 P3 B1
M264 P4 B1
M264 P5 B1
M300 S1760 P300 ; Beep to indicate end
; End of initial setupB0 = OFF
B1 = ON
M264 P1 Bx
M264 P2 Bx
M264 P3 Bx
M264 P4 Bx
M264 P5 Bx
== Example ==
Start_G-Code:
; MMU3 GPIO LED Control - Initial setup
{if initial_tool == 0} M264 P1 B1
{elsif initial_tool == 1} M264 P2 B1
{elsif initial_tool == 2} M264 P3 B1
{elsif initial_tool == 3} M264 P4 B1
{elsif initial_tool == 4} M264 P5 B1
{endif}
; Turn off LED for not-active filaments
{if initial_tool != 0} M264 P1 B0 {endif}
{if initial_tool != 1} M264 P2 B0 {endif}
{if initial_tool != 2} M264 P3 B0 {endif}
{if initial_tool != 3} M264 P4 B0 {endif}
{if initial_tool != 4} M264 P5 B0 {endif}
Toolchange_G-Code:
; Turn off previous filament's LED
{if previous_extruder == 0} M264 P1 B0
{elsif previous_extruder == 1} M264 P2 B0
{elsif previous_extruder == 2} M264 P3 B0
{elsif previous_extruder == 3} M264 P4 B0
{elsif previous_extruder == 4} M264 P5 B0
{endif}
; Turn on next filament's LED
{if next_extruder == 0} M264 P1 B1
{elsif next_extruder == 1} M264 P2 B1
{elsif next_extruder == 2} M264 P3 B1
{elsif next_extruder == 3} M264 P4 B1
{elsif next_extruder == 4} M264 P5 B1
{endif}
End_G-Code:
; MMU3 GPIO LED Control - End of print (all on)
M264 P1 B1
M264 P2 B1
M264 P3 B1
M264 P4 B1
M264 P5 B1
The author remixed this model.
Added option to have lights per spool (active filament)