LDR Darkness Sensor Circuit

Thread Starter

Snarg

Joined Aug 20, 2021
8
Hello,

I hope everyone is doing well.

I'll start right off with I only have the dimmest grasp of what I am doing. Although what I want to do seems simple, I'm not sure I know how to do it. I do believe I come to the right place to get the help I need :) So, let's get started, shall we?

I am looking to build a simple LDR darkness sensor. I would like to use a 9V battery to light up some LED lights. Simple, right? I even have a YouTube video showing me how to do it. Couldn't be easier, right? Well, here is my problem: I am not using the same light in the video so I do not know what value resistor(s) I need. Back in the gold 'ol days I could have run down to the local Radio Shack, bought a pile of resistors and just kept plugging them in until it works. However, this is the era of online-everything and I don't have that luxury anymore.

I mean, sure, if I knew the math behind basic electronics, this would be a breeze. However, I don't so, here I am...

So, enough with that. The link to the video containing the circuit I am looking to build. There is also a link to the lights I am using. I would like to use 3 or 6 of the lights from the string.

What I would like to know is what value resistors(s) do I need?

Thank you for your time and have a great day.

Circuit:

Lights:
https://www.amazon.com/gp/product/B00WQFP3AO
 

AlbertHall

Joined Jun 4, 2014
11,595
As far as I can tell the strip of 3 LEDs will need 12V at 15mA. So you can use the circuit from the video except that you will need a 12V supply not a 9V battery and you will not need the 1k resistor in the transistor collector. The other resistor can be the same.
 

Thread Starter

Snarg

Joined Aug 20, 2021
8
Your 300 LEDs use 18W at 12V which is a current of 18W/12V= 1.5A. Then you need a fairly large 12V battery and the transistor powering the 300 LEDs must be a power transistor. The BC547 transistor can drive the power transistor.
There seems to be a misunderstanding. I wish to use 3 or 6 lights off of the string, not the entire string :)
 

Audioguru again

Joined Oct 21, 2019
3,833
I deleted my reply when I see that you need only 3 or 6 LEDs from the 12V LED strip of 300 LEDs.
But it needs 12V, not 9V. Nobody makes a 9V LED strip.
An ordinary new Name Brand 9V alkaline battery does not have much power so it can light 6 little LEDs in 3 series pairs, each with a resistor fairly brightly for only 11 hours dimming all the time as the battery runs down.
 

Thread Starter

Snarg

Joined Aug 20, 2021
8
Thank you for your assistance so far. Currently, I may not be able to do what I had planned, at all.

I do a lot of 3D printing and the thing I like doing the most is something called a, "lithophane". They need to be backlit in order to show the image. Traditionally, this is accomplished using 12v led strips cut into sections and powered with a 12v plug in power supply.

I was hoping to be able to, 'cut the cord', and come up with some type of battery powered option. It seems this may not be possible...

Side note, and related to my original question, how would the original circuit look using 12v power?

Again, thank you for your time.
 

Audioguru again

Joined Oct 21, 2019
3,833
Eight AAA alkaline cells can power 6 LEDs on a 12V LED strip for 10 to 15 hours, dimming slowly the entire time.
The battery will last much longer if a blinking circuit is used.
 

Tonyr1084

Joined Sep 24, 2015
6,452
Welcome to AAC.

You could use a small sealed lead acid (SLA) 12 volt battery. The only thing you don't want to do is run the battery dead. Doing so will cause sulfates to build up on the plates and the battery will become useless. Another thing about SLA's is they need to be regularly charged - even if they haven't been used. I charge mine every 3 or 4 months just to keep them healthy. Failure to charge them will also result in sulfating of the plates.

Those car jumper units you can buy and throw in your trunk - if you don't charge them regularly they won't work. I've given a couple of them as Christmas gifts and when they were needed they didn't work because the recipients of the gift never charged them. "The test lights say it's fully charged." Full charge in this case means it's at 12 volts. However, its capacity to deliver its charge is diminished drastically because the plates have sulfated.

Best advice I can give is that instead of cutting the cord you use the cord. Plug in. That way you always have a source of light for your project. Depending on batteries can sometimes leave you in the dark. But then again, you are looking to build a "Dark" sensor.

Another thought that comes to mind - if you build a light sensor circuit and you go out of town for the weekend, what happens to your batteries while you're away? Are the lights on? Does the light in the fridge go off when you close the door? How Do You Know? OK, we all know the light goes off in the fridge. And a main power switch (or removing the batteries) will prevent you from running down the batteries. Just food for thought.
 

Tonyr1084

