Arduino Photocell PWM LED Bargraph

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
988 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 28, 2009

in this project i attached a photocell with a 10k downpull to the analog i/o of my arduino w/ 5volts. Also attached are 5 LEDs connected to digital i/o pins 3, 5, 9, 10, and 11 -- all grounded with 220k resistance. the raw analog output of the photocell is read by the arduino, converted into a pulse-width modulation, broken into 6 sub-ranges, and output to the 5 LEDs using 'if/else if' statements; ranging from 0 (no LED output or very high light input) to 255 (5 LED output or very low light output). The light bargraph itself actually measures the approximate range of the pulse-width modulation.

**EDIT**
as lucasmontec has correctly pointed out in the comments, it is not a photocell but an LDR. i believe a large majority of people refer to these devices as photocells, and for that reason have left 'photocell' in the video title.

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (nativecodr)

  • that is an LDR not a photocell

  • which is a photocell

  • @nativecodr LDR is a photo sensitive resistor. It changes its resistance depending on the amount of light and does not generate energy. Photocells are silicon (Crystalline Silicon) arrays that generate a potential difference between the first layer and last layer of conductive material.

  • i see. i was under the impression that the term 'photocell' referred to a device that produced a variable voltage when exposed to electromagnetic activity. my mistake...

  • @nativecodr hmmm

    but that is the description of any energy generation device... anyway nice project!

  • i suppose that is correct. you seem to have quite a bit of knowledge on the subject, so i can only assume you know what youre talking about. perhaps i should get a refund on my education hahah. Thanks for the compliment. the circuit is really quite simple. I would like to take this same idea and implement it into an 8x8 random matrix of rgb leds and use four ldrs ;) to calculate ambient lighting... like a fancy color changing picture, complete with frame.

see all

All Comments (7)

Sign In or Sign Up now to post a comment!
  • @nativecodr that would be awesome!

    post a video if you create this =D

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more