Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Reading Analog Vallue

Status
Not open for further replies.
I have this doubt about reading analog values from a sensor especially if i take an example of current sensor, read the value of the current at every 1 sec from the sensor and if the value changes and has different values at different points before 1 sec, how should i capture it? What is the maximum rate i should sample. I think I should be thinking in terms of Nyquist theorem, but it is continuous signal, what is the sample rate? Please help.
 
read it as often as you like, as long as the cap in the adc module can charge up to the value in time then its ok....most uc's have a maximum sampling frequency, -you see it in the datasheet
 
Are you measuring AC or DC current?

Assume DC.
1)If you add a RC between the sensor and the ADC, then the Resistor&Capacitor will average the signal. Information in between samples will be averaged/stored on the cap.
2)Another way is to sample fast and in software average many samples back to 1/sec.
3)I have found that most current is random. (house hold power usage) When we samples 1/sec or 1000/sec we got the same answer. This under sampling is not good for a very expensive piece of test equipment but for a low cost meter it works well.
 
You're right about Nyquist: You need to sample at at least twice the highest frequency you're interested in measuring - in reality, you need to sample a bit fater than that to let your anti-aliasing filter roll-off sufficiently.

That hard question is, of course, what's the highest frequency you're interested in resolving?
 
I really don't know what is 4-20ma type. The current sensor is hall type sensor and it's output is in volts. Iam measuring Dc current.
 
The current sensor is hall type sensor and it's output is in volts.
OK not 4-20mA.
What hall sensor? Some have a averaging (low pass filter) built in.
What current? motor current?
Why 1 measurement/sec?
Does the current change faster than one second?
We do not know much!
 
Take 16 samples then work out the average by adding them together and dividing by 16 by shifting right 4 times to get the result.
 
I am not providing sufficient information every time. The current i am measuring is vehicle battery current. I have chosen 1 sec randomly. I am not sure if in built low pass filter is available.
 
The NYquist and Shannon theorems apply only to digitizing an analog waveform such as audio or video. If you were trying to ecord the DC current waveform for later playback or analysis, then maybe. But it sounds like you want to measure the current to display it for a person to read, and that can be much slower. How slow is completely up to you and your application. If capturing the brief peak current transients is important, there are circuits to do that. If you just want to know the average curent, then the averaging filter described above will work. It all comes down to what you are trying to achieve.

ak
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top