Re: RMS current on AVR microcontroller



On Dec 11, 2:00 am, Jamie Morken <jmor...@xxxxxxx> wrote:
Hi,

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
B
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.


.



Relevant Pages

  • Re: RMS current on AVR microcontroller
    ... I am using a AVR microcontroller at 4MHz and have a varying frequency ... The signal into the allegro current ... sensor is a sine wave within about +-3amps. ...
    (sci.electronics.design)
  • Re: RMS current on AVR microcontroller
    ... The signal into the allegro current ... sensor is a sine wave within about +-3amps. ... For signals 50Hz to DC how many points ...
    (sci.electronics.design)
  • Re: RMS current on AVR microcontroller
    ... The signal into the allegro current ... sensor is a sine wave within about +-3amps. ... If you're sampling the signal through the ADC anyway, you may be able to brute force it, by just summing the squares. ...
    (sci.electronics.design)
  • Re: RMS current on AVR microcontroller
    ... The signal into the allegro current ... sensor is a sine wave within about +-3amps. ... 3phase rectifier and would like to know the cycle ...
    (sci.electronics.design)
  • RMS current on AVR microcontroller
    ... I am using a AVR microcontroller at 4MHz and have a varying frequency ... The signal into the allegro current ... sensor is a sine wave within about +-3amps. ...
    (sci.electronics.design)