PIC 18F4Xk20

Discussion in 'Embedded Systems and Microcontrollers' started by vultac, Aug 20, 2010.

  1. vultac

    Thread Starter Active Member

    Mar 2, 2009
    142
    0
    Hi guys, i would like to ask rite... how can a pic detect voltage / current? if i need to detect it from a buck converter and send it as a feedback to the PIC...
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hello,

    You will need two adc's in the pic.
    One can be connected to a voltage divider for the voltage measurement.
    The other can be connected to a current sensing resistor (eventualy amplified by an opamp).

    Bertus
     
  3. sage.radachowsky

    Member

    May 11, 2010
    241
    38
    A PIC senses voltages with its ADC.

    To measure current, there are two ways that I know -- sense resistor and Hall effect. Most simple is a sense resistor, though it does introduce a small resistance. You need to decide whether to measure it low side or high side. You probably need to condition the signal before reading with the PIC.

    To measure voltage, you must condition the signal so it's within the range of the PIC's ADC, with a voltage divider or some other arrangement. Often you will include a current-limiting resistor in the signal path to protect the PIC against overvoltage.

    Want to get more specific, maybe post a schematic or block diagram?
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Another way is to use a PIC that has one or more comparators. The comparators trip much more rapidly than an ADC can respond to a varying signal.
     
Loading...