Thread subject: Homeroasters - Home Roasting Coffee Community :: 4-channel TC meter and datalogger project

Posted by JimG on 04/05/2011 9:03 PM
#735

Quote

Bhante wrote:

Quote

bvwelch wrote:
enhancements for the RoR (from Gesha):
http://bvwelch.co...27-706.jpg

I noticed something a little bit funny with the RoR curve. Firstly the highest value of RoR is from about 1:50 to 2:30, where it goes right off scale. However the equivalent portion of the BT curve is significantly more shallow than the previous period from 1:25 to 1:50. Is this just due to the averaging process, or is something else at work? On the top line it says 5s average, which I assume is from the Processing section. Is there some additional averaging in the Arduino section?

Probably what you are seeing is the lag that gets introduced by the filtering (which is performed on the Arduino side). Depending on the amount of filtering selected, this lag time can be 20 seconds or more.

A very noisy signal, such as that from a small mass TC in a roaster with a lot of air movement, will require much more filtering to produce a usable RoR trace than will a higher mass probe in, say, a Hottop.

Quote

Bhante wrote:
Whilst on the theme of RoR, I have always been puzzled by the line in aBourbon where v = round( C_TO_F( tempC ) / D_MULT ) - why do you round this to an integer, and then use the rounded value as input to the filter - isn't this going to add random noise from the rounding errors?

I don't recall now my thinking around storing the temperatures as integers. It seemed like the right thing to do at the time, and it may yet prove to be the best way (although it does look odd). At the moment, there are other more pressing needs, so I plan to put off reopening this issue for a while. What I am fairly confident of, though, is that it does not introduce any significant error or additional noise.

Quote

Bhante wrote:
Also a little hint: I find it rather hard to understand what is going on in the the filtering, a bit more commenting here would be really nice.

It is a very simple low pass RC filter. I tested a number of different options (averaging N samples, Butterworth first order, Butterworth second order, etc.). The RC filter was at least as effective as any of them, and is very simple to implement and adjust. Here is a link:
http://en.wikiped...ass_filter

The difference between that reference and my code is that I defined the filtering level slightly differently. My filtering level = 100% * (1- alpha).

Choosing a filtering level of 0% passes all data through unchanged, while a filtering level of 100% ignores all data points past the first one, i.e., filters out all changes. Those are the extreme values.

Values between 70% and 95% for RoR seem to be the most useful. This is selectable at compile time if you would like to experiment. The best way to test the effectiveness of a filter is to capture some real data and simulate the filter in Excel. I did this many times before settling on the RC filter that is implemented in the library.

Jim