Go Down

Topic: LDR Photoresistor and resistance (Read 1 time) previous topic - next topic

Bjerknez

Mar 29, 2020, 08:55 pm Last Edit: Mar 29, 2020, 08:57 pm by Bjerknez
I'm going to order some photo resistors like this:

https://www.aliexpress.com/item/32760631393.html?spm=a2g0o.productlist.0.0.5b29785bvc4rVd&algo_pvid=6049f749-268c-484a-8a73-f81981e8ce73&algo_expid=6049f749-268c-484a-8a73-f81981e8ce73-0&btsid=0be3746c15855077261581456e4ab8&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

But when to choose?
5528, 5537... etc.?

My goal is to meassure light in my basement from light to dark where i need to read 4-5 states of reading between light and dark for triggering other things.

I've got an ldr module with pot meter, but this shows either on or off. (For the most) when i make it darker the value jumps from 4095 to around 100.

I use an ESP32 and Wemos Mini, but i also want it to work with 5v.

Can somebody help me to choose the right one?

jremington

#1
Mar 29, 2020, 09:14 pm Last Edit: Mar 29, 2020, 09:36 pm by jremington
Just about any LDR will work, with a suitable resistor load.

Quote
I've got an ldr module with pot meter, but this shows either on or off.
That may be an issue with your wiring, or your program and if so could be much improved. Post a link to the module.

Or just remove the LDR from the module and use it with a suitable resistor.

Please read "How to use this forum", post the code (using code tags) and a wiring diagram with the part values. Forum members will be happy to help you make it work properly.

Bjerknez

If any Of the LDR in tje page i linked to works... why sell different kinds?

This is the module i have:

Bjerknez

If any Of the LDR in tje page i linked to works... why sell different kinds?

This is the module i have:

Bjerknez

#4
Mar 29, 2020, 10:01 pm Last Edit: Mar 29, 2020, 10:03 pm by Bjerknez
posting from ipad is pain in the ass. Cant upload picture. Upload it to morrow.

Ron_Blain

If you scroll down the page you linked to you will see the differences spelled out. The main difference is the "Bright Resistance" and "Dark Resistance" their sensitivity to light wavelength is the same for all of them. We are looking at photo cells which sell by the pile in bulk so really don't expect much as to a data sheet.

Quality parts include a data sheet which is detailed. When I can buy 20 of these things for about Twenty-Five cents each (USD) don't expect much. Anyway to answer your question it is the link, just scroll down the page to Product Information, Parameters. Like any part you choose based on intended application. Your guess is as good as mine as to defining "Bright Light".  :)

Ron
 


jremington

#6
Mar 30, 2020, 12:21 am Last Edit: Mar 30, 2020, 12:23 am by jremington
You might as well ask why there so many kinds of screws and bolts, given that just about any of them will hold two pieces of wood together.

Bjerknez

This is the LDR sensor i use.

Grumpy_Mike

All very well but how are you using it? What pins do you connect?

Bjerknez

All very well but how are you using it? What pins do you connect?
Ground from LDR to Ground on ESP32. VCC from LDR to 3.3v on ESP32, and DO (Digital Output) from LDR to D34 on ESP32.

I tried an another sensor module LDR and that one worked perfect and was not "on/off". I plugged that sensor on the same output. I just changed it on breadboard without doing anything else.

But i do not know why...

Grumpy_Mike

Quote
DO (Digital Output) from LDR to D34 on ESP32.
So if you use a digital output you will only get a digital output, either high or low. The threshold level will be determined by the setting of the pot on board.
For an analogue output use the AO pin.

Bjerknez

So if you use a digital output you will only get a digital output, either high or low. The threshold level will be determined by the setting of the pot on board.
For an analogue output use the AO pin.
I have tried to adjust the pot, but it does not helped me.

The other module i tried that was without pot worked fine. Something tells me that it has something to do with resistance, but i'm nor shure...

Ron_Blain

I see those modules offered in a few flavors, some have 4 pins to include a DO (Digital Out) and include a pot for setting the DO Threshold, the chip is likely a comparator and the pot changes the reference. Some with 4 pind include an AO (Analog Out) so the signal level out is dependent on how much light is striking the LDR. Using a simple meter and powering the module you should be able to measure the outputs. There isn't much to these things. The three pin versions I can buy 10 on Amazon for about $12.00 USD. That version is a DO version. I also see the 4 pin versions for a buck or two on Ebay.

Check the unit using a meter then worry about connecting it to something. You have started this thread in a half dozen forums and left the threads hanging. This is not difficult or complex.

Ron

Grumpy_Mike

Quote
Something tells me that it has something to do with resistance,
Someone is telling you exactly what is happening but you are choosing to ignore them.
Have you tried using the AO connector and reading the analogue signal off that?

Quote
I have tried to adjust the pot, but it does not helped me.
How have you tried adjusting the pot? Expose it to a small amount of light, then adjust the pot until the signal flips from a big to small reading ( or the other way round ). Then that will be the threshold of light you need to trigger this DIGITAL signal.

Bjerknez

Someone is telling you exactly what is happening but you are choosing to ignore them.
Have you tried using the AO connector and reading the analogue signal off that?
How have you tried adjusting the pot? Expose it to a small amount of light, then adjust the pot until the signal flips from a big to small reading ( or the other way round ). Then that will be the threshold of light you need to trigger this DIGITAL signal.
No, i have not tried that. I just know that my other LDR module without pot works fine. I just wonder why this is working an not the other with the pot.

Yes, i have tried that. My basement have good light (almost daylight). The monitor shows 4095 and i adjust the pot slowely. Around half way the light on the module goes low and the monitor shows around 100 or less. When i trye to really slowly adjust it uppwards again, th number jumps to 4095.

My other LDR without potmeter works just fine. Same output and same code. I just swap the module.

Go Up