Higher resolution ADC

Started by Quobu, February 23, 2014, 04:40:02 AM

Quobu

Hi,

I need a higher resolution ADC and am considering the 12bit MCP3208 or even the 16bit ADS1115 (http://www.adafruit.com/products/1085). Haven't ordered the last one yet.

Right now, I'm trying to figure out how to use the MCP3208 (http://playground.arduino.cc/Code/MCP3208) with the Moteino. It works with the normal Uno. It doesn't want to work with the Moteino and I'm pretty sure it has something to do with the SPI flash or even the RFM69 since the MCP3208 interfaces also through SPI.

Can somebody push me in the right direction.

Thanks!

A

What pin are you using to run CS for your MCP3208? If you follow the guide you linked to and you are using pin 10, you are using the same pin that Felix has wired to CS on the RFM69. Check out http://lowpowerlab.com/moteino/#pinout for a list of all pins being used for built in functions on the Moteino.

Try any pin from D3 to D7, those four are free.

jbeale

I have not used the chip you are working with now, but if are considering higher resolution parts, here are a few codes examples from other chips I've used.  This was with a basic Arduino, but I think it could work with Moteino. The main trick to sharing the SPI bus is to use a different pin for the SPI chip select (CS/) because the RFM69 device is already using D10.  That is not an issue with MCP3424 because it uses I2C, not SPI, so you would interface with it using SDA (ADC4) and SCL (ADC5).  The MCP3424 is available as small board the plugs direct into a "JeeNode" (similar to Moteino) here: http://moderndevice.com/product/jeelabs-analog-plug/

Arduino code for Microchip MCP3424 18-bit ADC
http://dangerousprototypes.com/forum/viewtopic.php?f=2&t=5022

Working code example for MAX11209 (18-bit ADC)
http://dangerousprototypes.com/forum/viewtopic.php?f=19&t=3818

sample code for LTC2440 24-bit ADC
http://dangerousprototypes.com/forum/viewtopic.php?f=2&t=4247

Another 24-bit ADC: LTC2410
http://dangerousprototypes.com/forum/viewtopic.php?f=2&t=4247#p45508

Quobu

I got the MCP3208 working. It was indeed the CS pin that was causing the problem. And with my luck, I picked another besides the D10 that was already being used. In any case, it's working fine now.

Now that I have it working, I realised that 12bit is not enough. jbeale, thanks for the links. I'll be checking them out.