Could anyone shows me how to measure current/Voltage using Microcontroller??

Discussion in 'Embedded Systems and Microcontrollers' started by DeathYu, Jun 1, 2010.

  1. DeathYu

    Thread Starter New Member

    Jun 1, 2010
    I am trying to build a project that is able to measure the voltage/current in a electrical appliance then send a signal to the micro controller to decide whether or not to cut the power supply of the electrical appliance.

    However , I am struck at the part of measuring the voltage/current using PIC[micro controller].

    Please help me by showing me how.

  2. beenthere

    Retired Moderator

    Apr 20, 2004
  3. lihle

    Active Member

    Apr 12, 2009
    its simple just make the input to the microcontroller, then convert it from analog to digital using the MIC, then compare it with values stored on registers.

    lets say your converted value is 30 and your lower minumum is 25 and max value is 35 then if it is above 35 or 25 then the output of the controller should either turn on/ off your appliance.
  4. cyberfish

    New Member

    Jun 3, 2010
    Judging by your post, I'm guessing you don't have a lot of experience with electronics.

    I strongly recommend not touching main's voltage for now. Just play with low DC voltages until you are a lot more experienced.

    At low DC voltages if you screw up you will just get a spark, some smoke, and burnt components. At 120V you can easily end up dead.

    Sure, high voltage is exciting. Dead people aren't, though. They don't move much.
  5. John P

    AAC Fanatic!

    Oct 14, 2008
    You can measure current in perfect safety with a current transformer. Just run the high-voltage wire through the middle of a toroid with a pickup coil for the output. But I don't think you can measure voltage without connecting to the wire. Could it work via capacitance if you ran insulated wires through metal tubes, and if you then monitored the relative voltage between the tubes via a high-impedance amplifier? Could be interesting to try.