digital lux meter

Discussion in 'The Projects Forum' started by humaneb, Jan 15, 2013.

  1. humaneb

    Thread Starter New Member

    Jan 15, 2013
    4
    0
    hi..im new here n sorry for my bad english.. i need to create a digital lux meter that can measure the light quality as my final year project. i need to use 2 unit of photo-diodes as a sensor and convert it to voltage. the problem is i don't know how to proceed in the PIC part. i thinking of using pic16f877a and display the output on the 2x16 lcd display. i have 2 inputs from 2 photo-diodes. n i need to divide them, to obtain the ratio of the output. let say : input 1 / input 2 = ratio. so the ratio will determine the quality of the light being tested. how to do a division operation on the pic, and then the result will be displayed on the lcd display..thanks:)
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Sounds like you need to look into C compilers. The XC8 compiler from Microchip makes things rather easy for the programming portion. That way, you can write the program in C.

    However, you have a problem. How are you dealing with the non-linear response of the photodiodes? They will be more sensitize to certain areas of the spectrum and less so for others.
     
  3. humaneb

    Thread Starter New Member

    Jan 15, 2013
    4
    0
    so, should i use LDR instead of photodiodes? im still on learning how to write a C code..:( someone can share with me the coding for the lux meter?
     
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Info on photodiodes

    On LDRs

    As long as the spectral content of the light you are using is the same, you can use either, but know that this will not be a universal lux meter (it won't work the same when measuring sunlight, vs LED output).

    You can do division in a uC using an algorithmic division(i.e. successive subtraction) to perform the division.

    No. You need hardware before the code means anything.
    You need to define your system before you can build it!
     
  5. humaneb

    Thread Starter New Member

    Jan 15, 2013
    4
    0
  6. humaneb

    Thread Starter New Member

    Jan 15, 2013
    4
    0
    oh ok..i will decide my hardware 1st..thanks :) n sorry :(
     
  7. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    We are not programming. There is no system defined.

    Look at the datasheet for the 16F877A, it has 5 or 8 analog inputs, depending on the package. You can multiplex the signal into the ADC in order to read multiple signals. Read page 129 and on.
     
Loading...