I am working on a home project in which I need a cheap voltage sensor. I need an 8051 to monitor the voltage that I am getting from the wall. All I want to do is monitor whether the voltage is on or off. If it is on then I need to switch to a back up power source. I guess I could use a current sensor if need be. Thanks