Remote controlled 3D Printer Lights using Octolight plugin for Octoprint
In this project we set up remote control lighting for our 3D printer using Octolight, an Octoprint plugin.
If you're watching and controlling your 3D printer remotely using Octoprint, it makes sense to be able to control lights as well.
The Octolight plugin is easy to setup and adds a good control button to the Octoprint screen.
Parts for the build:
Raspberry Pi 4 & Relay case STL files https://www.thingiverse.com/thing:5564523
Jumpers - search for these using 'F/F Solderless Flexible Breadboard Jumper Cable Wire'
Relay - search for these using '5V 4 Channel Relay Board Module'
M3 x 6mm self tapping screws https://www.aliexpress.com/item/10000350027047.html
5v LED light strip https://www.aliexpress.com/item/32952790418.html
USB cable - can use USB cable extension with male and female USB, or any USB cable that's long enough with female USB at one end.
More info about Octolight https://plugins.octoprint.org/plugins/octolight
Install Octolight plugin
Search for Octolight in Octoprints plugins and install it.
It has only one config setting, the Pi pin number. Leave it at the default value.
Wire up USB cable to relay board
Using 5 volts for lighting power keeps things simple and you can run the lights off a usb power supply.
Cut the usb cable in the middle, strip the ends and cut off the data wires so only the red and black are left. The cable has to be long enough to reach from your 5v power supply to the lights via the relay enclosure.
Feed the wires into the enclosure and solder the black wires together and insulate with some heat shrink.
Connect the two red wires to the input and output of one of the relay switches.
Print enclosure and install Raspberry Pi and relay board
3D print the enclosure, the STL file links are in the description.
Screw in the Pi and relay board using M3x6mm screws.
Connect relay to pi with jumper cables
Connect the relay board to the pi with 4 jumper cables as shown in the diagram.
Connect usb cable to LED light strip and install
Solder red and black wires to positive and negative connectors of the LED strip and insulate with some heat shrink.
Install your lighting where you'd like it. I put mine inside the door frame of the 3D printer enclosure.
Give it a test !
You might find that lights go on and off opposite to what you think, so you can flip the polarity in the config settings of Octolight.