I'm doing a project with PiFace, but being a software guy my capabilities apparently end when it comes to a circuit to detect low voltage.

Basically, as far as I understand PiFace input port is +5V with 10kohm resistor. Connect it to gnd and it's "on".

My best guess is something like this, with the input port connected to the transistor. Id' just need to have the right values for resistors and the LED should cut the flow in case the voltage drops below say 4.5V... yeah, as I've said, I have no idea what I'm doing :-)

Is there a simple circuit that would actually work?

![enter image description here](https://i.stack.imgur.com/AZFma.png)