+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Member level 1
    Points: 290, Level: 3

    Join Date
    Dec 2012
    Posts
    41
    Helped
    0 / 0
    Points
    290
    Level
    3

    PIC16F877 and voltage measurment on LED

    How can I measure voltage which is on LED with microcontroller? Click image for larger version. 

Name:	Clipboard02.jpg 
Views:	8 
Size:	5.5 KB 
ID:	86287 How should I connect analog pin?

    •   Alt28th January 2013, 23:49

      advertising

        
       

  2. #2
    Super Moderator
    Points: 68,102, Level: 63
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    11,140
    Helped
    3675 / 3675
    Points
    68,102
    Level
    63

    Re: PIC16F877 and voltage measurment on LED

    If your -Ve reference is VSS (it usually is) and the bottom of the LED is connected to VSS, connect the analog pin to the junction of the LED and resistor.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

    •   Alt29th January 2013, 00:14

      advertising

        
       

  3. #3
    Advanced Member level 5
    Points: 33,525, Level: 44
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    tpetar's Avatar
    Join Date
    Sep 2010
    Location
    Pancevo-Belgrade, Serbia
    Posts
    6,427
    Helped
    1731 / 1731
    Points
    33,525
    Level
    44

    Re: PIC16F877 and voltage measurment on LED

    Like Betwixt says connect ADC pin on LED anode (between led and resistor). Gnd is common.


    You can see this existing EDABoard thread:

    http://www.edaboard.com/thread196948.html



    Also look this simple 3-digit LED voltmeter:

    http://www.coolcircuit.com/project/meter/
    Last edited by tpetar; 29th January 2013 at 00:34.
    “Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine.” Nikola Tesla


    1 members found this post helpful.

    •   Alt29th January 2013, 00:29

      advertising

        
       

  4. #4
    Member level 1
    Points: 290, Level: 3

    Join Date
    Dec 2012
    Posts
    41
    Helped
    0 / 0
    Points
    290
    Level
    3

    Re: PIC16F877 and voltage measurment on LED

    LED and resistor is from other circuit, which is seperate from microcontroller. Should I make this GND common?



  5. #5
    Advanced Member level 5
    Points: 33,525, Level: 44
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    tpetar's Avatar
    Join Date
    Sep 2010
    Location
    Pancevo-Belgrade, Serbia
    Posts
    6,427
    Helped
    1731 / 1731
    Points
    33,525
    Level
    44

    Re: PIC16F877 and voltage measurment on LED

    Yes my friend make it common (connect both Gnd together).
    “Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine.” Nikola Tesla


    1 members found this post helpful.

    •   Alt29th January 2013, 00:54

      advertising

        
       

  6. #6
    Super Moderator
    Points: 68,102, Level: 63
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    11,140
    Helped
    3675 / 3675
    Points
    68,102
    Level
    63

    Re: PIC16F877 and voltage measurment on LED

    The measurement taken by the PIC is of one voltage relative to the other so you have to measure across the LED using ground and the ADC input as the two connections.

    A word of warning - make sure it is safe to connect the two grounds first. Although they are both called ground, a true connection to Earth may not be present in the power supply feeding the PIC or the LED so they could be at different voltages.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

  7. #7
    Member level 1
    Points: 290, Level: 3

    Join Date
    Dec 2012
    Posts
    41
    Helped
    0 / 0
    Points
    290
    Level
    3

    Re: PIC16F877 and voltage measurment on LED

    thank you all for your time and answers :) Im done with my project ;)



--[[ ]]--