PS-ON no power on output pin

I have a Manta M8p 1.1 and a Btt relay 1.2 I have them connected but it will turn off after 10-15 seconds like it should when there is no power to the relay pin. I have checked wiring and it seems there is no signal on the output pin of the Manta. Do I have to configure the PC3 pin so it will be on when i boot the printer. How can i check if it is being configured when it boots? I don't know how to check to see how the mcu is set.
15 Replies
blacksmithforlife
what is this relay for? Can you provide a picture of how it is wired and your printer.cfg?
Synapsis
SynapsisOP11mo ago
It's the BTT Relay 1.2 or auto shutdown connected to the board so it can shut down the power after a print. This is Manta version 1.0 but the pins are the same. I tried to mesure a signal on boot but there is no signal and the auto shutdown will cut power. I still have to set it up in the printer.cfg but basically its just tell to cut the signal so the relay will switch off. Line out goes to my power supply.
No description
blacksmithforlife
yeah you aren't going to get a signal until you configure klipper to turn that port on always. Not sure how you would do that, and the BTT github only shows an example for marlin
Synapsis
SynapsisOP11mo ago
From what little I was able to find they talked about setting the pin so on boot it was active, People are using on other boards. Klipper is just to tell it when to shutdown. Because it never gives enough time for the system to start up. They talked about the mcu and setting it there.
blacksmithforlife
Sounds like you are going to have to change the configuration settings that get compiled and flashed to the MCU which Rat-OS handles for you
Synapsis
SynapsisOP11mo ago
Question if I start the printer without the relay and then activate in the printer.cfg the pin would that work or that file is loaded only after the system has started?
miklschmidt
miklschmidt11mo ago
This is way more complicated than you think it is. 1) Setting pins in klipper only activates those pins when klipper is started. You need to set it in firmware and in your config, and manually compile and flash your board. 2) This is a sure fire way to kill your sd card. You'll have to set up a signal to the pi and write a script to detect power loss from the output pins on the relay and safely shut down, assuming it'll do that in the 10-15 seconds before the relay cuts power (if it isn't properly shut down, you'll corrupt your file system).
Synapsis
SynapsisOP11mo ago
Sounds Like I better let need I wrote to Btt but that's even more complicated than what you said. Never seen a support so bad. Thanks for the help. Ok so what ifound was this but have no idea of how to do that. "When building the firmware if you set pin pc3 high on startup it will fix the issues with the relay board" Ok I have connected a switch to the 5v reset connector on the relay, When I keep it turned on until the system boots it sets the PC3 pin to high so that when I turn the switch off the printer stays on.. I wanted to use something like this but put in the command to do a system shutsown. "[gcode_macro END_PRINT] gcode: # Turn off bed, extruder, and fan M140 S0 M104 S0 M106 S0 # Move nozzle away from print while retracting G91 G1 X-2 Y-2 E-3 F300 # Raise nozzle by 10mm G1 Z10 F3000 G90 G1 X10 Y330 F1000 # Disable steppers M84 G90 ; absolute positioning TEMPERATURE_WAIT sensor=extruder maximum=60 SET_PIN PIN=PS_ON_OFF VALUE=0; shut down the printer What is the command to shutdown the printer?
miklschmidt
miklschmidt11mo ago
RatOS already has an endprint, and it has user hooks for your own functionality: https://os.ratrig.com/docs/configuration/macros#_user_end_print_park
Configuring RatOS Macros | RatOS
RatOS comes with a bunch of flexible predefined macro's that can be customized via variables and macro hooks.
Synapsis
SynapsisOP11mo ago
Yeah I saw that just wanted to add a Pin state change and then have it do a system shutdown. somethin like " [output_pin PS_ON_OFF] pin: PC3 value: 0 then do a SYSTEM SHUTDOWN which I do not know the command also would I have to add this in the Gcode manually when I want IT?
miklschmidt
miklschmidt11mo ago
The output pin should be configured in printer.cfg, then you can set the pin value via the SET_PIN gcode command: https://www.klipper3d.org/G-Codes.html#set_pin To shutdown the system you can use a moonraker action: https://moonraker.readthedocs.io/en/latest/configuration/#reboot-shutdown-from-klipper So for example in _USER_END_PRINT_PARK:
[gcode_macro _USER_END_PRINT_PARK]
gcode:
SET_PIN PIN=PS_ON_OFF VALUE=0
{action_call_remote_method("shutdown_machine")}
[gcode_macro _USER_END_PRINT_PARK]
gcode:
SET_PIN PIN=PS_ON_OFF VALUE=0
{action_call_remote_method("shutdown_machine")}
Would probably have been handier with a user hook that runs at the very end of endprint but should work You might want the shutdown command in a separate macro as that gets called when the template is evaluated, so before SET_PIN has been called.
sergelhr
sergelhr11mo ago
You must change the firmware.config with that value CONFIG_INITIAL_PINS="PC3" and make a new firmware for your manta board otherwise the relay will relax before klipper kick in
Synapsis
SynapsisOP11mo ago
Thank to both , and yes I know that I have to make a new firmware but I have no idea of how to do that. I setup the board using the Rat Rig configurator so OI have no idea of how to add that.
sergelhr
sergelhr11mo ago
You can like me make a fork of RatOS-configuration, and change moonraker.cfg to your own git et voila for an example see my fork https://github.com/sergelhr/RatOS-configuration; so far it is working great for both manta 8p 1.1 and v2.0 until the next ratos release where board-definition.json has change, but for now is good to go
miklschmidt
miklschmidt11mo ago
It's not a supported feature in RatOS 2.0, so you'd have to do what @sergelhr suggested above.
Want results from more Discord servers?
Add your server