Joined Sep 24, 2015
6,452
Now, if you WANT to use a 9V battery, the math is simple enough. Suppose you have three LED's in series - each LED has a forward voltage drop. Depending on the LED used, they can typically have a 3 volt forward drop in voltage. So using a 9V battery to light three LED's in series, each with a 3Vf drop - you're already close to a non-functional circuit. However, if you used a 12 volt battery - the math works out this way: Assuming 3Vf, you're dropping 9V through the LED's. That leaves 3V to be dealt with. Assuming you want to run your LED's at close to full brightness (typically 30mA) you choose to run them at 20mA, which is still plenty bright for what you want to do (I think). So 3 volts divided by 0.02 (20mA) = 150Ω. You would use a 150Ω resistor to limit the current through your LED's at 20mA. But you also need to consider the wattage. 3v @ 20mA = 60mW. A quarter watt resistor will handle that easily. A quarter watt resistor is rated to handle 250mW of power. Power is different from voltage and from current. It's actually the result of voltage multiplied by current; measured in "Watts". The designation "mW" is "milli-watts". 60mW is 0.06 watts. Same thing. The math is easy as long as you follow the steps correctly.

So again, welcome to AAC. Good luck with your project. Those LED strips - - - if you're good at it, you can remove the resistor and replace it with the appropriate resistor. Now, if you're really good with electronics you could go with PWM for brightness control. But now you move away from using a battery. PWM ? ? ? Pulse Width Modulation. That simply means "Time ON" versus "Time OFF". During a period of time the "ON" time can be 50% with the other 50% being OFF, you get half the brightness. Relatively speaking. The human eye is not good at detecting light levels. Those darn pupils. They open up to capture more light when the light is low, making it look like they're brighter than they really are. Anyway - gosh I'm so smart! No, actually, I'm fairly low on the skill level of electronics; and I'm not trying to show off. Just offering some information you might consider. Those LED strips??? They come with their own built in resistors to limit their current. And some of the power modules that drive them can have dimming circuitry inside them. Typically PWM.

Welcome.
 

SamR

Joined Mar 19, 2019
3,607
Once you learn to read schematics a whole new world opens up for you. The majority of "electronics videos" on YouTube are simply a waste of time. Here is one electronics site to peruse that is far better than the videos. Everything from very simple to complex designs that work. And this is only one example.
Circuit Finder - all electronic circuit diagrams in one place (circuit-finder.com)
Another excellent source is your computers browser! Here is an example from MS Bing when searching for LDR Circuit and displaying Images.
1629612409790.png
 

xox

Joined Sep 8, 2017
608
Hello,


I hope everyone is doing well.


I'll start right off with I only have the dimmest grasp of what I am doing. Although what I want to do seems simple, I'm not sure I know how to do it. I do believe I come to the right place to get the help I need :) So, let's get started, shall we?


I am looking to build a simple LDR darkness sensor. I would like to use a 9V battery to light up some LED lights. Simple, right? I even have a YouTube video showing me how to do it. Couldn't be easier, right? Well, here is my problem: I am not using the same light in the video so I do not know what value resistor(s) I need. Back in the gold 'ol days I could have run down to the local Radio Shack, bought a pile of resistors and just kept plugging them in until it works. However, this is the era of online-everything and I don't have that luxury anymore.


I mean, sure, if I knew the math behind basic electronics, this would be a breeze. However, I don't so, here I am...


So, enough with that. The link to the video containing the circuit I am looking to build. There is also a link to the lights I am using. I would like to use 3 or 6 of the lights from the string.


What I would like to know is what value resistors(s) do I need?


Thank you for your time and have a great day.


Circuit:



Lights:

https://www.amazon.com/gp/product/B00WQFP3AO

One issue with transistor-based circuits is that they are highly-sensitive to fluctuations in temperature and even external EMF fields. One step up would be a long-tailed pair but if you want a really stable circuit then just use opamps or comparators. If used correctly, they can generally be much more efficient than transistors.

The daylight detector stuck to my garage in fact is fed by a solar panel which stores power for the circuit in a large supercap. It hasn't once lost power in the past four years of operation. (I know that because of the little red LED indicator that flashes every few seconds.) Which is why I use them. Energy requirements can be drastically reduced.

You can see a basic overview of that old project here. It's pretty straightforward really. Just increase the resistances to improve economy. (The trade off being sensitivity.)
 

Thread Starter

Snarg

Joined Aug 20, 2021
8
Thank you everyone! I am learning quite a bit here.

So, abandoning the 9v idea (for now), this leads me to what I hope to be the last question on this subject (for now).

Using a 12v input and the LED's I originally linked to, would I be able to just add an LDR to the circuit and have it work?

Thank you for your time and, most importantly, patience.
 

Thread Starter

Snarg

Joined Aug 20, 2021
8
I am confused. The circuits so far already have an LDR.
I'm sorry, I was not very clear. I'll try and be more specific:

Using the LED's I have, is it possible to use just a 12v source, in combination with the LDR, and have it work as intended? Would I need to also include the transistor?

I hope that is more clear.
 
Top