solar cell as control voltage.

Thread Starter

Nisse33

Joined Feb 26, 2021
10
Hello!
I'm currently learning PCB design and electronics, quite new to the area. I have a function that I want in my circuit that would I need some guidance on how to make this work efficiently. The pcb will be in an enclosure outside with the solarcell placed on the lid.
I want the circuit to consume as little current as possible.. I'm not interested on using an microcontroller.

What i want:
I want a high signal when it starts to get dark outside. my original idea was to use an LDR, but to reduce the components outside the enclosure I've been thinking about using the solarcells voltage to indicate how dark it is.

Down below i have attached two suggestions on design. Please keep in mind that the circus are not complete, I've made them just for displaying purpose here in this forum.

1. The first circuit. My guess is that this will probably not work as the circut uses two different negative terminals (solarcell-negative & battery-negative)?
I would love if someone could educate me on how this works

2. the second circuit. I believe this works as long the optocoupler diode can handle the current from the solarcell.
But the optocoupler is quite expensive so if there is another more costeffective solution i would be really happy

Thanks in advance!
// Nisse
Direkt solcell.pngoptocoppler solcell.png
 

AlbertHall

Joined Jun 4, 2014
11,960
Hi @Nisse33, and welcome to AAC.
I think circuit 1 would work if all the grounds are connected together. You may need a potential divider between the solar cell and the comparator IN- to keep the input within the common mode specifiation. You may need to add some hysteresis to the comparator to ensure a clean switch when the light level changes.
 

sghioto

Joined Dec 31, 2017
3,061
Use the other half of the chip to provide the hysteresis. Have you measured the voltage on the solar cell when it starts getting dark? I believe it will be much higher then 1 volt.
Agree with above, first circuit will work. No need for the optocoupler.
 

Thread Starter

Nisse33

Joined Feb 26, 2021
10
Hi @Nisse33, and welcome to AAC.
I think circuit 1 would work if all the grounds are connected together. You may need a potential divider between the solar cell and the comparator IN- to keep the input within the common mode specifiation. You may need to add some hysteresis to the comparator to ensure a clean switch when the light level changes.
Thanks alot, I will try it out and see if it works!
//Nisse
 

Thread Starter

Nisse33

Joined Feb 26, 2021
10
Thanks for the confirmation, I will try it with the solarcell, I thought that i would mess something up if i connected the solar negative somehow... I've checked my whole complete circuit now and it makes sense that it should be possible to connect it!

As for the hysteresis, I've been thinking about using the other side of the comparator to something else...
but maybe i just need to put another chip or a bigger one in there to get one extra channel.

I've almost managed to get the function i want from the comparator on a breadboard with the hysteresis and all.
Big thanks to @sghioto & @AlbertHall for the information that it is easy to add an hysteresis to the comparator, I did not know this.
But when I add the resistor and the hysteresis I only manage to get high output when in- <1V
what I really want is high output when in- >1V.
maybe there is another way to configure the comparator that i do not know of?


(Solarcell voltage 1V is just for displaying purposes)
Solar1.png
 
Last edited by a moderator:

Thread Starter

Nisse33

Joined Feb 26, 2021
10
What are the actual values of all those 'xx' resistors?
My current setup on the breadboard looks like this. I have not cared so much about the Resistorvalues as I'm Just testing the function. so I will need to fine tune the resistors when I get it right.

Thanks!value.png
 

Thread Starter

Nisse33

Joined Feb 26, 2021
10
When the output goes high what will it be driving, is it just the LED?
Thanks for the circut above!
Well the led is just for visualizing the function on a breadboard. The signal will actually be connected to a re-triggable 555timer, that then drives a high power led through a transistor. But that part of my circut i have already worked out!

Thats why i need high signal when sun is shining on the solarcell and low signal when it's dark outside. As the 555 output gets high when it's triggered with a low signal.
 

sghioto

Joined Dec 31, 2017
3,061
Thats why i need high signal when sun is shining on the solarcell and low signal when it's dark outside. As the 555 output gets high when it's triggered with a low signal.
In that case you don't really need the LM393. The 555 is a comparator, with the proper selection of components can do what you need directly.
Similar to this: R3 controls hysteresis.
1642025822469.png
 
Last edited:

Thread Starter

Nisse33

Joined Feb 26, 2021
10
In that case you don't really need the LM393. The 555 is a comparator, with the proper selection of components can do what you need directly.
Similar to this: R3 controls hysteresis.
Thanks a lot!
I will check out the 555timers internal components further and tryout the schematic you did provide me with.
I've lernt alot in this conversation, I'm relay grateful thanks!
 

tindel

Joined Sep 16, 2012
873
Something to note: When sensing if there is sun presence with a solar cell, you need to LOAD the cell and sense the energy, not the voltage. Solar arrays can deliver high voltages even when the sun is not out because other light sources nearby can provide full open-circuit output voltage (with little energy transfer).

Here's a fun circuit.
Pros: It consumes no power when the circuit is off (night). Additional energy from the solar array can be used for other uses (battery charging, probably).
Cons: lots of parts. Consumes a ~1mA when on (day), possibly making it poor for your application.
Note: R7, Q3, R8 can be removed if you can use the other polarity of logic. D2 can be removed and R2 adjusted appropriately. R1 and R2 need to be power resistors no matter what you do.
There can be a lot of variants of this circuit to do a lot of different things, but this should get the wheels turning.

Now let me describe the operation.
R1 and R2 load the solar cell.
When there is enough energy present on the array to sense the sun is really up, then enough voltage is available on the base of Q1 to turn the circuit on.
Q2 then turns on, as does Q3.
The D3 and R5 line provide additional current to the base of Q1 when on, providing positive feedback so that the circuit doesn't oscillate.

1642197842339.png

Fun fact (and humble brag): I used a similar circuit to sense sun presence when designing the charge controller for NASA's InSight mission to Mars. As the first equatorial lander to ever successfully land on Mars, we needed to turn off the charge controller when there was no sun to charge the batteries. To the best of my knowledge, this was the first 'smart' charge controller to go to space - although there are several solar powered rovers near the equator of Mars that could have used similar circuits.
 

Attachments

Top