Question Maximum number of channels Raspberry Pi 4 used as a data logger

May 11, 2023
2
0
10
Numerous websites say that a Raspberry Pi 4 can be used as a data logger. But I can’t find anything that says how many channels of data can be simultaneously recorded. I also can’t find anything that says what the maximum data rate is in samples per second.

Does anyone know the answer to these questions? Thank you in advance.
 
Last edited by a moderator:

Ralston18

Titan
Moderator
Not (full disclosure) a direct answer.

But more information is needed:

How many channels are required?

What data sampling rate is required? Overall and per channel?

What "Numerous websites"? Links?

Overall I would expect that there are some trade-offs involved.

For example: the more channels to be sampled then the maximum data sampling rate per channel may decrease.
 

OldSurferDude

Reputable
May 18, 2019
168
30
4,640
since there are no analog channels on the RPi, you'll probably be using ADC that are on the SPI bus I2C bus. So your research would be
1) devices can there on SPI bus? how many on the I2C bus? Does the RPi meet the spec for that many devices
2) Then you'll look up the data transfer rate and multiply that by the number of ADC devices. (don't forget to add in the time to the storage device.)

Have fun with that

OSD
 

ajohnson30

Distinguished
Jul 26, 2012
42
5
18,545
Yea...your question is leaving too much out. You can easily just look at the RPi GPiO, for instance, and say look:
There's 26 GPiO pins available there, you could set up 13 data loggers. But the RPi also supports i2c, and with a little extra hardware, you could set up a i2c data logger, maybe even with a logging buffer, and those are addressable, so there's 2 i2c busses, each with a theoretical limit of 64 i2c devices...

But all of this is theoretical. What are you trying to do?
 
May 11, 2023
2
0
10
Wow thank you for such a well thought out reply. I will be studying the performance of various types of air conditioners. So I will have six temperature sensors:

Indoor temperature
Outdoor temperature
Outdoor Hot Side Inlet air temperature
Outdoor Hot Side air exit temperature
Indoor Inlet air temperature
And most important the cold air flowing into the room

I'm a mechanical engineer by training and work experience. So I don't have a significant electrical equipment background. I did pretty extensive searching for various types of temperature sensors. A lot of the temperature sensors on Amazon talk about "I2C" Standard format. I had to look that up. Everything I was finding on that clearly presupposed a good deal of knowledge in this area. The link you sent me led to the nearest thing I could find for a beginner.

In searching for temperature sensors, units made for taking data can be fairly expensive. But I found a few hundred of a great variety of types on DigiKey.com, many of them only a couple to a few dollars. I would search the data sheets for what is the output voltage. The vast majority don't say because they don't work that simply. I eventually realized that the reason Those sensors were so cheap was that they go in to Consumer and Industrial Products and are being bought by the thousands. I read dozens of DataSheets and none of them explain how they work.

But I found one that gave me a little insight.

Angst+Pfister Sensor SMT172-TO18

https://www.digikey.com/en/products/detail/angst-pfister-sensors-and-power-ag/SMT172-TO18/17827925

Here's a short paragraph from that sensor's data sheet.

(The SMT172 operates with a supply voltage from 2.7V to 5.5V. The typical active current of only 60µA, the high speed conversion over 4000 outputs per second (at room temperature) and an extremely low noise makes this sensor the most energy efficient temperature sensor in the world (0.36µJ/measurement). The SMT172 has a pulse width modulated (PWM) output signal, where the duty cycle is proportional to the measured temperature. This makes it possible that the sensor can directly interface to a MCU without using an Analog-to-Digital Converter (ADC). Today, the hardware Timer in a MCU to read our PWM signal has become available almost universally, fast in speed and low in cost. Therefore, it is extremely easy for any user to get started with this sensor and achieve a very quick time to market.)

I read enough about Raspberry Pi units to see the references to microcontrollers and see how sophisticated they are not only recording data but controlling other device types. All I need to do is take data.

So I am leaning toward a specific data taking product like the one below.


I have another project studying the forces on a cylinder and on a sphere dropped into still water. It's just crazy how high the forces are. Water does not like to get out of the way. The force on a cylinder peaks at about 5.5 times the force of that same cylinder stuck in a water flow current the same velocity as the dropped cylinder hits the water. It's why a belly flop can really hurt. For this I need an absolute minimum of 40,000 data points per second to have the initial Force Peak populated by 11 to 121 data points. It's also freaky how soon the force peaks, When only about 5% of the cylinder's volume is beneath the initial water surface. That data logger can do 160,000 per second on one channel, 80,000 on two channels etc.
I'm interested in anything else you have to say or any recommendations you may have.

Thank you!!

Peter McFadden
 

ajohnson30

Distinguished
Jul 26, 2012
42
5
18,545
Honestly, I tend not to "reinvent the wheel" for these sorts of things, and I look for RPi modules at adafruit.com or pimoroni that are already somewhat built with interfaces to do what I'm looking for.

That said, it looks like someone interfaced a smt172 with a RPi like you're looking to do, but using Windows 10 iot OS

As far as the other DI-2108 device, it looks like they only supply windows libraries & software with it, so I don't know that a RPi is the best choice for that.