-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSU Control via Raspberry Pi GPIO #3833
Comments
Thanks for the link @Hywelmartin ! Perusing that bit of code, I'm understanding some of the syntax and what's going on. It looks to be exactly what I want. Unfortunately there appears to be zero documentation about that Moonraker Plugin. Any help there? I see the information about discussing these things on Discord as well. I will join the Klipper Discord and ask around. Thanks! |
I have the same question. I want to control the power relay of the 3d printer using the raspberry gpio.
The control works if both mcu work. If printer board is turned off, then it is impossible ("// Printer is not ready") to control the raspberry gpio, to power up printer board. |
You can do it 2 ways, the klipper controls the pins using linux mcu or have moonraker control the pin. and you can also have linux_mcu and moonraker control the pins as long as they are not defined in both... Personally, I run linux_mcu and moonraker with separate IO pins defined. I use linux_mcu to query a HTU21D chamber sensor. I prefer it this way. I use a server PSU that supplies 12V via VSB to the RPi and I control the enable pins on the PSU via a 5v relay. When I turn on the relay, it powers up my SKR boards in my Voron. Here's how I do it: in printer.cfg (follow instructions from https://www.klipper3d.org/RPi_microcontroller.html#why-use-rpi-as-a-secondary-mcu) [temperature_sensor chamber] [gcode_macro QUERY_HTU21D] in moonraker.cfg Moonraker will give you a toggle on gpio22 on the RPI that your relay is attached to. It looks like this in mainsail |
Thanks! Your way with moonraker worked. Is there any way to send a command to moonraker from the klipper? For example, for automatically emergency shutdown or shutdown after the end of printing (from gcode)? The "linux_mcu" method doesn't work. As I said, if the printer board is not connected, klipper does not allow you send command for host mcu.
If printer mcu is off:
If printer mcu is on, rapspberry gpio works fine. |
Hello, It looks like there hasn't been any recent updates on this Best regards, ~ Your friendly GitIssueBot PS: I'm just an automated script, not a human being. |
Just started with Klipper after 5 years using various marlin versions on RAMPS the SKR 32 bit. I've always used a server PSU for all my power needs. The raspi is on 5v standby power so is always on and the standby enable is done on raspi gpio. |
Given our updated policy on github tickets (see https://www.klipper3d.org/Contact.html ) I am closing this ticket. -Kevin |
Hi, I'm not sure WHY Kevin closed this, that's a little abrupt. anyways, I'm in the process of migrating to moonraker/fluidd, and I found an answer to your question in moonraker documentation :
so I'm happy with that, as I have a relay on the bed's power just for safety, that is for now toggled via gcode->respond->octoprint action plugin->script to toggle the gpio .... seems I'll be able to symplify it ! |
Bruh moment |
Foreword: I'm super new to 3D printing, Raspberry Pi's, Linux, etc. Please explain like I'm 5, I will not be upset. I know enough to be dangerous, but probably not enough to come up with this solution on my own.
My Setup:
Raspberry Pi 4 - Fluidd, Moonraker, Klipper (Linux process MCU)
Creality Ender 5 Plus - Klipper firmware
My Background:
I just recently switched to Klipper and Fluidd web UI as an alternative to Creality firmware and Octoprint. I was running into issues with Octoprint creating little tumor blobs all over my prints, and my research led me to believe that it was due to the way Octoprint pipes date to the printer. Essentially it wasn't fast enough. I tried Octoklipper, but since the plugin is depreciated I decided to give Fluidd a go. Love it, nice and lightweight and web ui works well on both my PCs and mobile devices.
I just succeeded in getting a secondary MCU configured on my Raspberry Pi to allow me to use the Creality filament runout sensor that I've hooked up to the Raspberry Pi GPIO pins rather than the Creality main board.
My Goal/Request:
I had purchased a 1 Channel 5V relay with the intent to set it up in Octoprint using the PSU Control plugin. I wanted to make sure I had a more robust failsafe to protect against thermal runaway.
Since I now have the secondary MCU setup and I can utilize my Raspberry Pi GPIO pins in Klipper/Fluidd, I would like to setup a power shutdown fail safe using this relay, but I'm not sure where to begin. Any help would be appreciated!
I'd like to be able to use the already defined max extruder and bed temperature values to trigger the relay and kill power to the machine if those values are exceeded. I have no idea where to begin. Please help!
Log provided purely to appease the bot. Not needed or relevant to request.
klippy.log
The text was updated successfully, but these errors were encountered: