Pulsetronics
Member level 3
- Joined
- Oct 31, 2014
- Messages
- 67
- Helped
- 9
- Reputation
- 18
- Reaction score
- 9
- Trophy points
- 8
- Location
- Lagos
- Activity points
- 382
I tried measuring AC voltage using Potential transformer of 6v output and rectified before passing through a capacitor 1uf 50v and voltage Divider (390k and 10k) then to adc pin , the voltage at ADC pin is stable but the voltage at the output varies.
Code:
// using mikroC as compiler
Float i;
Char volt[6];
While(1){
I = Adc_read(0);
I = I * 5000/1023;
I= I /10 ;
Floattostr(I, volt);
Volt[5] = 0;
Lcd_out (1,1" Ac voltage: ");
Lcd_out_cp(volt);
Delay_ms(1000);
}