LDR Photoresistor and resistance

I'm going to order some photo resistors like this:

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?

Just about any LDR will work, with a suitable resistor load.

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.

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

This is the module i have:

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

This is the module i have:

posting from ipad is pain in the ass. Cant upload picture. Upload it to morrow.

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". :slight_smile:

Ron

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.

This is the LDR sensor i use.

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

Grumpy_Mike:
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...

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.

Grumpy_Mike:
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...

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

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?

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.

Grumpy_Mike:
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.

Some of the modules have a sensitivity adjustment (trip point). These modules have a comparator perhaps Schmitt trigger built in so it saturates at a given brightness or dimness (is that a word?). The one you need does not have this circuit and what you need to actually get a range of values.

wolframore:
Some of the modules have a sensitivity adjustment (trip point). These modules have a comparator perhaps Schmitt trigger built in so it saturates at a given brightness or dimness (is that a word?). The one you need does not have this circuit and what you need to actually get a range of values.

Okay. probably the best answer so far. :slight_smile:

I can't see that i have done something wrong here. Other than used a wrong LDR sensor.

But, i'm not 100% sure...

You started with ordering photo resistors and asked the difference in part numbers. Then no comment? Now you say you have modules. Post #2 you state this is the module I have less any link? You are all over the map and nobody knows exactly what you have. You have been told and had it explained numerous tomes in other forums how to do what you want to do and just left things hanging.

You want to measure 4 or 5 light levels then just build a simple circuit. Take a Vout and use your code. You have an analog signal. The module we ended up with is nothing close to what you started this thread with so what's it going to be?

Ron

It’s a simple problem.

This one gives you continuous values it’s just an LDR with a voltage divider

This also gives you a signal out but it’s amplified

This has a comparator circuit to output a 0v or VCC based on a threshold set by the potentiometer

Thanks Wolframor :slight_smile:

I think you just solved my problem. I just have the wrong LDR for my use. The other sensor i tried is not mine. Just one i barroved of a friend. But this was identical to the first module you posted picture of.

I think i have to order som of theese :slight_smile: