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:

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.