Light Meter Programming

Discussion in 'Programmer's Corner' started by heberjm8, Oct 30, 2010.

  1. heberjm8

    Thread Starter New Member

    Oct 7, 2010
    11
    0
    Hello. I’m hoping I can obtain some help with programming a circuit. I’m designing an ambient light sensor with a digital display showing the amount of lux detected. I have ordered a digital display that comes with a HD44780 chip included in it. Here is the webpage for the digital display I have ordered:

    https://www.sparkfun.com/commerce/product_info.php?products_id=709

    Well I have never programmed before and I’m hoping I can learn a few things from the people here at this forum. I’m not sure but is it just as easy as ordering a photo sensor and getting the correct program for it to communicate with the digital screen to display the lux? If so, can someone please recommend a possible photo sensor or schematic for my application?
    If someone would respond I would GREATLY appreciate the help. THANK YOU SO MUCH.
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    The display controller is eventually going to be necessary, but what of the light detector? What will you select, what is it's response to light, and how will you calibrate it?
     
  3. bertus

    Administrator

    Apr 5, 2008
    15,646
    2,345
  4. heberjm8

    Thread Starter New Member

    Oct 7, 2010
    11
    0
    Thanks for the responses. I do not know what type of light sensor to choose. Can you recommend a basic general one that will get the job done?
    I have no idea about the calibrating. I thought the micro-controller calibrated itself to the light sensor once you enter the program into the micro-controller.
    Again I have never done any of this before. Programming is all new to me. So if someone could explain the very basic components of what needs to be done to create a light sensor with a digital display showing the amount of lux detected I would appreciate it so much. THANK YOU.
     
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    For a start, here is an article that describes light meters and has a bit to say about calibration - http://en.wikipedia.org/wiki/Light_meter

    You need to do some research into this as sensitivity issues will come up. A typical microcontroller will have a 10 bit A to D converter, good for a resolution of one part in 1024. If it happens that you need a finer resolution, you may have to consider a 12, 14, or even 16 bit converter to obtain the needed accuracy.

    A microcontroller is only able to perform actions on numbers according to the program you provide. That does not rule out your being able to write a calibration routine, but the program code has to be able to do it all.

    One very useful starting point is to decide what range of light the sensor needs to respond to. There are several different kinds of sensor, some of which may be more suited to your application.

    It's worth mentioning that there are also any number of off-the-shelf light meters.
     
    Last edited: Oct 31, 2010
  6. heberjm8

    Thread Starter New Member

    Oct 7, 2010
    11
    0
    Hi Guys,
    I have a question about the photocell for my application.
    I talked to a customer service person from sparkfun.com and ordered the following photocell:
    http://www.sparkfun.com/commerce/product_info.php?products_id=9088

    http://www.sparkfun.com/commerce/product_info.php?products_id=9088

    Would you agree that this is a good photocell for my design. I'm just hoping its sensitive and accurate enough. I'm making a basic light sensor that will show the amount of lux on the digital screen. I figure my light meter lux max will be either 20k,40k,50k, or 100k lux. I looked at other light meters on the market and this is what they all maxed out at.

    I also ordered a microprocessor from the customer service guys recommendation. Here it is:
    http://www.sparkfun.com/commerce/product_info.php?products_id=9950
     
  7. bertus

    Administrator

    Apr 5, 2008
    15,646
    2,345
    Hello,

    If you want to use a LDR as sensor you will need to make a correction table of some kind.
    Read this page, there are some graphs you might interest:
    http://www.fuji-piezo.com/photoldr.htm

    Bertus
     
Loading...