hope you folks aren't sick of me yet :P (If you are I apologize)

So I'm working with a Pi-3 and an MCP3008 ADC chip. After going through my work, I've decided to make sure I understand what to do with the chip.

The current setup I have for the chip is:

  • VDD = 3.3V
  • VREF = 1.05V

Now am I correct in that the voltage output I will be reading from the ADC will be between 0 and VREF (1.05V in this case)? So If I want to read up to 2V I need to increase VREF to 2V correct?

My other question is, what is the maximum voltage I can send through the input channels (CH0-7)? Is that based on my VREF as well? Or if I sent it 3V will it scale it to VREF and send that as output? Is VDD what my maximum voltage should be for those pins?

I'm trying to be careful to not blow up my chip, while at the same time I think understanding this will make it easier to figure out problems with my programs.

Thanks :)

  • Have you read the datasheet? Commented Jun 28, 2017 at 14:56
  • I've been trying to, but don't exactly understand what it is I am looking for on it. Commented Jun 28, 2017 at 15:01

1 Answer 1

  1. MCP30xx will sample the analog input regarding the following : Output= 1024 * Vin / Vref
  2. if you want to know Vin (which you do, ADC are designed for it) you'll do : Vin = Output * Vref / 1024.
  3. You cannot set Vref superior than VDD, that's a limitation of this kind of ADCs. You can set digital input at whatever you'd like, but it has to be < Vref, if it's not you'll either fry the ADC or you'll not be able to read the proper value since it will be > 1024. So you'll have an output of 1024.
  4. If you want to measure something that is way < VREF then you'd have a very poor precision. It's better to set VREF while thinking about what you'll measure


  • Thank you very much. So with concerns to point #4, the closer VREF is to my range of votlages to measure, the better my precision would be? So let's say I want to measure 0.25V - 0.75V, my VREF should be say 0.8V just for some wiggle room? Commented Jun 28, 2017 at 13:56
  • Yes, but I'm not sure if the hardware inside the MCP3008 had some internal limitation. I'm sure it has at some point, but I think you're correct. You just need to test or read the datasheet. (I think test would be easier ahah)
    – YCN-
    Commented Jun 28, 2017 at 14:00
  • Off-hand do you know of any higher precision ADC's in case this one can't give me the readings I need? Is it simply more pins = more precision? :P Commented Jun 28, 2017 at 14:42
  • No, there's no correlation between number of pins and precision. However the number of bit of the DAC is relevant since it will give you a better precision. The MCP3008 is 10 bits, so you'll have a range of 2^10 = 1024 value possible. If you use it with let's say 3.3V you'll have a "precision" of 3.3 V / 1024 = 3.22 mV. If you had a 12bit ADC you'll have 3.3 / 4096 = 0.805mV. But then you should also notice that at some point you'll have some noise which is a limitation also.
    – YCN-
    Commented Jun 29, 2017 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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