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 how to make a high voltage DC voltmeter using a micro-controller and Op-Amp circuitry.

Disclaimer: Electricity is always dangerous. Proper skill is required to work with electricity. Do work at your own risk. The author will not be responsible for any misuse or harmful act or any mistake you make. The contents of this website are unique and copyright protected. Kindly don’t do any nonsensical act copying and claiming it as yours. Most of the articles published here are kept as open-source to help you. Take the knowledge for free and use it, but if you are interested you can buy the ready resources offered here. If you need any help or guide feel free to comment below, the author will try to help 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.

A high voltage sensing circuit

In this circuit, the input is floating. That means, it is not connected to the GND or VCC of the measuring circuit. This way, 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 the 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 in the circuit diagram of the AC voltmeter, the Op-Amp circuit is converting the high voltage into a low voltage range. Then the ADC of the 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 an average of 10 samples is calculated. 39.2 is our calibration factor. Further calibration may be required with a practical circuit as resistances has a 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 at your own risk!!!

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

Don’t forget to subscribe for the next update.

Loading

JLCPCB – Only $2 for PCB Prototype (Any Color)

24 Hours fast turnaround, Excellent quality & Unbeatable prices

$18 Welcome Bonus for new registrations Now!!! https://jlcpcb.com


Check this out: 5 coolest multimeters you can buy


MKDas

I'm Mithun K. Das; B.Sc. in EEE from KUET, Bangladesh. Blog: https://labprojectsbd.com. "First, electronics was my passion, then it was my education, and finally, electronics is now my profession." I run my own electronics lab, M's Lab (https://mlabsbd.com). Where I work with the creation of new products from ideas to something in real life. Besides this is my personal blog where I write for hobbyists and newcomers in the electronics arena. I also have a YouTube channel where I publish other helpful videos, you can find the link inside the articles. I always try to keep it simple so that it becomes easy to understand. I hope these will help them to learn electronics and apply the knowledge in their real life.

0 Comments

Leave a Reply

Avatar placeholder

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