A truly professional Raspi analog input

Much to the chagrin of hardware tinkerers, the Raspberry Pi doesn’t have analog inputs on its GPIO pins. Sure, you can blink a LED with just a few console commands, but reading sensors with a bone-stock Raspi requires a little additional hardware. [Brian Dorey] just released a board that allows for 8 analog inputs on the Raspberry Pi with a 16-bit resolution that is much higher than any Arduino-based build.

[Brian]’s build is based on an earlier, similar iteration of a Raspi analog board we saw last July. Like the previous version, the new professionally made PCBs use a pair of Microchip MCP3428 analog to digital converter. These ADCs are able to sample four channels at a resolution of 16 bits; a vast improvement over the 8-bit ADCs included on every Arduino.

The boards communicate with the Raspberry Pi over an I2C serial bus using a neat stackable header. In theory, it should be possible to use several of these boards and measure dozens of analog channels, but we’ll leave a demonstration of that up to [Brian].

Omg… You have no idea about the size of the bullshit you just said, dont you? =O
Why st*p*d people tend to think they know everything while they dont? Just be quiet.. way better than giving misinformation.

This reponse is for six677; ATMEGAs have 10 bit ADC, it doesn’t matter they are 8 bit microcontrollers,one thing it’s their core architecture, and another it’s their peripherials. Just like PICs 18f, i.e. , PIC18F4550 has a 10 bit ADC, and also you can configure its PWM resolution and frequency.

Plus, why even compare these to what’s built into the Arduino in that way? These are I2C devices, you could just as easily read them from an Ardiuno. It’s nice to make a shield/add-on that provides this functionality but it seems to be saying “take that Arduino! This guy added some parts to a Pi that he just as easily could have added to you!”

Another note… you can do more with digital I/O than blink LEDs, so that was a bit of a needlessly dismissive comment. Yet another note, the Pi may favor digital I/O but it does support I2C, so you know, kudos for hanging I2C chips off of it…. exactly like you’re supposed to… :S

IME, ADC circuits typically start to require careful layout and power considerations to get full use of anything over 10 bits of resolution. I would be interested to see what precautions are in place to keep those LSBs from being swamped by power supply noise, I2C cross-talk, etc.

However, it looks like the board would be handy even if you only got 10 usable bits out of it.

Exactly what I wanted to say. Slapping an X-bit ADC on a PCB does not imply you’re automatically able to sample at that resolution. Just like having a 100MHz oscilloscope does not mean you have the ability to handle those frequencies. Anything below a mV or above 20MHz requires knowledge and experience.

While I agree that this is a fairly well done board, I don’t quite know about the phrase “truly professional”. Based on the layout alone I wouldn’t call it professional… I’m sure it works, but I think we would all appreciate less opinion from the HAD writers, especially when it is often clear that they aren’t themselves professionals…

After re-reading the RPi blog post on the topic, the I2C pin locations remain the same on P1.3 and P1.5, but they come out of the secondary channel. So, apps could need to change depending on whether the OS now presents them as /dev/i2c-1 or still as /dev/i2c-0.

In any case, though, I think the board above should still work with rev. 2.

looking at the datasheet for this adc and aparently you can only gat 15 samples per second in 16 bit mode. if you want 60 you have to drop the resolution to 14 bit, and if can do 240 if you further drop the resolution to 12 bit. this is not totally a bad thing, but it is kind of a limitation none the less.

And to be exact, MCP3428 allows up to 8 devices in one bus, by changing the address bits, thus making a total of 4 boards in one bus possible. One has to make a hardware modification to change the address of both chips on board, tho. (Having 4 three pin headers, or solder tabs, would have been nice addition to this.)

I would have used a faster ADC, maybe something that can put 100Ksps at 10 bit resolution and more resolution for less speed.
Also, the board is far from professional because:
1) He used two chips with internal references, that means you have one reference for 4 channels and one for the other 4, you will get different readings. The right way would have been a single external reference which the user might change on desire.
2)the pcb is not correctly routed to eliminate noise and allow for a 16 bit resolution.
3)there is a single 100n(maybe) filter capacitor for the whole board. What happened to the 100n cap bypassing each pair of power supply pins of each IC?
4)He shouldn’t have used voltage dividers, that’s not a good way. You don’t know the impedance of the sensor or whatever you read and that will affect your transfer function. The correct way is to either let the user put in the divider or buffer the input and then divide it.
5)how did he manage the I2C addresses? He should have left one of the pins as user configurable(maybe it is brough to the header, i cannot tell) so that you can stack two of these boars.
6) what’s an NPN mosfet?

those chips have 2 address pins, so i guess you can run four of them off of a single i2c bus. also read my post above about sampling rates vs bit dept that this chip supports. since ive been looking for a high res adc chip with an i2c interface i always look at the datasheets for stuff like this. its actually not a bad little chip.

@Bogdan, Thanks for saying it. This board is far from being properly designed, much less “Professional”. In addition to all your suggestions, I might have included a very low noise LDO on board, noise is a battle hard won with 16 bits and a connectorized design like this. The last thing you want to add into the mix is noise on the supply.