+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Newbie level 2
    Points: 457, Level: 4

    Join Date
    Jun 2010
    Location
    Singapore
    Posts
    2
    Helped
    0 / 0
    Points
    457
    Level
    4

    how to measure voltage / current using PIC microcontroller?

    I am trying to build a project that is able to detect the amount of voltage and current from a electrical appliance and then it will send a signal to the micro controller to decide whether or not to cut the power supply.

    But I am struck at the part of how to detect/measure current and voltage using PIC .

    Please show me how to do it if possible.

    Thank you:D

    •   Alt1st June 2010, 15:54

      advertising

        
       

  2. #2
    Newbie level 3
    Points: 532, Level: 4

    Join Date
    Jan 2010
    Posts
    4
    Helped
    0 / 0
    Points
    532
    Level
    4

    Re: how to measure voltage / current using PIC microcontroll

    You can measure the voltage using a built-in Analog-to-Digital converver (ADC). As it measures the voltage relatively to the reference voltage, so you need a stable +5v supply (for example, using a L7805). ADC has has it's resolution (usually it is 1024), so the accuracy will be 5/1024.

    To measure a current you just need to measure the voltage on the resistor, and calculate the current using the Ohm's law: I=U/R.



    •   Alt1st June 2010, 21:18

      advertising

        
       

  3. #3
    Member level 2
    Points: 753, Level: 6

    Join Date
    May 2010
    Location
    NO HIDDEN LINKS
    Posts
    47
    Helped
    11 / 11
    Points
    753
    Level
    6

    Re: how to measure voltage / current using PIC microcontroll

    Use ADC available in PIC to measure voltage. Current can be measured by measuring the voltage across a resistor. The practical issues can be different based on how much voltage and current you plan to measure. Usually PIC ADC can measure up to rail voltage (when using VDD as reference), so you will have to make sure that the voltage to be measured is always between 0 - VDD volts. If the original signal is too small, use an amplifier otherwise use a voltage divider. The shunt resistor used for current measurement should have enough wattage to stand the power dissipation.



    •   Alt1st June 2010, 21:27

      advertising

        
       

  4. #4
    Advanced Member level 2
    Points: 3,913, Level: 14
    Mithun_K_Das's Avatar
    Join Date
    Apr 2010
    Location
    Dhaka, Bangladesh, Bangladesh
    Posts
    602
    Helped
    13 / 13
    Points
    3,913
    Level
    14

    how to measure voltage / current using PIC microcontroller?

    Any programming example? Pls write a program for atmega8.



  5. #5
    Newbie level 2
    Points: 457, Level: 4

    Join Date
    Jun 2010
    Location
    Singapore
    Posts
    2
    Helped
    0 / 0
    Points
    457
    Level
    4

    Re: how to measure voltage / current using PIC microcontroll

    thanks guys but how to program the thing?



  6. #6
    Member level 2
    Points: 753, Level: 6

    Join Date
    May 2010
    Location
    NO HIDDEN LINKS
    Posts
    47
    Helped
    11 / 11
    Points
    753
    Level
    6

    Re: how to measure voltage / current using PIC microcontroll




  7. #7
    Newbie level 3
    Points: 125, Level: 1

    Join Date
    May 2012
    Posts
    3
    Helped
    1 / 1
    Points
    125
    Level
    1

    Re: how to measure voltage / current using PIC microcontroller?

    i have made the project about solar monitoring system. solar is the supply to the load. from solar, i connect it to the boost converter (DC to DC voltage) and then output of inverter will connect to the inverter. which is 12v to 230v. my problem is, i don't know how to connect the PIC 16F877A to my circuit. can you please explain to me. at the same time, can you please give me the coding of PIC.



+ Post New Thread
Please login