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.

Some [quick] advice re. ambient light sensing

Status
Not open for further replies.

Hippogriff

Member
Hi,

I've used LDRs before and I was planning to use them in my next project... basically I want something to turn on only after a certain time (I'll be trying to get a reading from a radio clock for that) and when the light has dropped beyond a certain level. A PIC would be reading the ambient light sensor - so I'm not fussed if it's an analogue voltage which I can convert or something already digital.

Has anyone got any recommendations of components that work well... or is it pretty much all the same? I saw this little TSL235R thing on Sparkfun and it seems interesting... converts light to a frequency... seems to say it's very accurate (which is nice)... https://www.sparkfun.com/products/9768 ...as it's only £2 I'm tempted, but these seem to be going for £6 on eBay (so not entirely sure what's going on there).

Anyone used this, or anything else for that matter, and would make a recommendation?

P.S. - one rather poor reason for liking this TSL235R is simply its appearance... having that poking its head out to sense light is much nicer than the look of an LDR's head. Sue me! ;)
 
Its a little more difficult to "capture" the data from the TSL235R (frequency determination) than from a simple LDR (voltage level).

That said, what PIC are you using? My experience thus far is with Arduino (Uno and Micro) which have all the "stuff" that makes them easier to program. That, and the extensive libraries and examples.

For instance, in this case;

https://learn.parallax.com/tsl235r-light-frequency-converter-arduino-demo

As to which is better (looks notwithstanding), the TSL235R will probably be more accurate but is the accuracy necessary (given the more complex code needed and the "high brightness issues") for your project?
 
I'll be using a 16F1825 I reckon, I'm currently debugging stuff on a 16F684. I have my Sharp IR sensor working nicely... distance measured is notionally 'displayed' via the binary number lighting of 8 LEDs hooked up to a 74HC595. Tried it with a potentiometer and ADC first... turn to far left = 1 LED lit, turn to far right = all LEDs lit, nice.

With the LDR I am finding that, yes, it measures ambient light... but the difference in voltage seems rather minute... I can put a cover over the LDR completely and the voltage measured doesn't seem to change that much. So, I don't know whether I'm talking more about accuracy, or range, if that makes sense? With the TSL235R (and I've just seen there's a TSL237) would I get something 'better', even if I have to measure a pulse width?

Second challenge is finding where sells these things - and a PIR sensor I'm very interested in looking at - Parallax https://www.parallax.com/product/555-28027 - and isn't going to charge £12 for delivery (i.e. more than the items)... ouch. eBay is really failing here on the PIR sensor, the TSL235R and the TSL237. :(
 
I like the look of that as well. Unlikely I'll be able to get it, I'll search around, but it looks nice.
 
It looks like Mouser UK has the PIR sensor I want, and the TSLs. Need to spend £50 to get free shipping (which I want). So, any other suggestions and I'll try to increase the value of my shipping cart.
 
Hi... thanks. I've ordered from here before. I like it. I just object to paying unreasonable postage is all. It doesn't cost £12 to ship a little box. I'd rather find some other stuff to add to the order. I've added 10 more PICs, just looking for other interesting stuff to add. Pity they don't sell sealant guns... I want one of those. Ha.
 
Update: I am happily using the TSL237, it works very nicely. I bought some TSL235s as well, but I've not had need for them yet. The TSL237 seems to output a square wave with different width rather nicely depending on the light level it senses (shorter width = more light)... works well.
 
Some of the cheap Chinese LDR sensors in my solar garden lights have failed maybe due to sunburn.

In Canada we have had daytime running lights on cars for at least 25 years. My car has a light sensor that automatically turns off the daytime running lights and turns on the night lighting when it gets a little dark. But millions of people drive around at night with only their parking lights or only their daytime running lights (no rear lights). Since many people are so stupid then I think all cars should have automatic lighting.
 
Status
Not open for further replies.

Latest threads

Back
Top