As an improvement of the previous circuit, we have this version with two transistors. Voltage and relay can be changed, and we must place a 10k resistor in series with the input.