I have one relay and two power sources. The first is a cellphone charger and the second is the HIGH signal from a GPIO on a Raspberry Pi.
- If any one of them supplies power the relay is on.
- If both supplies power the relay is on.
- If the cellphone charger is disconnected and the GPIO is LOW, the relay is off.
I have tried to isolate the schematics in the image below.
Will this work? Do I need the 2 diodes? Why/why not?
The following is a complete schema of my assassin solution. As you can see there is a Adafruit Powerboost 1000c. The EN pin is relevant to this question.
According to documentation:
EN - this is the 'enable' pin. By default it is pulled 'high' to VS. To turn off the booster, connect this pin to ground. The switch can be as small as you like, it is just a signal. Contrast this to an inline power switch which would have to be able to handle up to 2 A of current! When the chip is disabled the output is completely disconnected from the input.
The pink parts are the parts relevant to this question. The photo on the far right is a little box that controls the radiators in my cabin. Just added it so you get the full picture.