0
\$\begingroup\$

BACKGROUND

This is my first question on Stack Exchange so apologies for any missteps. I'm currently working on a project measuring tilt outputing an analog signal that ranges from -2V to 2V. But the device I'm using has a precision of up to 1mV. I am looking for a way to measure the analog signals without losing accuracy.

SOLUTIONS I HAVE TRIED

I tried using a resistor divider network as a level shifter. enter image description hereI soon discovered that the capacitor in my ADC chip (MPC3008) pull the voltage down so I added a unity gain buffer using a rail to rai op amp (MCP6281). I connected the ADC as shown on the Adafruit page and using the 3.3V as supply. This solution only works to about 10mV.

I also tried some other various level shifting circuits like the ones suggested here but the op-amp seemed to be affecting the accuracy of the signal by pulling up the voltage.

I only have a unipolar power supply to work with also.

QUESTIONS

  • Are there any ADCs that take an input range of +/- 2V which are compatible with the Raspberry Pi
  • Would a chip would more resolution make it better? Although the problem seems to be my analog circuitry
  • Any suggestions for an accurate level shifting circuit as most of the ADC seem to only take positive inputs
  • The analog signal comes from a BNC cable. I have found a BNC to Monoplug Adapter and a USB Audio Sound card. Would that do the job?
  • Lastly, the solution I tried that gave me accurate readings to 10mV had some random fluctuations, when averaged over 30 seconds, it was fine but is there a way to reduce the fluctuations in readings. A capacitor at the input to the ADC perhaps?

Thanks in advance for any suggestions

\$\endgroup\$
  • \$\begingroup\$ Does DC offset matter? i.e. if I said "I shifted this whole signal to a positve voltage range, but I can't tell you by how much that was", would it still work for you? By the way, your question is pretty well-asked, so thanks for asking! \$\endgroup\$ – Marcus Müller Jan 27 '17 at 9:27
  • \$\begingroup\$ I am not quite sure what you mean by "compatible with the rpi". Since it has a lot of gpio pins, it should be able to speak about every digital protocol any low speed adc out there can offer. \$\endgroup\$ – PlasmaHH Jan 27 '17 at 9:42
  • \$\begingroup\$ The USB sound card solution will probably be AC-coupled and therefore not capable of measuring DC signals. \$\endgroup\$ – pjc50 Jan 27 '17 at 10:14
  • \$\begingroup\$ @MarcusMüller If I understand your comment correctly, the DC offset would matter as I need to be able to work out the original signal value before the level shifting. And thanks! \$\endgroup\$ – Baba Jan 27 '17 at 10:29
  • \$\begingroup\$ @PlasmaHH I don't have much experience with digital protocols so I wasn't sure if there were any restrictions. Thanks for pointing that out! \$\endgroup\$ – Baba Jan 27 '17 at 10:30
2
\$\begingroup\$

The MPC3008 has a resolution of 10 bits hence, for an input span of 4 volts, the smallest resolvable increment is 4 mV. Then there is its accuracy in terms of DNL and INL (quoted as 1 LSB for each on the front page of the data sheet). 1 LSB means that anywhere in the input range there could be a converted error equivalent to 4 mV so that's 8 mV error due to DNL and INL.

Offset error accounts for another 1.5 LSBs and gain error is 1 LSB.

All in all, if you could accurately reposition your input range to suit the MPC3008 you would have a basic inaccuracy of 4.5 LSBs worst case. This, when related to the original signal means a dependable accuracy of 17.6 mV in a 4 volt span.

So you have to look for something much better and it will probably be 16 bits resolution and have an input capable of dealing with a range of inputs centred about 0 volts. Maxim and ADI strike me as your best bet. They both have good search engines. Also try TI and Linear Technology.

If you can't find a suitable chip (and there will be a few I'm sure) then level shifting is an option and 1 mV accuracy poses no problem at all to a lot of modern op-amps however, use of a negative supply could be advantageous in some cases.

\$\endgroup\$
  • \$\begingroup\$ Thanks for breaking down the bit errors! Didn't realise the ADCs had built in errors. DO you think this will do LTC1867LA farnell.com/datasheets/… It is relatively expensive so I don't want to get it wrong. Offset Error = 64LSB, Gain Error = 64 LSB, INL = 4LSB, DNL= 3LSB. Worst case is 135 LSB which is about 7mV. Where do the Gain and offset error come into place? The seem quite large \$\endgroup\$ – Baba Jan 27 '17 at 11:57
  • \$\begingroup\$ That one is fine if you reserve two channels for zero volt and a stable ref voltage. That way you'll be able to eradicate most errors by sampling signal, zero and ref and compensating in software. \$\endgroup\$ – Andy aka Jan 27 '17 at 13:24
  • \$\begingroup\$ Thanks! Don't quite get what you mean by reserving "2 channels for zero volt and stable ref voltage" (As a newbie not sure whether to keeps asking questions here in the comments section or raise a new question. Thanks Again!) \$\endgroup\$ – Baba Jan 27 '17 at 14:11
  • \$\begingroup\$ You linked to an ADC with multiple inputs right? If you look at the data sheet you will see that offset error match is only 2 LSbs so, immediately, you can benefit by feeding 0 volts to a spare input and, when you read it, that digital value tells you how much the offset error (64 LSb) is of your actual signal to an accuracy of 2 LSb. Does this make sense? \$\endgroup\$ – Andy aka Jan 27 '17 at 14:15
  • \$\begingroup\$ Ah I see makes perfect sense! Does the stable ref channel do the equivalent for the gain error match? If is there an equivalent way of finding out the gain error? \$\endgroup\$ – Baba Jan 27 '17 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.