Adding Processing support
Nov 02, 2014
Using the serial interface with Processing
2014-11-02: Added support for RealtimePlotter and arduplot
I learned, that the main part on building a sensor is the software to grind and polish the signals read from the hardware sensor. In this case it was the Allegro ACS758LCB-100U hall effect current sensor.
So I read about digital filtering and use 3 cascaded the Moving Average
algorithm to smooth the
sensor reading.
1 //filter use in main.c
2 AddToFloatAvg(&cur_filter1, (cur_mea_val));
3 AddToFloatAvg(&cur_filter2, GetOutputValue(&cur_filter1));
4 AddToFloatAvg(&cur_filter3, GetOutputValue(&cur_filter2));
5 cur_adc_res[act] = (GetOutputValue(&cur_filter3));
Each filter has 9 readings. For details see src/floating_average.h
and .c
files.
By testing I used the DX9 transmitter, recorded to the SD card and read that using the TLM Reader. This was a long procedure. Since I already put a header with the Rx, Tx serial pins on the board it shouldn’t be that much of a problem to show some output on the Mac using the Processing tools.
I found two great serial monitors based on Processing.
Please see the RealtimePlotter and
Arduplot. Thanks to their contributors. Just uncomment
the lines in the config/conf_board.h
file.