PSU Control don´t work for no reason

Hello,

i try to get PSU Contol working and installed the Relay´s.
Installed a new Octoprint
Updated everything and installed PSU contol
Selected GPIO 17 (wich i connectet)
Restart

and now it doesnt switch the pin, it only powers the pin if its selected but i cant turn it off. (the lightning switches but the power not)
If I "unselect" the PIN 17 it turns off after a restart...

Can somebody help me? I have no ideas left whats the problem...

Thanks

Daniel

If you probe the pin with a multi-meter do you see 3.3V when on and 0V when off?

If the PIN is configured correct it has allways ~3,3V
(still connected)

Sorry not sure what you mean. With the power icon toggled on you should see 3.3V on GPIO 17. Then when you turn it off via the power icon it should read 0V. If it's not doing that then you might have a hardware issue or config issue.

Supplying more info(hardware used, logs, pictures, etc...) would help.

Did you connect to GPIO 17 (that is pin 11) or pin 17 (that is 3.3V)

grafik

I have connected GPIO 17.
If i chose a different/wrong PIN, for example GPIO 22 it doesent powers the Relay...

(logs are in work)

Hardware:
Raspberry PI 4
2 Relays for 220V

Sidewinder X1
SKR 2

Just for info: What PSU Control plugin have you installed?

Normal PSU Control 1.0.6

octoprint.log (105.9 KB)

If i connect to a second PIN GPIO 27
octoprint (1).log (169.9 KB)

There is an error :

2022-01-18 21:45:39,656 - octoprint.plugins.psucontrol - ERROR - Exception while setting up GPIO pin 17
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/periphery/gpio.py", line 592, in _reopen
    fcntl.ioctl(self._chip_fd, CdevGPIO._GPIO_GET_LINEHANDLE_IOCTL, request)
OSError: [Errno 16] Device or resource busy

Have you tried to add this?

It's an unchecked condition. Normally you can't set a pin to be both an input and output. RPi.GPIO allowed for this in it's internal code.

@Saturnzwerg

Before you go down this path try to get the relay to work with Sensing set to Internal. Configuring sensing to anything other than Internal just adds more complexity.

What is the model relay are you using? Link?

1 Like

There with Internal.
The same Problem again. It doesnt go to 0,0V
octoprint (2).log (183.3 KB)

The Relay: https://www.amazon.de/dp/B07VYX5GK4/ref=cm_sw_em_r_mt_dp_ZVJPKPARAP2HYHBV1Z4T?_encoding=UTF8&psc=1

With RPi.GPIO
octoprint (3).log (214.0 KB)

According to the log the plugin is switching GPIO 17 without an issue. When you check GPIO 17 with a multimeter you should see the pin change between 0V and 3.3V as you click the toggle button.

Is your relay set to HIGH or LOW mode?

If you connect the relay signal pin to the Pi PIN(NOT GPIO) 1 the relay should turn on. Then if you connect the relay signal pin to the Pi PIN(NOT GPIO) 9 the relay should shut off.

If i remove the Signal it turns off
If i put the signal on PIN 9 (Board) its still off
If its on PIN 1 (Board) it turns on

Everything behaves as it should but not the PIN 17 (GPIO) (it seems so, i have no multimeter here at the moment)

Have you tried pin 11 (board)?

Its 11 (Board)/ 17 (GPIO). Yes i tried and its always powered if the Signal wire is on this Pin and the PIN is configured. I cant turn it off....

In every log I find:
periphery.gpio.GPIOError: [Errno 16] Opening input line handle: Device or resource busy