need a help in PIC programming ...

fromdawest

Member
May 7, 2008
17
0
0
can anybody please help me to do the following using 16F877 PIC .

I want to make a simple ammeter circuit using PIC16F877 . To measure the current I'm using a simple CURRENT TRANSFORMER ( 30:5 A ) . So what i want is to, get this current transformer output and make it the input to the PIC IC ( to it's ADC ), and then to drive a small LCD to show the current value .

Please help .

Thanks in advance .
 

waparc

Well-known member
  • Jan 12, 2008
    1,963
    1,253
    113
    මගේ කාමරේ
    othv7p.png


    use above circuit for your ct coil.

    for R82 and R83 you have to do some calculation. as you mentioned, you use 30:5 CT coil. so 5A rms current will flow through R82 and R83 when maximum of 30A flowing through it.

    PIC16F877 can only measure voltages between 0 and 5V.

    so there should be maximum of 5V peak from IAP.

    to have 5V peak,
    x * square root of 2 = 5
    x = 3.54 V rms

    according to V=IR,

    3.54=5*R

    R =0.708 ohms

    Since the input signal is differential for each channel, the
    burden resistor is split in two to yield 0.354 * 2

    according to E12 resistor value range you can use 0.33 ohms 10 watt resistors as R82 and R83.

    for R15 and R17 use 560 ohms resistors. for C16 and C17 use 0.056 microfarad ceramic capacitors.

    input only IAP to pic16f877 analog pin. do the A/D conversion.

    since you are using 30:5 CT, accuracy will be low. for high accuracy, use CT coils like 1000:1 or 2000:1.

    Check above circuit with proper testing equipment before connecting it to pic16f877. make sure that voltage from IAP should not exceed 5V.

    based on source - http://www.analog.com/static/imported-files/application_notes/2698536550528608457AN641_0.pdf