Prior art / inspiration
Some prior art and inspiration comes from these excellent projects:
Hardware
The STM32f303RE was chosen for it's 4 very fast ADCs and included op amps with PGA. This reduces board complexity somewhat, and allows for more control programatically. This chip also comes on a very affordable NUCLEO dev board w/ included programmer/debugger!
Giant bag of mostly peripherals
Extensive use of DMA and peripheral features allows this chip to capture and store data in circular buffers without using any CPU, as well as using ADC channel watchdogs for threshold 'event' detection. The CPU only gets involved when one of the channels exceeds set thresholds.
trigger +------+ dma +---------------+
+-------> | adc1 +------>+ circ buffer |
| +------+ +---------------+
| +------+ dma +---------------+
+-------> | adc2 +------>+ circ buffer |
+------+ | +------+ +---------------+
| tim3 +--+ +------+ dma +---------------+
+------+ +-------> | adc3 +------>+ circ buffer |
| +------+ +---------------+
| +------+ dma +---------------+
+-------> | adc4 +------>+ circ buffer |
+--+---+ +---------------+
|
|adc 1-4 watchdogs
+-------------------> captureEvent()
Once an event is detected, the capture continues for a bit less than the total buffer size. This allows both leading and following data to be captured for further analysis.
Hi Ben,
Great project here, congratulation and thanks for sharing.
I am working as well on a similar set up for a interactiv board game but facing also lack of precision in the detection with use of a threshold. Could you tell a bit more about the filtering and cross correlation methods that you used here?