Analog Input Expansion Boards For Raspberry Pi


[Ken Olsen] needed a bunch of analog inputs for his model railroad project. He wanted to use the Raspberry Pi board, but alas there are no analog inputs available on the GPIO header. But there is SPI. So he used an online service to design his on Analog input expansion boards.

He mentions that Eagle can be a bit of a pain to work with. For this project he decided to give a try. This is an in-browser PCB layout tool which we looked at in a links post some time ago. The service lets you order directly from your in-browser design without the need to run gerber files or the like (boards are made using the OSH Park service). He’s very happy with the boards he got back. They feature a footprint for a connector to interface with the RPi.

The design uses MCP3008 Analog to SPI chips. Each has eight channels but [Ken] needed more than that. Since the service provides three copies of the board he made them modular by adding end connectors which chain the SPI and power rails from one board to the next. Don’t miss his full demo in the video after the break.

14 thoughts on “Analog Input Expansion Boards For Raspberry Pi

  1. It seems a bit weird to go to all these lengths to add more GPIO etc instead of just going for the beaglebone in the first place. The cost difference probably isn’t much once you’ve spent a bunch of time making up custom boards with IO expanders etc.
    The only advantage of the Pi is probably the HDMI video out.. but I’m not sure how much use that is when people are using the Pi like it should be called Arduino++.

  2. Whenever I see these boards i wonder why people don’t add a microcontroller instead. For example, an ATTINY24 costs just as much as the ADC used here while providing more features. Other micros can even cost less and offer more.

    1. I always wonder why they didn’t replace the entire Pi with a simple microcontroller. The only thing you can’t get on a microcontroller is the video output, but often that’s not being used anyway.

      1. Different applications need different types of computational stacks. Need real time with minimal layer-7.. go with a microcontroller. Need semi-real-time with tons of layer-7 and tons of custom layer-3/4 stuff? Go with a Pi or Beagle.

        1. Sure, but I see a lot of projects around a Pi that never mention higher level protocols actually being used. It could be that they are, but the designer just didn’t bother to mention that part.

          Also, there are $10 microcontrollers with ethernet, SD card and USB interfaces, and enough memory to run the stacks.

  3. This is my project and it was a while ago. I’m currently leaning toward having small AVR chips (like the Attiny84) do the analog and motor control stuff, and using the Raspberry Pi to talk with everything via I2C. Certainly, everything has it’s place and a time, and I see Arduino and RPi working together, not as an exclusively either-or choice.

        1. Thanks for the quick response! I do remember something about value floating without a pull down/pull-up resistor. I will def look into understanding that more. And I did have that link and plan to follow it but it has none of the info about the capacitor being used. And the “yellow thing” I was talking about was the component right next to the cap on your board

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.