AC Voltemter with PIC16F877A

Discussion in 'Embedded Systems and Microcontrollers' started by jean120, May 29, 2016.

  1. jean120

    Thread Starter Member

    Jan 24, 2016
    75
    1
  2. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,949
    385
    Did you build the hardware or just simulate it?
    Did you try the version with resistors or with a transformer?
    What readings did you get, and what did you expect?
     
  3. jean120

    Thread Starter Member

    Jan 24, 2016
    75
    1
    I build the circuit,http://www.edaboard.com/thread355077.html#post1519067 for DC voltage and current reading I am using the resistors and operation amplifier which amplify the small value I get (especially for current measurement),for AC voltage measurement I used a transformer for not burning my circuit so that I can measure the AC Voltage output from the transformer but I am not succeeding to any of those circuit,for frequency I have been advised to use the T1CKI input of the PIC but its my first time to use its to difficult for me to code for it.
    Find my the codes I used below,I found different circuits on the internet but they all not work not giving me the right values.

    I refered to the following links but they owner did not provide right codes for the operation:

    1.for AC Voltage reading http://microcontrollerslab.com/ac-voltage-measurement-using-microcontroller/
    2.DC voltage measurement :https://electrosome.com/voltmeter-ammeter-pic/
    3.Frequency :https://mlabsbd.wordpress.com/2014/...ers-with-micro-controller_final-year-project/

    Unfortunately the codes I took from those above showed link don`t work anymore.

    Please help me to think and find good solution for my project!!
     
  4. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,949
    385
    Which one do you have built in front of you at the moment?
    We'll try to get that one working.
     
  5. jean120

    Thread Starter Member

    Jan 24, 2016
    75
    1
    I do have all of them but the third one is very wonderful for AC measurement and also the second one for DC Voltage and DC current measurement.

    Best Regards,
     
  6. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,949
    385
    It's wonderful but it doesn't work???
     
  7. jean120

    Thread Starter Member

    Jan 24, 2016
    75
    1
    yeah,no one working between all of those!!

    Please help
     
  8. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,949
    385
    I am not psychic - I need you to tell me the details of what circuit you are using and what input you applied and what output you got to have any chance of making helpful suggestions. Pick one of the circuits (we can't do three at once) and tell me about it.
     
  9. jean120

    Thread Starter Member

    Jan 24, 2016
    75
    1
  10. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,949
    385
  11. jean120

    Thread Starter Member

    Jan 24, 2016
    75
    1
    I get different values which are not the same with what I think I have to get,the input of the transformer is 220VAC/50hz I think that on the LCD I have to get that 220VAC or nearby,but I am getting,2V,3V,13V,68V,75V,72V and much more different values so I ask myself which one take and consider it as the output measured voltage and how to get only one value among different obtained so only one or at least two values near 220V be printed on the screen,

    I used the same circuit but the PIC I am using is PIC16F877A at 12MHZ and the input is at RA3.

    Please help,best Regards,
     
  12. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,949
    385
    So in that case you need to change the software to match. Please post your revised software.
     
Loading...