GPIO-Controlled Outlet Box for Octoprint by charlesodonnell 3d model
Warning. This content is not moderated and could be offensive.
m4
3dmdb logo
Thingiverse
GPIO-Controlled Outlet Box for Octoprint by charlesodonnell

GPIO-Controlled Outlet Box for Octoprint by charlesodonnell

by Thingiverse
Last crawled date: 3 years ago
This is a 2-outlet relay-controlled power center that interfaces to a Raspberry Pi running Octoprint. Any 2-wire, 2-outlet receptacle will work for the outlets, for example:
https://www.dkhardware.com/leviton-15-amp-residential-grade-grounding-duplex-outlet-white-r52-05320-00w-product-3141385.html
The relay module is:
https://www.amazon.com/SunFounder-Channel-Optocoupler-Expansion-Raspberry/dp/B00E0NTPP4/
Press-fit this module to the mounting bosses and heat stake them with a soldering iron.
This will switch up to 10A per channel at 120VAC.
I'm running OctoPi with the following plug-in to allow GPIO control of the outlets:
https://plugins.octoprint.org/plugins/gpiocontrol/
The relay module connects via F-F jumpers to the RPi's GPIO pins 4 (5V), 6 (GND), 8 (GPIO14), and 10 (GPIO15), but you can select any GPIO pins you want and configure them in OctoPi.
I didn't include a wiring diagram, but it's pretty simple. First, bend the brass ear on the line side of the outlet (brass, "black wire") until it breaks off. This will allow the outlets to be controlled independently. Connect the neutral side of the line cord (wide blade) to the opposite side of the outlet (silver, "white wire"). Connect wires to each of the common connections of the relays and connect both to the line side of the line cord (narrow blade) with a wire nut. Run wires from each of the NO contacts on the relays to the line-side outlet connections.
There are two slots on the side of the case. The larger one is for the line cord; the other is for the four GPIO connections. Depending on your line cord (I bought mine from Home Depot), the slot may or may not provide any strain relief. If you're worried about that, knot the conductors before wiring them up.
The case mounts to the Creality's 2020 extrusion using two M5X10mm screws and T-nuts. I secured the top to the case with four #4 X 5/8" screws.
THE AUTHOR OF THIS DESIGN ASSUMES NO RESPONSIBILITY FOR INJURY OR DEATH RESULTING FROM BUILDING, ASSEMBLING, OR USING THIS DESIGN. USE CAUTION WHEN WIRING AND TESTING. NEVER WORK ON A POWERED CIRCUIT.
I use this box to remotely control lamps for each of my 3D printers.
UPDATE: I was controlling fluorescent desk lamps with this device, but no more. Switching on a fluorescent light creates enough hash to scramble the RPi and stop the print. I now control LED lamps such as:
https://www.amazon.com/Feit-Electric-CTC40-927CA-FIL/dp/B07YT71BGW/
These cause no problems with electronic interference.
I also created this lamp mounted on the CR10S 2020 extrusion:
https://www.thingiverse.com/thing:4799111

Tags