skip to main | skip to sidebar

Embedded Janitor

Cleaning up embedded systems

Wednesday, April 22, 2009

LDR Speed




Light dependent resistors are cheap and relatively wide-band light sensors, but they are a bit slow relative to photodiodes and phototransistors.

I used an AVR-based board to measure this, as follows:

* Put an LDR and 6.8k resistor in series between 5V and ground as a voltage divider.

* Attach the AVR's ADC pin to the connection between the resistor and LDR.

* Set another pin up to toggle an LED every 50msec.
* AVR samples ADConce each millisecond and spits out the value as a string on the RS232 port.

* PC logs serial port into file
*Use gnuplot to plot results.


As you can see, after approx 15msec the ADC value has settled quite well.


I don't quite know why the formatting got hosed.... but so be it.
Posted by Charles Manning at 7:22 PM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2010 (2)
    • ►  May (1)
    • ►  April (1)
  • ▼  2009 (7)
    • ►  November (1)
    • ►  June (2)
    • ▼  April (4)
      • Code on github
      • Phototransistor speed
      • LDR Speed
      • Make your own Lego NXT sensors

About Me

My photo
Charles Manning
View my complete profile