Art, I just plan to use it for ambient light levels. Actually I'm only interested in if there is lights on (sun, lamps) or if its dark. I need the threshold to be user settable as "dark" is a subjective thing. The thought is that a node send out a message (VSCP) when the transition occurs (with hysteresis of course). This message can be used by other nodes to turn on/off lamps or do other things. I found a Light to voltage sensor, TSL250 from TAOS, that was rather low cost and I will probably use that instead of the LDR. For those interested I why I need this: VSCP, stands for Very Simple Control Protocol and is a very, *very* simple higher level protocol over CAN/TCP/UDP and such. It is event driven and all that a node does is that it sends out its event when it occurs or at even intervals. Other nodes can "do stuff" or react on this event (light a lamp, log to a database) etc. It's really stupid but makes a system that is very easy to configure. More information is available at http://www.vscp.org I have been working with this since 1984 (yes I know I'm slow...) when the node was a 6800 and I think the manufacturing cost was about $250 and RS-232 was the only communication option. Now the node is based around a 12F675 or 18F248/258 using CAN and the cost is very low. Still this is may something that never will be finished but its a fun ride soldering, thinking about it, trying it out... /Ake -----Ursprungligt meddelande----- Fr=E5n: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]F=F6r Art Skickat: den 18 april 2004 22:21 Till: PICLIST@MITVMA.MIT.EDU =C4mne: Re: [EE:]Light detector You didn't say what data rate you were trying to receive. LDR's have really poor frequency characteristics, don't expect much better than 5 to 20 Hz, especially with a 500k series resistor. When I first read you message, I thought you were just trying to detect ambient light levels, but not sure. Phototransistors are good for low data rates, up to 10Khz or a tad higher if you are using them in small signal mode. Otherwise, look at a photodiode for big bandwidth and a very large dynamic range. Smile, it can always be worse:>: Art At 02:05 PM 4/18/04, you wrote: >I am in need for a low cost light detector that has a use settable >trigger point for the light/dark threshold. My first thought has been to >just set up a voltage divider in the following way. > > +5V > | > | | > | | 500K > | | > | > | > |--------- PIC ADC > | > | > | | > | | LDR > | | > | > | > --- > >The LDR has >500K resistance in darkness and 3K-20K at 10 Lux. > >One could use a PIC output pin to feed the divider instead of the +5V >and just activate this when a measurement is needed. > >Is there any drawbacks with such a scenario? Is there a better way to do >this in a low cost way? > >/Ake > > --- >Ake Hedman (YAP - Yet Another Programmer) >eurosource, Brattbergav=E4gen 17, 820 50 LOS, Sweden >Phone: 46 657 413430 Cellular: 46 730 533146 >Company home: http://www.eurosource.se Kryddor/Te/Kaffe: >http://www.brattberg.com >Personal homepage: http://www.eurosource.se/akhe > >-- >http://www.piclist.com hint: The PICList is archived three different >ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body