Jump to content
43oh

Reduce noise on ADC12


Recommended Posts

Hi guys,

I'm using the MSP430 ADC12 function to make analog to digital conversion. But seems like the digital value I get always not the same. For example for a fixed voltage value, I get, 13058, 13018, 13099, 13045, 13078... and so on all different. Is it the noise that make the value fluctuated? If yes, how do we reduce the difference / noise of each value?

Link to post
Share on other sites

Something is not right. I have not worked on the MSP430 ADC yet. But you should be getting values within a 12 bit range(0 - 4096).

A little fluctuation is ok. It is not going to stay exactly at a number, even for a digital value, unless you max it out to 4096 or GND it.

Add a low pass filter to you code, that should help.

Link to post
Share on other sites
Something is not right. I have not worked on the MSP430 ADC yet. But you should be getting values within a 12 bit range(0 - 4096).

A little fluctuation is ok. It is not going to stay exactly at a number, even for a digital value, unless you max it out to 4096 or GND it.

Add a low pass filter to you code, that should help.

 

Sorry about the values I give. It is a oversampled value. I use ADC12 and oversampled it to 16bit. I try oversampling to reduce the noise. That's why it is more than 4096.

But even after oversampled, the value is still fluctuated. How do we reduce the noise further?

By the way, any sample coding on the low pass filter?

Link to post
Share on other sites
Out = ( ( ( Out * 3 ) + IN ) / 4 )

 

This is a simple filter. In this, take 3/4 of the current value and 1/4 of the last value to get a filtered value.

You can change the weights however you please.

 

What do you mean by weight? Is it the 3/4 and the 1/4?

Then, how do we choose the weight?

Link to post
Share on other sites
mmm... Three parts of the current value and one part of the new value. This adds up to four. Does it make sense?

Then how do we choose the weight? What is a suitable weight?

What the filter is doing is keeping a running average so that one large fluctuation won't change the value a whole lot. Right now, for every input, it keeps 3/4 of the current value and averages in 1/4 of the new value. You can change these values through some reasoning and trial and error to get what you want.

Link to post
Share on other sites

Ok. I'll try.

Another thing, I notice that the the difference of the ADC value that I convert out with the multimeter value I measure is around 0.01V. For example, if my multimeter show 1.50V then the ADC value I get will be 1.49V. Is this normal? Or is it my multimeter got problem? How do we know the ADC value we get is accurate?

Link to post
Share on other sites
How do we know the ADC value we get is accurate?

You can't. http://en.wikipedia.org/wiki/Metrology

 

So we act as if the value we get from the ADC12 is accurate?

 

Another thing, so is it true that I can only have 12 channel (A0-A7, A12-A15) to measure external value for ADC12? Can the other 4 channel (Veref+, Vref-/Veref-, Temperature diode, AVcc-AVss/2) be use to input external value?

Link to post
Share on other sites
  • 2 weeks later...

I'm using the MSP430F5529 mcu and I set it to use the internal reference voltage of 2.5V for the ADC.

Now are we able to tap out it's internal reference voltage of 2.5V and measure using multimeter? Is there some output for it or pin so that I can measure? Cos I can't seem any from the datasheet.

Link to post
Share on other sites

I've found out that the internal reference voltage can be output at a pin Vref+ after searching the datasheet and you need to enable the reference output register ADC12REFOUT. Then I can measure the +Vref pin which is exactly 2.5V with my multimeter.

 

But now the problem is the ADC12 conversion result is not accurate anymore for any channel. Before I enable the ADC12REFOUT register, when I measure 2V with the ADC, I can get the raw value for example 3310 from one of the channel which is quite accurate. But now I only get raw value around 205 which is way below the actual value. Why? Is it that there are other settings that comes with ADC12REFOUT register? Or is it that ADC12REFOUT register is not suppose to be use like this? Cos when I disable it, I can get the accurate value again.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...