How to make a high voltage DC voltmeter (1000V+ !!!)

Published by MKDas on

Like the high voltage AC meter, we can use the same Op-Amp circuit to measure high voltage DC voltmeter. In this article, we are going to learn hot to make a high voltage DC voltmeter using micro-controller and Op-Amp circuitry.

Disclaimer: Electricity is always dangerous. Skill required to work with electricity. Do work with your own risk. Author will not be responsible for any misuse or harmful act. This website contents is also copyright protected. Anything copied and directly posted in your website and claiming it as yours is prohibited and nonsensical. Author published all the articles as opensource to help you making your project and learning purpose only. Learn and make one for yourself. If need any help feel free to ask the author. Author will be helpful to you. Thanks.

How to sense high voltage floating DC with Op-Amp?

Like the Op-Amp circuit of AC voltage sensing, we can use this same circuit to sense high voltage DC. Here only one change we need to do is, the reference voltage will be 0V. Here is the modified sensing circuit.

High voltage sensing circuit

In this circuit, the input is floating. That means, it is not connected to GND or VCC of the measuring circuit. This way, a decent isolation is possible. Here, the gain of this circuit will be:

Gain = R9/(R2+R6+R7+R8)

Input range can be increased by selecting suitable resistors. If input voltage is higher than 1KV, use more resistors rather than selecting higher resistances. Using more resistors in series provide good heat dissipation as well as good isolation.

Circuit diagram of high voltage DC voltmeter:

Circuit diagram

As like the circuit diagram of AC voltmeter, the Op-Amp circuit is converting the high voltage into low voltage range. Then the ADC of micro-controller is calculating the input voltage.

You can download the proteus file from here.

Coding:

/*******************************************************************************
* Program for "High voltage DC voltmeter"                                      *
* Program written by_ Engr. Mithun K. Das                                      *
* MCU:PIC16F73; X-Tal:8MHz; mikroC pro for PIC v7.6.0                          *
* Date:05-05-2020                                                              *
*******************************************************************************/
char segment_array[]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};//cmmon cathode_non dot

sbit digit0 at RC0_bit;
sbit digit1 at RC1_bit;
sbit digit2 at RC2_bit;
sbit digit3 at RC3_bit;

char digits[5];
void display_7segment(int number)
{
   digits[3]=number/1000u;
   digits[2]=(number/100u)%10u;
   digits[1]=(number/10u)%10u;
   digits[0]=(number/1u)%10u;
}

void InitTimer0()
{
  OPTION_REG     = 0x85;
  TMR0           = 100;
  INTCON         = 0xA0;
}

int position=0;
void Interrupt() iv 0x0004 ics ICS_AUTO
{
  if (TMR0IF_bit)
  {
    TMR0IF_bit   = 0;
    TMR0         = 100;

    digit0 = 1;
    digit1 = 1;
    digit2 = 1;
    digit3 = 1;
    if(position>3)position=0;

    if(position==1)PORTB = segment_array[digits[position]]+128; //dot point
    else PORTB = segment_array[digits[position]];

    if(position==3)
    {
        digit0 = 0;
        digit1 = 1;
        digit2 = 1;
        digit3 = 1;
    }
    else if(position==2)
    {
        digit0 = 1;
        digit1 = 0;
        digit2 = 1;
        digit3 = 1;
    }
    else if(position==1)
    {
        digit0 = 1;
        digit1 = 1;
        digit2 = 0;
        digit3 = 1;
    }
    else if(position==0)
    {
        digit0 = 1;
        digit1 = 1;
        digit2 = 1;
        digit3 = 0;
    }
    position++;
  }
}


unsigned long adc_rd0=0,dc_voltage;
int k=0;
void main()
{
 TRISA=0xFF;//all in
 TRISB=0x00;//all output
 TRISC=0x00;//all output
 PORTB=0x00;
 PORTC=0x00;//clear ports
 ADCON1=0x00;//all analog in
 InitTimer0();//5ms timer
 while(1)
 {
      ADCON0 = 0b00000001;//select AN0
      adc_rd0 = 0;//clear data
      for(k=0;k<10;k++)
      {
         adc_rd0+=ADC_Read(0)*39.2;
         Delay_ms(10);
      }
      adc_rd0/=10;
      dc_voltage = adc_rd0;
      
      display_7segment(dc_voltage);
 }
}//

Here we are calculating the input high voltage with this function where average of 10 samples are calculated. 39.2 is our calibration factor. Further calibration may required with practical circuit as resistances has tolerance.

ADCON0 = 0b00000001;//select AN0
adc_rd0 = 0;//clear data
for(k=0;k<10;k++)
{
adc_rd0+=ADC_Read(0)*39.2;
Delay_ms(10);
}
adc_rd0/=10;
dc_voltage = adc_rd0;

You can download the mikroC file from here. or the .hex file from here.

Testing result:

Here is the proteus testing result.

Testing result

I personally implemented this type of circuit in some commercial devices. The circuit worked fine for me. I hope, you can make one for yourself too.

In this project, you learned how to measure floating high voltage DC. Here, we tested 1000V only. But if you select the resistors carefully, you can measure more than 2500V with this circuit.

Remember, electricity is always dangerous. Work carefully with your own risk!!!

Hope you enjoyed the project. If you need any help, I’m here. Just ask. Thank you, Enjoy!


MKDas

Mithun K. Das; B.Sc. in EEE from KUET. Blog: https://labprojectsbd.com

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *