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].
The ATMEGAs have 10-bit DACs, no? Does the Arduino software only support 8-bit?
Meant ADC, obviously. 10-bit ADCs.
The arduino is only an 8bit microcontroller
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.
raspi – 30$ and you get linux board that can blink LEDs
siemiens S7-300 PLC – ~250$ and you get professional PLC that can do almost anything.
Your point being that you can spend eight times as much money on something and you will get a superior product instead?
Well, if you got $250 + shipping, good luck with that. ;-) Here in Brazil, things that are below the $ 50 custom taxes line are much more popular… :-p
Are you sure? If you’re lucky you may get a single module for that, used on ebay. Not a great way for learning development, unlike the Raspi.
Can your professional PLC play video?
S7-300 CPU costs slightly more than $250 and it’s a bare CPU (except C-line). You’ll need additional modules (~$200 each) for digital and analog IO.
On the other side, Raspi, Arduino and other toys have some IO onboard. But (I hope :) no one will ever use them for industrial applications.
(I’m a Siemens Solution Partner and Raspi fan :)
Bummer you couldn’t get your Raspberry Pi to do anything but blink LEDs. I guess plunking down $250 is what you need to do, then.
Cool.. I didn’t know this post was about value and features comparison…
Does your siemens super board fits well in your..
uh.. nevermind.
Aren’t Arduino/AVR DAC’s 10-bit resolution? I get a value range of 0-1023 from them.
yup. 10-bit.
@egssays Can the PLC play video…audio?
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
At full resolution, the MCP3428 ADCs used on that board generate only 15 samples per second. While that doesn’t make it useless, it’s a pretty severe limitation.
And surprisingly (or maybe not), the ADC Pi product description lists all relevant specs *except* for the low sample rate.
5.06V/2^15=154uV per bit!
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.
+1
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…
Didn’t they moved the I2C pins around in RasPi rev. 2?
i thought so too, might not work with rev. 2
We have tested the board with the new rev.2 Raspberry Pi and it works ok. The I2C port on the GPIO header is i2c1 rather than i2c0 which is now on a new set of headers.
I believe they just changed *which* I2C port is exposed, as the old one could carry a fair bit of internal traffic. It’ll be a code change (in your application software) not a hardware one.
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.
What Kemp said. (c:
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.
With fixed I2C address of 0x68 & 0x69 you can’t stack these to get more than 8 channels. At least on the same I2C bus, that is.
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.
I’m guessing not alot of ladies in your lives. Way too much pent-up aggression! 16 bit that, 100msec that., blah blah blah. Poon’ is all that is needed for clarity of thought.
You are guessing wrong.
Ambulatory EEG anyone?
very sad to see such bitchiness over a product that was designed for young children!