Re: RMS current on AVR microcontroller
- From: MooseFET <kensmith@xxxxxxxxx>
- Date: Tue, 11 Dec 2007 06:36:48 -0800 (PST)
On Dec 11, 2:00 am, Jamie Morken <jmor...@xxxxxxx> wrote:
Hi,B
I am using a AVR microcontroller at 4MHz and have a varying frequency
(50Hz max) sine wave from an allegro current sensor, is there a low
computational algorithm to calculate a close approximation to the RMS
current for a signal like this? The signal into the allegro current
sensor is a sine wave within about +-3amps.
cheers,
Jamie
Z=X*X*Y*Y ----!!----- Z=1/X
-------- A ! ! -----
Signal --->!X Z!----\/\/---+--+---/\/\----+-+---!X Z!--Out
! Y ! ! ! -----
------- ---!-\ !
! ! >---------+
! 1V--!+/ !
! !
--------------------------------
B settles to the point where the average at A is 1V.
The mean square of A must equal the mean square of 1/B
B is "DC" so B must be a DC 1/RMS
If you were using an 8051, I would be able to suggest that a
sqrt(32bit) = 16bit will take less time than the divide needed for
this
routine.
.
- References:
- RMS current on AVR microcontroller
- From: Jamie Morken
- RMS current on AVR microcontroller
- Prev by Date: Fake parts - anyone seen anything like this?!
- Next by Date: Re: Fake parts - anyone seen anything like this?!
- Previous by thread: Re: RMS current on AVR microcontroller
- Next by thread: Re: RMS current on AVR microcontroller
- Index(es):
Relevant Pages
|