DC voltage based auto-switching.

hello guys. Im making a semester project on an auto-switch using 3 sources of power. i.e. solar panel (60W), battery 12v (1.2Ah) and 220v AC supply (45W).

using a charge controller for regulating solar INPUT.

the Load is a 45W LED strip

also we have converted the AC supply into DC. because we have connected a DC load.

I have figured out rest of the working but having problem in coding the arduino for:-

1). detecting Voltage from 2 sources. (the battery should be giving output of 12v) 2). making sure that if the supply from battery falls below 9v then it should switch onto the 2nd supply.

Cool!

In order to get the best help here, show what code you have written so far, and show how your circuit is hooked up. Be sure to read the “How to use this forum” post at the top of the list of threads, so you will be ‘in the know’ about code posting and pictures.

Good luck!

I wonder how (long) you can power a 45W load from a 12V 1.2Ah battery.

You can use voltage dividers, to detect presence/absence or amount of voltage on the power sources. For presence of a voltage a digital input can be used, or an analog input and analogRead() for measuring a voltage. More details depend on your circuit, can you supply a circuit diagram?