Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

Automation, sensing and robotics • Re: Accumulating Serial Delay Between Pico 2 and Pi 4B

$
0
0
Goal: Real-time or near real-time ECG acquisition @ 360Hz, then classification inference in Pi 4B
I think it might have become time to explain what that means to someone who's just a 'dumb coder'.

I get that you've got an ADC hooked up by a wire to a drawing pin pushed into your victim's subject's chest and a 0V wire tied tightly to their ankle, are sampling that ADC at a 360 Hz rate and want the data passed to the Pi.

First: How real time does it need to be. The sampling of ADC data implicitly will be, but the Pi receiver seems to be writing a file to disk so doesn't seem to me to need to be real time per se. So long as the Pi gets every ADC reading taken and writes it to disk would that be enough ?

I suppose I am also asking is this 'classification inference' done from the data written to file after the capturing and transfer is complete, or does it need to happen while the data is being received ?

Second: How long would the longest capture run for, or alternatively how many samples would there be in total. The two are interchangeable, 1 second = 360 samples.

Interesting fact: On my RP2350 I find I am able to store over 195,000 ADC samples with timestamp deltas before it blows up with "out of memory". That allows sampling for about 9 minutes without having to send anything. So capture, stop, send to Pi might be an option for a simple life.

Assuming it's not going to be that easy I think you can do it, and with better real time transfer, by sampling into a ring buffer and spooling that out at a 360 Hz rate or equivalent to that. I think that takes you back to what you had except making it as optimal as it can be to avoid stalling which I suspect is the issue you are currently experiencing.

Statistics: Posted by hippy — Wed Oct 29, 2025 2:30 pm



Viewing all articles
Browse latest Browse all 8082

Trending Articles