Average Values and digital filter ...
I am hoping somebody can give me any hints or directions to my problem…although I ve search the forum i ve not come across to any solution to my problem…
There it goes: I ve done a digital temperature controller, and everything works fine, but I need to implement a new functionality and I really don’t know how…:
I am constantly reading the temperature in one spot and have to estimate the temperature in the product ( for that I use a kind of offset temp value) but the problem itself is that where i read the temperature it fluctuates much more than in the product (because of the thermo mass of the product) so I need to show a temperature that it is something like an average value with least variations possible…
I guess I could use an array of temperature, drop the top and the end values and calculate the medium…but is here any easier way ? I really don’t want to re-write some big parts of the code ….
I also was working around some digital filter like the concept : temp_med = (20* temp_now + 80*temp_old )/100 , ETC …but I really was hoping something to discover something simple …
Any help from the pros ?
Thanks a lots, I am really feeling lost…
Averaging lots of numbers
Hi all,
I have the need to slow things down a bit. I'm running a 18F1330 at 32 MHz executing a sense loop for ultrasonics each 32 mS. I have tried to use DT's averaging routine with a 250 reading average, but it still reacts way too fast. I need to dampen it to a 2 or 3 second response so that it doesn't drive the mechanical parts nuts.
It doesn't look like I can just change the AvgCount to a larger variable without messing it up.
Anybody ran into this before?
Thanks for any input while I try and think through this.
Bo