Joined March 2012

Craig McNamara

Lead Engineer at Caring
San Mateo, California

With run_locally you can define local tasks and add them to your workflow as dependencies.

So the +5v isn't GPIO, GPIO is all at 3.3v. The +5v pin on the Pi is directly connected to the VCC from the USB power. I'm not using any sort of resistor between the Pi and the Relay Module. Mind you I'm using a relay module and not a bare relay. The module includes an isolated control circuit that runs on 3.3v and a separate 5v circuit to actually run the relay coils. The only thing that you should worry about is how much current your power supply is capable of and how much current your relay will draw. Remember, the relays in the module I used are negative triggered so setting the GPIO pin to LOW activates the relay.

@djmax I used a relay module, I'm not directly switching the relay with the control pins. The relay module has a +5v circuit that powers the coils and a separate 3.3v circuit to control the switching. To my knowledge the +5 pin comes right in off the USB power connector.

The 2 separate pins on the relay module should be connected to Pi+5 => VCC and PiGround => Ground. The VCC on the signal pin header should be connected to +3.3v, you don't need to worry about the ground in the signal header if it's all controlled by the Pi. Setting the signal pin to LOW in software should activate the relay. You should be able to hook up the power pins and test the relays by jumping a signal pin to ground.

I think that you can solve that in software. The relay only activates when the board is powered and the pin is set to low. Low doesn't mean power off, low means input voltage in relation to VCC. From what I've read, the "activate relay on low" feature is to mitigate power-up "flutter" in which the relays would be in an indeterminate state or actually fluttering on boot. The relay won't open if the Pi looses power unless your lock depends on the active state to be locked and that seems bad to me. Wrap the GPIO library so that your code thinks of a low as unlockable. P.S. if you look at the relay out schematic there are 3 poles per relay and one is activated while in the default state and the other is active in the "Active" state. I hope this helps.

974 Karma
85,757 Total ProTip Views