I'm exploring various ways to detect higher voltage using the Pi and have come up with a circuit where the 5v would energize the coil of a relay which would switch 3.3v from the Pi's internal 3.3v supply pin to a GPIO pin.
The 5v will be from a standard wall adapter rated for 1amp and will only be on for brief periods 20-30m weekly.
Is this a viable circuit?
I'm mainly concerned about the load on the GPIO pin - do I need a resistor to limit the current from the 3.3v supply?
simulate this circuit – Schematic created using CircuitLab