Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Voltage ADC sampling speed question

Status
Not open for further replies.

moro

Member level 3
Joined
Jul 12, 2009
Messages
65
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,013
Hello,

i am working on a application where a shunt current voltage is measured.

The signal trough the shunt, has a frequency of 40khz

I want to use ADC121S101 which has 1 Msps at 12bit.

My question is, if i read the adc with a speed of 1000hz, what will be the resolution of the measured signal?

I am unsure, but 1 MSPS i guess it means 1000 0000 samples/ second. but if i read with a speed of 1ms, the true resolution will be 1ksps ?
 

Hi,

The resolution in voltage will still be 12 bits,
But you will get a completely different waveform, because you don't comply with nyquist.

In most cases you don't get useful results..
Are you aware of "undersampling" technique and the meaning of the sample results.

Klaus
 

Sorry for the confusion, instead of resolution, i meant sampling speed.

So with this ADC for the signal to be completely sampled,i need to wait 1 second? If i read the adc faster than 1 second it will result in undersampling?

Honestly this is the first time i am working with standalone adc chips

If i understand correctly to catch a correct sampling of the 40khz signal ( 40ksps) i need to run with my ADC twice the speed ( 80ksps). Is this correct?

So if i where to read the data from the adc at a speed of 1khz ( every 1ms), then this will result in a much lower undersampling situation, 1kbps ?

Given the current situation, to have a safe approach, i should read the adc no faster than 80 miliseconds ?
 
Last edited:

Hi,

So with this ADC for the signal to be completely sampled,i need to wait 1 second? If i read the adc faster than 1 second it will result in undersampling?
What are you talking about? Why 1s?

Nyquist says the sampling frequency needs to be higher than twice the input signal frequency - better say the highest frequency component if the input signal.

For a 40kHz pure sine signal (no overtones) you need a sampling rate higher than 80kHz.
If there are overtones: use the twice the highest overtone frequency of interest.

Again: if you read the ADC with 1kHz, then I doubt the values are useful.

How do you now come to 80ms?

Your values are confusing.

Klaus
 

1 MSPS i guess it means 1000 0000 samples/ second
Drop a zero.

If you only need frequency information of the signal you want to sample, twice the signal frequency is enough. If you need shape information as well, ≧5 times the frequency of the signal, or better, as Klauss says, the highest harmonic of the signal you are measuring.
 

Hello,

1 MSPS is 1000 000 , sorry for the extra 0.

The 80ms was coming from the fact that adc has a speed of 1 Msps = 1000 000 samples/second, this means in 80ms it wil reach 80000 samples.

So if i check the adc value at every 80ms, i should have a valid result, since my measured signal is at half the speed of the adc?

I am only intrested in measuring the voltage of the signal
 

Hello,

i am working on a application where a shunt current voltage is measured.

The signal trough the shunt, has a frequency of 40khz

I want to use ADC121S101 which has 1 Msps at 12bit.

My question is, if i read the adc with a speed of 1000hz, what will be the resolution of the measured signal?

I am unsure, but 1 MSPS i guess it means 1000 0000 samples/ second. but if i read with a speed of 1ms, the true resolution will be 1ksps ?

Which type of [measuring signal ] input frequency you are using will determine ADC sampling frequency.


for example am taking ADC frequency 80Khz .


So 1/80Khz = 12.5Microsecond .


ie, 1000000us/12.us =
ie,. = 1second/12.5us
= 80000 Sample per second


So if we takes 80Khz as ADC Vale we will get 80000 Samples per second

ADC121S101 Has
 

Hello,

1 MSPS is 1000 000 , sorry for the extra 0.

The 80ms was coming from the fact that adc has a speed of 1 Msps = 1000 000 samples/second, this means in 80ms it wil reach 80000 samples.

So if i check the adc value at every 80ms, i should have a valid result, since my measured signal is at half the speed of the adc?

I am only intrested in measuring the voltage of the signal

Still not clear where 80ms or 80000 samples come from.

If your input signal is 40kHz sine you need a sample rate higher than 80kHz.
Let's say 100 kHz is higher than 80kHz.
A sample rate of 100kHz means a new ADC value every 10us.
Not 40us, not 10ms and surely not 80ms..

Klaus
 

Hello,
So the sample speed is dictated by how fast i read the data from adc.
But what is the relationship between the 1Msps from the adc, and the read rate?
 

Hi,

We can not see if the 1MSps is a value you have read in a datasheet, nor can we know if it is the min, max or typ value.

* If an ADC really works with 1MSps, then you need to read the data every 1us.
* if 1MSps is the max value you may run the ADC with 100kSps, then you need to read the data every 10us.

