Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help needed with a basic photoresistor on/off circuit - 12v DC

Status
Not open for further replies.

hoghunter

Member
I'm a newbie....;) and could really use some help. I have a project that will be powered by (3) 18650 li-ion batteries in series. I will have an ON/OFF rocker switch that a user will turn to the ON position during daylight hours. Then, at dusk/dark, the power will flow thru the circuit triggered by a photoresistor. I simply want power to be ON or OFF based on the photoresistor's resistance..... very basic, right? I currently have a 'photocell module' from a basic outdoor light sensor. It has a relay, transistors, mosfets, capacitors, resistors all over the small PCB. Can I handle my ON/OFF needs in a simpler way? I am currently waiting on some photoresistors, some 2N3904 transistors and assorted resistors to arrive so I can put something together.... I found a circuit while doing research yesterday that might be what I need to follow, but wanted to confirm with the knowledge base here..... any suggestions or ideas are much appreciated. Thanks -John

BTW, I understand that the current will flow via the POLR. This particular schematic I found incorporates a small LED and I assume that is why there is a 2.2k Ω resistor in line. Ultimately, in my project, the 12v will power a few different lower voltage items (5v) as well as (2) high power 3w LEDS. I will have a step down and LED driver as needed, downstream.


images
 
Your schematic symbol is that of an LDR (light-dependent resistor, or "Photoresistor") but you call it a photocell. A photocell is not an LDR. A photocell generates DC when exposed to light.

But either way, your schematic is backwards. When it gets dark, R2 as an LDR increases in resistance and turns off T1. Or, when it gets dark, R2 as a photo-voltaic cell stops producing DC and T1 turns off.

It is possible to rearrange things so the logic polarity is what you want, but the loads will turn on very slowly as daylight decreases, not snap on when it gets dark enough. Beyond the parts for its particular application (relay output. etc.), the module you took apart has all of those parts because that's what it takes to do this task.

ak
 
You should get an LDR, Light Dependent Resistor, not a photocell. Like this

How much current do you need to switch when it gets dark?

How do you prevent over-discharging the battery pack?
 
Last edited:
You should get an LDR, Light Dependent Resistor, not a photocell. Like this

How much current do you need to switch when it gets dark?

How do you prevent over-discharging the battery pack?
I want to go from zero to 12v at dusk. Just like a security light might do, turning on in the evening.
As far as the battery charging, I have ordered a few of these... **broken link removed**
 
As Nigel suggested, I have added an 'LDR comparator circuit' to my schematic (the one up above is not mine, it is just an example off the web). After I find a place to stash screen shots, I can show you all what I have at this point.
 
So, a photocell's resistance decreases during daylight allowing current to pass and an LDR's decreases as it gets dark. allowing a light to be illuminated.
Is that it in a nutshell?
 
Stash your screen shots here. I do it all the time...
I want to go from zero to 12v at dusk. Just like a security light might do, turning on in the evening....
I already knew that you want to switch ~12V. I asked how much current your load requires?

How do you prevent overdischarging the battery if the battery runs out before the sun comes up? Overdischarging LiOns just once makes them unuseable.
 
I found this circuit for a 'light on' during the day condition. It stated that the LDR and 10k resistors would be swapped to have the LED illuminate after dark.
I found it along with this article: https://www.resistorguide.com/photoresistor/#Sensitivity
Is this considered an LDR comparator circuit? Should I follow the diagram below, but swap the LDR with the two 10k resistors? Thanks again for the help.

LDR-circuit.png
 
Stash your screen shots here. I do it all the time...

I already knew that you want to switch ~12V. I asked how much current your load requires?

How do you prevent overdischarging the battery if the battery runs out before the sun comes up? Overdischarging LiOns just once makes them unuseable.
My mistake, I believe it is less than 1 amp but will have to verify. Also, I was instructed, in another post here from yesterday, to use the item I linked above to prevent overdischarging. If that is not correct, please let me know.
 
Photocell is the name we called an LDR, back in the 1860's They are both the same.
Maybe in Australia ;)

That's ok, Colin. English is not my native language, but I learned to speak it in Australia between 1948 and 1958...
 
There was a long running Forum thread on this topic. I posted several circuits if you follow the thread for all four pages. The 12V circuit is in post #64.
 
Last edited:
So, a photocell's resistance decreases during daylight allowing current to pass and an LDR's decreases as it gets dark. allowing a light to be illuminated.
Is that it in a nutshell?
Nope. A photocell is not a resistor, it is a generator; its output current increases during daylight. An LDR is a resistor whose resistance *in*creases as it gets dark, stopping current flow.

ak
 
There was a long running Forum thread on this topic. I posted several circuits if you follow the thread for all four pages. The 12V circuit is in post #64.
Mike/Nigel, I will refer to the post #64 that Mike mentioned and get this circuit fixed. I'll then paste a screen shot for you guys to look at.
I really appreciate all of your help with this. I am a structural designer by trade and know little about electrical circuits, but am learning a lot, quickly.:confused:
 

Attachments

  • upload_2017-7-8_10-55-49.png
    upload_2017-7-8_10-55-49.png
    15.9 KB · Views: 128
I've got the light sensor function taken care of, but am now having an issue with a motion sensor :arghh:. I've got one of these connected to trigger the LED on. I have it connected to a breadboard along with a 2v, 20ma 5mm led. I'm feeding the sensor with 5v and the led with 3.3v with 68 Ω on the + side. I have a 2N3904 transistor on the neg side with the gate triggered by 3.3v from the signal pin on the sensor. My issue is that the led will come on for approx 3 sec, then off for approx 6 sec, then back on and will continue doing this. It seems like there is some voltage bleeding through somewhere and loading a capacitor or something. Any suggestions for troubleshooting? Thanks.

images
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top