circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 99, October 1998
X-Y Graphing Data Logger


by Alberto Ricci Bitti

Start Machine Muscle Using Componentware Low-Power Guys Flash Risc Glue The Graphic Engine Casio Protocol Main Code Inside The Box Setting up the Casio First Graph Modeling The Data Broader Vision Software, References & Sources

MODELING THE DATA

By means of regression, the measured data can be shaped into a function that fits into a nice formula. Formulas are not only easy to implement, they also give us a better understanding of the data and can significantly reduce the number of points needed for calibration.

In this example, the original data set is made of 26 points. Knowing that a sensor’s output is a second-order function enables a three-point-only calibration without appreciable degradation. The calibration procedure can then be reduced to reading the output at three convenient positions (empty, full, and halfway).

On the Casio, complex regressions are a single keystroke away. When a graph is displayed, as in Photos v, vi, and vii in the sidebar, the softkey line lists a variety of popular regression functions to choose from. Pressing x brings out the coefficients for first-order regression line. DRAW puts a graph over the sampled data.

As you see from Photo vi, a simple straight line leaves a lot to be desired. The shift-zoom combination brings up the zoom menu, while pressing one of the arrow keys pans the whole display in the indicated direction.

The X^2 softkey switches to the second-order regression. This time, the graph is very near to almost all the samples. The overall result doesn’t vary appreciably regardless of the regression order (e.g., x3, x4). Other regression models (e.g., logarithmic, exponential) don’t give significantly better results.

You can interact with your data and try out as many functions as you like, exploring the possibilities without having to write a single line of code. It is impossible to list here all the functions in the 425-page Casio FX9750G user guide. There’s also a full set of statistical tools—useful when monitoring production sample parameters, weather data, pollution, and so on.