First, I'd like to preface the question that I am an electronics noob.

I am trying to read and analog signal from an MCP3008 connected on a breadboard connected to my RPi v3 with a Cobbler.

On the breadboard, I've only got the Cobbler and the MCP3008, no wiring supplying power from the Cobbler to the MCP3008. When I run the simpletest.py script (from https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/mcp3008), I get a value of 1023 for each input. Just to see the difference, when I disconnect the cable from the RPi to the Cobbler and rerun the script, I get 0 values for all the inputs.

I would expect to get 0 values when I am not powering the MCP3008 as well. Why would this happen?


2 Answers 2


Impossible to answer without seeing a photo of your setup.

Clearly something was holding MISO high during your first test which is why all 1s were returned.

During your second test nothing was pulling MISO high and the default internal pull-downs kept the level low to return all 0s.

  • Here's a picture. There's a 1k resistor connecting rows 21 & 22 for my thermosister (not in the picture). I followed the hardware SPI wiring diagram from the Adafruit link in my post which consists of most of the wiring.
    – Bob Sakson
    Jun 21, 2016 at 23:45
  • It's best if you add new information (which includes photos) to your question so everyone notices. I can't make out all the connections from the photo - but it is moot. When wired up properly the device will return proper results. So get it powered/wired properly and then try reading it from the Pi.
    – joan
    Jun 22, 2016 at 7:21
  • I think my issue was I had the ribbon cable from the Pi to the Cobbler backwards and the pins weren't lined up. I am getting a consistent reading on channel 0 - I can see it increase and decrease when I grasp the probe and let go of it. However; I am seeing varying values on the other channels, jumping anywhere from 0-400. Is this normal? I don't have anything wired to these channels. If I wire the channel to ground, then it just reads 0 (as I expect). Sorry, again I am new to this and I appreciate your help Joan.
    – Bob Sakson
    Jun 22, 2016 at 17:01
  • That sounds okay, when nothing is connected to a channel the values will float. You can always connect the other channels to ground or VRef and check they move between 0 and 1023.
    – joan
    Jun 22, 2016 at 17:08

The thermositor goes from A0 to ground and I am 100% sure I used 10k resitor not 1k from 3.5v to A0..3 Mine works I just have to work out the math for the thermositor ... but 700 - 800 was good enough time turn on the light(i Have a light sensor on pin 1 and a test pointometer on 5 mine workedmcp3008.wired.ok

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.