Help me understand bit rate and sampling rate

Thread Starter

robotDR

Joined Mar 17, 2020
138
I am looking to build a circuit with several hall sensors in a linear array (DRV5056A1-Q1) and a micro controller. Currently looking at the new raspberry pi RP2354.

I need to be able to read the hall sensors very quickly. The RP2354 has a 12 bit adc. The 12 bit doesn't really mean much when it comes to how fast it can read its own adc right? Just how many significant figures the reading can get to?

Is there any reason using an ADC chip that talks I2c or spi to the RP2354 could be faster?

Thanks.
 

MrChips

Joined Oct 2, 2009
34,628
Sampling rate and resolution are the first two important parameters to consider. They are very different.

The number of ADC bits determines the resolution or voltage step size.
A 12-bit ADC can convert the input voltage into 4096 voltage steps. If the input voltage range is 0 to 10 V, the resolution is 10/4096 V or 2.44 mV. This does not take into account any noise in the system.

In terms of number of significant figures, 4096 steps is equivalent to 3½ significant figures.

Sampling rate, i.e. the number of samples per second, determines the highest frequency that can be sampled. Sampling theory demands that the sampling rate must be at least twice the maximum input frequency.

The corollary is that you must use a low pass filter to attenuate all frequencies that are higher than one-half the sampling rate. If you fail to do so, the result is that higher frequencies are folded back into lower frequencies. This phenomenon is called aliasing.
 

BobTPH

Joined Jun 5, 2013
11,463
need to be able to read the hall sensors very quickly.
Quickly does not say much in the realm of electronics. It might mean once every second or a million times a second. Give us a number.

Better yet, describe the system that these hall sensors are a part of.

Don’t think you are helping us by sparing us the details. The mistake is always not giving enough information rather than giving too much!
 

Papabravo

Joined Feb 24, 2006
22,058
When using a serial interface like I2C or SPI the maximum sampling rate will be limited by the trnasfer time of the serial data. Each transfer will involve 12 bits of data plus some overhead bits. The number of overhead bits will depend on which protocol you select and the overall design of your system.
 

Ramussons

Joined May 3, 2013
1,567
I am looking to build a circuit with several hall sensors in a linear array (DRV5056A1-Q1) and a micro controller. Currently looking at the new raspberry pi RP2354.

I need to be able to read the hall sensors very quickly. The RP2354 has a 12 bit adc. The 12 bit doesn't really mean much when it comes to how fast it can read its own adc right? Just how many significant figures the reading can get to?

Is there any reason using an ADC chip that talks I2c or spi to the RP2354 could be faster?

Thanks.
Putting it simply, the Bit Rate = Sampling Rate x Resolution.

For a 12 bit ADC, The Bit Rate will depend on how many Sensors are Read per Second.
If 7 Sensors are Read per second, the Bit Rate will be 12 x 7 = 84 Bits / Sec There will be additional bits for Guard / Sync / ... if this Data is being transferred over a link.
 

Thread Starter

robotDR

Joined Mar 17, 2020
138
Trying to capture the movement of a rod and confirm the speed in which it made that movement. It will move about 1.8" and it should take 20 ms. So I am using hall effect sensors and a micro to capture that movement and calculate the time and confirm that each unit I put to this measurement will be about 20ms.
 

MrChips

Joined Oct 2, 2009
34,628
Trying to capture the movement of a rod and confirm the speed in which it made that movement. It will move about 1.8" and it should take 20 ms. So I am using hall effect sensors and a micro to capture that movement and calculate the time and confirm that each unit I put to this measurement will be about 20ms.
Let’s say something happens over 20 ms and you want to take 20 readings over that duration. You need to sample every 1 ms. Your sampling frequency will be 1000 samples per second.
 
Top