Jump to content
  • 0

Add up analogue inputs to average them?


Danellee

Question

Hi,

I would like to read a sensor (acs712) a number of times (20), add them all up, then divide them by the number of reads. So I can get an average. to give me a sort of analogue "debounce". Am I guessing the sum function?

I sincerely appreciate any advice you can all give me, I'm incredibly excited about learning all of this! ☺️

Edited by JColvin
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello,

I don't know what platform or host board you are using to read data from the sensor, but yes you can get an average value as you described, though I would not describe it as debouncing. You'll need an ADC of some kind to be able to properly convert the analog data from the chip of course.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

I got an idea for a long time...If you want the the average without any digital processing, then you could use an analog low-pass filter, which gives a running average.
The lower the filter corner frequency, the longer the averaging time.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...