kantlivelong / OctoPrint-PSUControl

Smart control of your power supply via GPIO, GCODE Command, System Command, or variety of sub-plugins.
GNU Affero General Public License v3.0
203 stars 113 forks source link

Doesn't work with active low relay modules #232

Closed luizbgomide closed 2 years ago

luizbgomide commented 2 years ago

That is not a PSU Control issue per se, but could be a problem to many people.

What were you doing?

Trying to deactivate a low trigger 5V relay (VCC to +5, GND to ground and signal to a GPIO pin).

What did you expect to happen?

That the relay would open when the GPIO was high.

What happened instead?

It doesn't open, because the 3.3V from gpio is not high enough, so the relay remains always active no matter the GPIO pin state.

I'm not sure if there is some way to use a low active relay with raspberry without some additional electronics (like what!?), but it is better to know that in advance...

kantlivelong commented 2 years ago

Pretty common issue. I've seen some guides out there to mod 5V relays to work with 3.3V logic. Really it's up to the user to buy the appropriately spec'd relay.

luizbgomide commented 2 years ago

Yes, it is very common. Which is why I think that maybe a notice warning of that possibility (or even a link to a "solution"), otherwise the user will be totally at lost unless he knows what is looking for to diagnose the issue... :/

kantlivelong commented 2 years ago

https://github.com/kantlivelong/OctoPrint-PSUControl/wiki/Troubleshooting#common-issues