Power Switch
A collection of two relays, two diodes, one resistor and a toggle switch to safely power down the RaspPi.
NB. R2 must have a 3.3V coil capable of switching with about 5mA. R1 must be suitable to whatever you are switching.
You should also have reverse-biased diodes in parallel with each relay coil, 1N4001 would probably be good. The lines on the case should be on the side away from GND. A resistor in series with GPIO A is also probably a good idea. 1k would probably be suitable.
Why not put SW1 in place of R1 ?
I have designed same circuit except only use one relay
dont let the software service control R2, just a high-while-pi-on 3.3 or 5.5v pin
When pi powers up, 5,5v pin active R2, when makes a soft-shutdown goes low (0v) and cut off R2
You are right; R1 is superfluous because SW1 could switch the power directly.
I don't believe there is a signal "high-while-pi-on" — certainly not on the B. That is the signal that you make on a GPIO pin.