# AC voltmeter required

Status
Not open for further replies.

#### mudasser_90

##### Newbie level 2
hey everyone i am working on my fyp. i need an AC voltmeter(0-250 volts) to measure voltage of motor. if anybody have PIC or microcontroller based AC voltmeter circuit/simulation/coding(C language) , please share .

thnxxx

u have to reduce the voltage by using some optocouplers and send the voltage to ADC of mcu the output of optocoupler will be the working voltage of MCU take that as scaled voltage

If your 0-5 volts at mcu pin is scaled and the actual range = 0-20v then 5 = 20

so 1v scaled = actual 4v

Your adc will produce 1023 raw value for 5v i.e., 20v actual value.

5v scaled = 20v actual = 1023 raw adc value

you can write like 1023 * x = 5

x = 5 / 1023 = 0.0048875855327468

raw_adc_value * 0.0048875855327468 = scaled voltage

if raw_adc_value = 819 then 819 * 0.0048875855327468 = 4.002932551319629 = 4v scaled value

raw_adc_value * 0.0048875855327468 * 4 (in this case) = actual voltage

If that 4v scaled value is multiplied by 4 it becomes 16.01173020527852 = 16v because 20/5 = 4. So you multiply by 4.

eg: if raw_adc_value = 819 then 819 * 0.0048875855327468 * 4 = 16.01173020527852 actual voltage

• srenjis and mudasser_90

Points: 2

Points: 2