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.

12 bit ADC troubles

Status
Not open for further replies.

matt_d82

New Member
Hi everyone. I am trying to make use of a 12-bit ADC to eventually read voltage values coming out of an accelerometer. But for now, just to get things going, I made a simple voltage divider out of resistors so that I can have a steady value. The problem is, I don't get a steady value in from the ADC, even capacitors all over the place. I'm getting values jumping +/- 10 out of 4096. I first tried this with the built-in ADC of a dsPIC30F4013 and got jumping values. I also tried using a MAX1246 12 bit ADC and got the same problems.

The power supply is the 5V supply out of my powered breadboard. It seems very stable. In addition, with the MAX1246 I was running it through a 3.3v regulator.

So my questions are:
1) Where is it important to put Capacitors?
2) Does anyone have any examples of how to make good use of a 12-bit ADC?

Thanks!
 
My question is "what on earth did you expect"?

Using a 5V reference
Code:
5 * (20 / 4096) = 2.4 mV

That is really quite extrordinary.
 
Papabravo said:
My question is "what on earth did you expect"?

Using a 5V reference
Code:
5 * (20 / 4096) = 2.4 mV

That is really quite extrordinary.

The accelerometer I will eventually be using only have a 3.3V reference.... so it's only going to get worse. Maybe you could tell me why they bothered with a 3.3v output if it's so hard to make use of it?
 
hi matt,
A simple resistive voltage divider from the +5V rail, supplying the remainder of the circuit is not a good choice for a 'stable and clean' voltage source for testing.

Whats the conversion stabilty when the ADC inputs are grounded at the ic.?
I'm assuming a single ended input.

In the 12 and 16 ADC's circuits I use. I expect less than 1mV 'dither' in the conversion value.

Whats your screening and earthing arrangement.?
 
Papabravo said:
My question is "what on earth did you expect"?

Using a 5V reference
Code:
5 * (20 / 4096) = 2.4 mV

That is really quite extrordinary.


i know it another

if the refrence is 5 so the step siza is

(5/4096) = 1.2 mv
 
matt_d82 said:
Hi everyone. I am trying to make use of a 12-bit ADC to eventually read voltage values coming out of an accelerometer. But for now, just to get things going, I made a simple voltage divider out of resistors so that I can have a steady value. The problem is, I don't get a steady value in from the ADC, even capacitors all over the place. I'm getting values jumping +/- 10 out of 4096. I first tried this with the built-in ADC of a dsPIC30F4013 and got jumping values. I also tried using a MAX1246 12 bit ADC and got the same problems.

The power supply is the 5V supply out of my powered breadboard. It seems very stable. In addition, with the MAX1246 I was running it through a 3.3v regulator.

So my questions are:
1) Where is it important to put Capacitors?
2) Does anyone have any examples of how to make good use of a 12-bit ADC?

Thanks!

Matt,

I've implemented A/Ds up to 18 bit resolution. Above 12 bits, things may become problematic. Generally, four areas *MUST* be taken care of:

1. Trace layout. We generally keep the analog traces on a different layer, sandwiched by two ground planes on the PC board. Proximity and orientation of the A/D closest to the analog signals is really important. Winding A/D traces thru the digital lines is suicide.

2. Power supplies. We NEVER use the digital supply for the A/D, no matter how much bypassing you put on it. We ALWAYS use a separate analog power supply for the A/D and associated circuitry. We ALWAYS use an analog ground separate from the digital ground, that is tied together back at the power supply IN ONE SPOT. Don't forget the analog ground planes already mentioned.

3. We use a precision reference that is placed as close to the A/D as possible, properly bypassed, and using the analog power supply.

4. On some especially sensitive applications, we use an interposing latch that further separates the digital outputs of parallel bus based A/Ds from the uP's data bus.

On a final note, are you using the right type of A/D? How fast are your signals changing? If you can get away with using a dual slope A/D, you may consider it. You may also consider some software routines to average several A/D conversions to smooth out the signal. HTH
 
Papabravo said:
My question is "what on earth did you expect"?

Using a 5V reference
Code:
5 * (20 / 4096) = 2.4 mV
That is really quite extrordinary.
As fedail pointed out, you slipped the decimal point. The result of your equation is 24mV.

Matt_d82, I agree with Analog. Follow his advice and you will see vast improvement in your dither results.
 
Thanks for the help everyone. I separated my DGND and AGND and connected them at one point. That change alone got me a much more stable reading, with a variation of only +/- 1 (with the occasional +/- 2) out of 4096. Digital and Analog power supplies were already separated.

ericgibbs said:
hi matt,
A simple resistive voltage divider from the +5V rail, supplying the remainder of the circuit is not a good choice for a 'stable and clean' voltage source for testing.

Whats the conversion stabilty when the ADC inputs are grounded at the ic.?
I'm assuming a single ended input.

In the 12 and 16 ADC's circuits I use. I expect less than 1mV 'dither' in the conversion value.

Whats your screening and earthing arrangement.?

The voltage divider was just for the ADC input. It isn't used for anything else. Not great, but I thought it would work for testing this. When I grounded the ADC input, it read a constant 0. I don't know what you mean by screening, but my grounding was not so pretty. As mentioned above, I fixed that.

Analog said:
Matt,

I've implemented A/Ds up to 18 bit resolution. Above 12 bits, things may become problematic. Generally, four areas *MUST* be taken care of:

1. Trace layout. We generally keep the analog traces on a different layer, sandwiched by two ground planes on the PC board. Proximity and orientation of the A/D closest to the analog signals is really important. Winding A/D traces thru the digital lines is suicide.

2. Power supplies. We NEVER use the digital supply for the A/D, no matter how much bypassing you put on it. We ALWAYS use a separate analog power supply for the A/D and associated circuitry. We ALWAYS use an analog ground separate from the digital ground, that is tied together back at the power supply IN ONE SPOT. Don't forget the analog ground planes already mentioned.

3. We use a precision reference that is placed as close to the A/D as possible, properly bypassed, and using the analog power supply.

4. On some especially sensitive applications, we use an interposing latch that further separates the digital outputs of parallel bus based A/Ds from the uP's data bus.

On a final note, are you using the right type of A/D? How fast are your signals changing? If you can get away with using a dual slope A/D, you may consider it. You may also consider some software routines to average several A/D conversions to smooth out the signal. HTH

Doing my grounds as you suggested helped a lot. I am working on a breadboard for now so I can't do much about trace layout, but I will keep your suggestions in mind for when (if) the project goes to a PCB. I will also consider getting a precision voltage reference.

The accelerometer I am using is rated for 350Hz bandwidth and I am sampling each of the 3 axis at 10ksps. I will look into a dual slope A/D to see if it might work.

Thanks!
 
matt_d82 said:
I am working on a breadboard for now so I can't do much about trace layout


Theres your main concern for the dither, as the breadboard tracks will act like capacitive loads, playing havoc on a steady referance.

Just on that, make sure your using a 0.1uF ceramic cap as close to the PIC's Vdd/Vss as possible to help bypass any high end noise - you will notice the stability increase straight away by doing so if you haven't already
 
Status
Not open for further replies.

Latest threads

Back
Top