Jump to content

Auto shutdown / relay


Zeno

Recommended Posts

Any tips for what relay to use to really be able to shut the entire printer off from a klipper macro? 

Looking at the biqu(btt) relay power board..  looks decent, but any others to consider? Perhaps the Omron relay? 

(for an octopus board and a btt pico btw) 

 

Edited by Zeno
  • Like 1
Link to comment
Share on other sites

In my research into that, I've seen the Tasmota used as well as a standalone smart plug. I've also seen the Shelly 1PM used for an in-printer solution.

So far I haven't done anything for this, but I have an extra smart plug inbound right now (got frustrated trying to get the IKEA Tradfri to register with my hub--which it promptly did after its replacement was ordered 🤦‍♂️) so I might play with using it on the printer. Simpler than redoing the AC wiring and I'll find out if smart on/off is really useful to me.

  • Like 1
Link to comment
Share on other sites

On 11/30/2022 at 4:01 PM, claudermilk said:

In my research into that, I've seen the Tasmota used as well as a standalone smart plug. I've also seen the Shelly 1PM used for an in-printer solution.

So far I haven't done anything for this, but I have an extra smart plug inbound right now (got frustrated trying to get the IKEA Tradfri to register with my hub--which it promptly did after its replacement was ordered 🤦‍♂️) so I might play with using it on the printer. Simpler than redoing the AC wiring and I'll find out if smart on/off is really useful to me.

Curious to here about your findings. 

If I do longer prints when I'm not home I like to keep up to date via a telegram bot. But when it is done i'd like to actually shutdown the printer entirely instead of it just idling for hours on end.

Is this so unique? what do others do? 

Ordered a BTT relay module btw, they are on sale, see what I think of it 

image.png.745118d94b9cf1252dc03b8f580d77b5.png
https://biqu.equipment/products/bigtreetech-reply-v1-2-automatic-shutdown-module-after-printing?_pos=1&_sid=70b64c839&_ss=r

Edited by Zeno
  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

To shutdown the Pi I'm using the pimoroni  on-off-shim (https://shop.pimoroni.com/products/onoff-shim?variant=41102600138). With a push-button in the printers skirt I can turn on and off the printer and since the pimoroni cuts power on shutdown it can also be shut down by software from klipper.

For the relay I'm using an omrom G2RL-24 DC5  to control the 24V supply and that is switched directly from the Pi's 5V power (from the on-off-shim). The 5V Meanwell supply is always on.

Make sure you switch both mains wire, not just one or the PS might float on dangerous mains potential! Certainly an issue if using a plug that can be used in either orientation like Germany's Schuko.

Link to comment
Share on other sites

On 12/18/2022 at 6:36 PM, idonasch said:

For the relay I'm using an omrom G2RL-24 DC5  to control the 24V supply and that is switched directly from the Pi's 5V power (from the on-off-shim). The 5V Meanwell supply is always on.

I have the same setup with one of these cheapo relais: https://s.click.aliexpress.com/e/_DdsAFfD
Does the job prefectly!
To connect it, I did some soldering with a hole grid board. But they are also available as ready-to-use units:
https://s.click.aliexpress.com/e/_DD0foIF
https://s.click.aliexpress.com/e/_DCIfOgB

 

On 12/18/2022 at 6:36 PM, idonasch said:

Make sure you switch both mains wire, not just one or the PS might float on dangerous mains potential! Certainly an issue if using a plug that can be used in either orientation like Germany's Schuko.

Good point!
I'll better double-check my wiring.

Link to comment
Share on other sites

  • 1 year later...

 

https://www.thingiverse.com/thing:6515355/files

 

SAFE SHUTDOWN CIRCUIT

 

Add “Shutdown” Macro to Klipper printer.cfg

 

[output_pin PS_ON]

pin: PE11

value: 1

 

[gcode_macro POWER_OFF]

gcode:SET_PIN PIN=PS_ON VALUE=0

 

Add GPIO functions to RPI; sudo nano /boot/firmware/config.txt (or sudo nano /boot/config.txt)

dtoverlay=gpio-poweroff,gpiopin=26,active_low=1

dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up=gpio-shutdown

 

Set timer relay to “F4” 25 seconds.

 

OPERATION / LOGIC

 

Front panel momentary push button switch, provides 5vdc from Mains Relay to the Timer Relay which starts the supply of power for 25 seconds.

 

RPI boots, and closes the Hi/Lo Relay which is connected to the Mains Relay, which latches the power “ON” while the RPI is booted. The 25 second timer allows for rebooting of the RPI by ssh.

 

Second Hi/Lo Relay provides a safe shutdown of the RPI. PE11 provides 3.3v to the second relay and opens the GPIO 17 connection to ground. The “Power_OFF” macro allows the relay to close, RPI starts safe shutdown, 25 seconds later printer powers off.

 

RELAY JUMPERS


Mains Relay - Jumper Lo
Hi - Lo relays - Jumpers Hi

 

RPI needs common 5v ground with Octopus board, best if RPI is powered from J26

 

SOURCE OF PARTS

 

Delay Timer

https://www.amazon.com/gp/product/B07XT7XWTC/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

 

Hi/Lo 5v relay

https://www.amazon.com/gp/product/B07WQH63FB/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1

 

Mains Control Relay

https://www.amazon.com/gp/product/B077W1NVLM/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

 

Momentary 19mm Push Button

https://www.amazon.com/gp/product/B0C36T7KPC/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1

 

Complete Safe Shutdown Circuit.jpg

RPI Klipper Safe Shutdown Circuit.pdf

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...