Powering up Arduino!

Hi guys. I drawn a circuit for powering up my arduino and I am not sure if it will work in the way that I want it to be. So basically my objective is to provide a regulated 5V power supply to the Arduino. I have two power sources - a 20W solar panel with 20Voc 16.9Vpmax and a 7.5V wall adapter. I would like to power the Arduino using the solar panel whenever's possible, and only if it is getting dark, the circuit should switch to the wall adapter. Then as soon as the sun raise back in the morning, the circuit would switch back to the panel. This is the most efficient circuit I can think of, but I am not sure if it will actually work. Any input would be appreciated! Thanks!


You've drawn a circuit, but you're not going to bother showing it to us?

Ok, the problem with your circuit is that D3 is backwards, and R7 is too low a value - it should be 17.36552K? precisely.

Oh I'm sorry. I thought I've already posted the picture. My computer can display the picture just fine so I didn't know you guys can't see it. Please go to the link below for my circuit. Thanks! http://postimg.org/image/o5qrdebkv/

Ok, but it would have been better to just attach the image using the "additional options" link below the posting box...

It's very similar to how the Arduino selects between Vin and Vusb. The only difference is that it monitors the incoming voltage, not the regulated voltage.

Personally I would take the incoming pre-DC/DC voltage and use a voltage divider to bring it down to a comparable voltage to the wall wart voltage. That way you can set a specific cut-off voltage to switch over to the wall wart.

Solar panels supply varying voltage AND varying current. The voltage could be high enough to give the required 5.7V out of the DC/DC converter, yet not enough current to drive the Arduino. In that situation your system would be switched to the solar panels, and the Arduino would fail through lack of current. By monitoring the raw solar voltage you can ensure that there is enough sunlight to give enough current to power the whole system.

And yes, you need the diode. The DC/DC looks like it gives 5.7V - the diode will drop the extra .7 ish volts bringing it down to the 5V required by the Arduino. Kind of a poor-man's LDO regulator.

Thanks for your response! Yes, I totally forgot about the current... but I thought the voltage would start dropping when it can't produce enough current. So if I feed the pre-DC/DC voltage to the OpAmp the current will be taken care of? Also, for the DC/DC converter, its output voltage is adjustable. I can configure it to produce any voltage I want, as long as it is lower than the input voltage. I am not sure what is going to happen if the output voltage is higher than the input voltage, so I decided to set the output voltage as 5.7V and a forward diode to subtract 0.7V. But again, I do not know if it is necessary. Do you think I can just set the DC/DC converter's output voltage as 5V and get rid of the diode?

This is the converter I am using: http://www.dhgate.com/lm2596s-dc-dc-step-down-module-35-v-turn/p-ff80808133cfcdc10133fdc66906743f.html

I would say it's better to have the diode than not have the diode, and for the cost of a diode, it's not worth worrying about.

Yes, the voltage will droop as the current draw exceeds the supply, but the input voltage will droop more and sooner than the output voltage, so you can set your switching level to be that more reliable voltage droop. I would also think about adding some kind of delay to the switching, or it might oscillate:

Light drops Current demand exceeds supply Voltage drops Switches to wall wart Current demand drops to 0 Voltage Rises Switches to solar panels Current demand exceeds supply Voltage drops Switches to wall wart Current demand drops to 0 Voltage Rises Switches to solar panels ... etc

Thanks again! For the delay, would adding a large capacitor from the 5V pin to the GND pin work?

I'm thinking more like a 555 timer or something so once it switches over it stays switched over for some time - like minutes.