You need to give clear informations: schematic, code....

Klaus
 

ADC121S101 is an 12 Bit SAR ADC with maximum sampling speed of 1 MS/s.

The maximum speed has no meaning if you are operating it with lower sampling rate. All scenarios you have discussed are resulting in a massive undersampling.
but if i read with a speed of 1ms, the true resolution will be 1ksps ?
Yes, 1 kS/s time resolution.

We should look at the signal nature to understand what the undersampling means and if it's necessary or useful at all to provide a low-pass filter.
 

Hello,

bellow i attached the circuit

Untitled.png




My intrest is to measure the current voltage on the shunt resistor for each motor phase.

The PWM signals for the mosfet bridge is 40khz.

What do you think?


Yes, 1 kS/s time resolution.

So if i where to sample at least with 100Ksps, then i should read no faster than 100 ms ? If this assumption is correct, then for me to be able to read the adcs with the microcontroler every 1ms, i need a much higher MSPS adc chip ( 100 MSPS adc chip?!?)
 

So if i where to sample at least with 100Ksps, then i should read no faster than 100 ms ? If this assumption is correct, then for me to be able to read the adcs with the microcontroler every 1ms, i need a much higher MSPS adc chip ( 100 MSPS adc chip?!?)
The calculation is completely wrong. If you want to sample with 100 KS/s, you need to read every 10 µs. Obviously that's impossible with a small microcontroller.

What's the purpose of the current measurement? Acquiring the average current? Overcurrent protection? How much PWM frequent current ripple do you expect?
 

If you want to sample with 100 KS/s, you need to read every 10 µs

Here is where the confusion arrives again...

I have the following pointswhich are unclear

1. the "MSPS" parameter what exactly does it mean? Its referring to the "most fastest signal" that the ADC is able to capture? Or its like a "internal clock" where its continuously sampling the signal?

2.the sampling speed of the measured signal is directly determined by the speed which the mcu is reading the adc 12bit of data, and NOT by the adc chip itself
 

1. the "MSPS" parameter what exactly does it mean?
Mega Samples Per Second i.e. 10^6 samples/second = 10 MHz sampling frequency. It is the maximum sampling frequncy the ADC can sample at. It can sample at less though.
 

Ok, so now things start to get more clear, this means the sampling speed is dictated by the mcu reading rate from the adc

Mega Samples Per Second i.e. 10^6 samples/second = 10 MHz sampling frequency
10^6 is not 1 MHZ sampling frequency?
 

What's the purpose of the current measurement? Acquiring the average current? Overcurrent protection? ....

The current measurement is used as average current on each phase, and for overcurrent protection i will have a shunt on the voltage bus bar ( +V) , here i expect to be "ripple free" and use this information for OCP

How much PWM frequent current ripple do you expect?
I think you lost me here...

Regarding the 10us sampling speed, i was wondering to use a 16bit SPI combined with a DMA in a circular buffer, where i read all the 3 adc's. The mcu device is a stm32f427 clocked at 180mhz

The adc reading will be synchronised with the pwm active edge, for each phase
 

Regarding the 10us sampling speed, i was wondering to use a 16bit SPI combined with a DMA in a circular buffer, where i read all the 3 adc's. The mcu device is a stm32f427 clocked at 180mhz

The adc reading will be synchronised with the pwm active edge, for each phase.
Sounds feasible with STM32, but will probably consume a considerable share of the available processor power. And where does the large amount of current samples go? If it's the input to a digital controller, what's its sampling rate?

Consider placing an analog low-pass before the ADC and reducing the sampling rate.
 

As i remember DMA has independent memory bus beside the main system pipe, therefore copying the data from spi peripheral to memory without consuming processor power should save me precious time.


The mosfet bridge is drived by 3 pairs of pwms, each pwm channel ( High side only) generates a interrupt on the rising edge ( capture compare event), in that interrupt routine i will check the curent values.

Basically i am capturing the adc sample on the active middle of the pwm signal. After that i will do a average and display the values, but this is SW, till then i need to have the HW

kk.png


Since each pulse cycle is executed once every 25 microseconds, reading the adc withing 1~2 microseconds i have enough time to proces the value

Regarding front end for the ADC i will place a 100ohm resistor and a 220pf cap between the buffer opamp and the adc input.

It will take some time until i will do the 1st tests, right now i am working on the pcb layout, so maybe at the end of january i will come with the 1st results.

Now i just need to know i have all the hardware resources available

Thank you very much for your suport, i will keep you informed how the projects evolves. I think i went to much for a school project lol
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top