0

I'm thinking about a project with RPI. I need 4 or 6 analog inputs with sample rate between 500 and 1000 samples per second and 2 or 4 digital output as response of processing the input signals. Between 100 and 300 responses per second.

I reviewed this board , but I'm not sure if RPI achieves real time processing. My questions are?

  1. RPI needs a RT kernel?
  2. Is it necessary an independent board (maybe this arduino?) with RT adc to send the sampled values with a certain sample rate to RPI?
  3. Or 1 and 2 together.

Thanks.

1 Answer 1

1

I'd go for idea 2, using an Arduino for the ADC and something fast on the Pi (maybe C if you don't mind getting your hands dirty) to do the processing, and communicate between the two using serial (there are a few blog posts/instructables on how to hook up an Arduino to a Pi via serial). IIRC it's just enabling some options in the boot.txt on the Pi and getting baud rate right on both of them.

3
  • Serial data is buffered and you won't have to worry about time constraints on the pi side -- the buffer is 64 KB and it is capable of much faster transfers than the Arduino's 115 Kbaud which is 14.4 KB/s of data. That's probably the bottleneck as I am pretty sure it will be able to sample faster than that (it's not clear to me here how many bits a sample would be).
    – goldilocks
    Sep 1, 2016 at 14:35
  • @goldilocks wasn't aware of it being buffered, thanks. As for C as a choice I wasn't sure if the processing would be a bottleneck in python, as a lot of DSP applications use C for speed of processing
    – Luke Moll
    Sep 1, 2016 at 14:37
  • I guess it depends on what is being done with the data on the pi; simply reading it at that rate is a very light task but if there is a lot of processing then you might have to get worried about how fast it can be done using whatever methodology.
    – goldilocks
    Sep 1, 2016 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.