# How to measure high alternating current of AVR ATmega8

Status
Not open for further replies.

#### sharif

##### Newbie level 2
pls how Ican measure high alternating current by avr microcontroller atmeg8l
using current trasnsformer.

#### mrcube_ns

##### Advanced Member level 1
avr microcontroller measures current

You should use opamp (with dual power supply) to amplify signal from currrent transformer (if its small to much).

Then you can make bridge rectifier with schotky diodes (low voltage drop). Then you need ADC (inside mcu or outside), so you need to get samples of current and do some math (to get effective value).

Lots of work.

Regards,

Mr.Cube

#### suryakant

##### Member level 5
ancrct-4.pdf

after CT, use bridge e.g. DF005 ,then using load of few ohms (or fraction of ohms)convert current to voltage and condition as per ur need.

write program 2 calculate rms value.

#### tobb

##### Member level 5
measure current ?

Hi .. Try this circuit from this application note
I have used it.. Working good with CT and AVR.

Also if you want to get wave sign.. Use Opamp to bring up center of sine to positive so you could measure both side of amplitude in positive voltage. or you could measure only one side of sine by using opamp cut off negative side.(but i don't know is it reading will the same as negative sine or not. You will nees some fast CPU like ATMEGA @ 16M. Take sample and then interpulate reading for error correction and then find out amplitude to get value and must calibrate it to real current value.

Last edited by a moderator:

#### snoopy

##### Member level 1
Re: measure current ?

What about TRUE RMS measure of AC current , any advice for that.

Bojan

#### 7rots51

##### Advanced Member level 4
Re: measure current ?

AD536 or similar parts from Analod Devices can do the true RMS measurement.search w*w.analog.com

#### suryakant

##### Member level 5
Re: measure current ?

snoopy said:
What about TRUE RMS measure of AC current , any advice for that.

Bojan

Just have a look at:

Last edited by a moderator:

#### philm

##### Newbie level 5
Re: measure current ?

OR
if you don't want to add any extra silicon bits.
Use the Mega 8 A/D converter Differential Input Channel with adjustable Gain of 10x or 200x to measure the AC current straight from the current transformer. (may have to add a bias voltage)
For RMS, just square the samples, and sum them. When you have a heap of these summed sqaured values, calculate the mean. RMS = root-mean-square.

#### snoopy

##### Member level 1
Re: measure current ?

Ok I look in analog.com and other solutions in forum , then I found on Linear technologies site IC LTC1966 witch is RMS to DC converter with 5V single supply and it need only two capacitators to work.

Does any of you use this IC , eny reports please.

Bojan

Status
Not open for further replies.