Can I stack multple Mayhew LTC1859 ADC shields?

Hi,

I'm in need of 24 ADC with 16bit and fast sampling rate. I would like to use the Extended ADC Shield from Mayhew, Extended ADC Shield | Mayhew Labs.

Would anyone be kind enough to check their Arduino library to see if multiple devices can be used simultaneously please. I did check myself but can't see anything, not that I really know what I'm looking for however. Have also emailed them with no reply.

Library can be downloaded from the page linked above, direct link: http://mayhewlabs.com/code/ExtendedADCShield.zip

If it's allowed I can post the library code here, or send via PM.

Many thanks.

The user manual states you can have user defined pin usage (RD) but if you need 24 of these, you don't have enough pins on an Uno to individually control each shield. You would need to use a mux chip to enable/disable that many.

Perhaps I wasn't clear. Each device has 8 ADCs so would only need 3 devices.

You can connect 3 shields with user selected RD (SS) to different Arduino pins.

The chip has 8 channels, so that you have to select a channel and get the data, eight times in sequence, and for each board.

My understanding, high sampling rate is required? 100 ksps from single unit, it's a lot of data, arduino 'd not be up to process such stream. Arduino DUE, perhaps.

Hi,
What is the application?

Quirkologist:
Perhaps I wasn't clear. Each device has 8 ADCs so would only need 3 devices.

Sorry each device has ONE ADC that is multiplexed.


And you have to read each channel serially through SPI.

Tom... :slight_smile:

Guys, I appreciate the help but I'm just trying to find out if the library supports multiple devices. Can anyone help out with this question please?

The library allows you to instantiate multiple ADC objects, each with separate pins for Conversion Start, Busy, and Slave Select (RD). There are solder jumpers on the bottom of the board for all of the pins. On the second and third boards you will have to un-do the jumpers for the three conflicting pins and, i guess, run wires to the pins of your choice.

Thanks John.

Is the implementation as simple as this example? I had hoped it works like this but could not see any confirmation it would actually work.

#include <ExtendedADCShield.h>
#include <SPI.h>

//Initialize the ADC Shield with default pins and 16-bit ADC (LTC1859)
ExtendedADCShield extendedADCShield(16);

float ch0, ch9, ch17;


void setup() {
  SPI.begin();
  //Throw out first read (junk data) and configure input 0 as single ended bipolar -5 to +5V
  extendedADCShield.analogReadConfigNext(0, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 1
  extendedADCShield.analogReadConfigNext(1, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 2
  extendedADCShield.analogReadConfigNext(2, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 3
}


void loop() {
  ch0 =  extendedADCShield.analogReadConfigNext(1, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 1
  ch9 =  extendedADCShield.analogReadConfigNext(9, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 2 
  ch17 =  extendedADCShield.analogReadConfigNext(17, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 3
}

Quirkologist:
Hi,

I'm in need of 24 ADC with 16bit and fast sampling rate. I would like to use the Extended ADC Shield from Mayhew, Extended ADC Shield | Mayhew Labs.

Would anyone be kind enough to check their Arduino library to see if multiple devices can be used simultaneously please. I did check myself but can't see anything, not that I really know what I'm looking for however. Have also emailed them with no reply.

Library can be downloaded from the page linked above, direct link: http://mayhewlabs.com/code/ExtendedADCShield.zip

If it's allowed I can post the library code here, or send via PM.

Many thanks.

Hi,
Yes, you can.
I stacked two of them about two years ago. I remember that you have to desolder something and/or cut a jump and/or solder a new jump to separately address the boards. The manufacturers library works well.
Regards.

I guess that you have to create 3 instances of ExtendedADCShield, with non-default constructors so that you can specify all the non-standard pins.

IMO you should try a sample program first, as e.g. shipped with the library.

You need to instantiate 3 shield objects, something like this: (untested)

#include <ExtendedADCShield.h>
#include <SPI.h>

// defualts for first board
const byte BOARD1_CONVST_PIN = 8;
const byte BOARD1_BUSY_PIN = 9;
const byte BOARD1_RD_PIN = 10;

// custom for second board
// connect to any Arduino pins
const byte BOARD2_CONVST_PIN = 2;
const byte BOARD2_BUSY_PIN = 3;
const byte BOARD2_RD_PIN = 4;

// custom for third board
// connect to any Arduino pins
const byte BOARD3_CONVST_PIN = 5;
const byte BOARD3_BUSY_PIN = 6;
const byte BOARD3_RD_PIN = 7;

//Initialize the ADC Shield with default pins and 16-bit ADC (LTC1859)
ExtendedADCShield extendedADCShield1(16);  // default
ExtendedADCShield extendedADCShield2(BOARD2_CONVST_PIN, BOARD2_RD_PIN, BOARD2_BUSY_PIN, 16);  // custom
ExtendedADCShield extendedADCShield3(BOARD3_CONVST_PIN, BOARD3_RD_PIN, BOARD3_BUSY_PIN, 16);  // custom

float ch0, ch9, ch17;


void setup() {
  SPI.begin();
  //Throw out first read (junk data) and configure input 0 as single ended bipolar -5 to +5V
  extendedADCShield1.analogReadConfigNext(0, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 1
  extendedADCShield2.analogReadConfigNext(0, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 2
  extendedADCShield3.analogReadConfigNext(0, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 3
}


void loop() {
  ch0 =  extendedADCShield1.analogReadConfigNext(1, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 1
  ch9 =  extendedADCShield2.analogReadConfigNext(1, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 2 
  ch17 =  extendedADCShield3.analogReadConfigNext(1, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 3
}

blh64:
You need to instantiate 3 shield objects, something like this: (untested)

#include <ExtendedADCShield.h>

#include <SPI.h>

// defualts for first board
const byte BOARD1_CONVST_PIN = 8;
const byte BOARD1_BUSY_PIN = 9;
const byte BOARD1_RD_PIN = 10;

// custom for second board
// connect to any Arduino pins
const byte BOARD2_CONVST_PIN = 2;
const byte BOARD2_BUSY_PIN = 3;
const byte BOARD2_RD_PIN = 4;

// custom for third board
// connect to any Arduino pins
const byte BOARD3_CONVST_PIN = 5;
const byte BOARD3_BUSY_PIN = 6;
const byte BOARD3_RD_PIN = 7;

//Initialize the ADC Shield with default pins and 16-bit ADC (LTC1859)
ExtendedADCShield extendedADCShield1(16);  // default
ExtendedADCShield extendedADCShield2(BOARD2_CONVST_PIN, BOARD2_RD_PIN, BOARD2_BUSY_PIN, 16);  // custom
ExtendedADCShield extendedADCShield3(BOARD3_CONVST_PIN, BOARD3_RD_PIN, BOARD3_BUSY_PIN, 16);  // custom

float ch0, ch9, ch17;

void setup() {
  SPI.begin();
  //Throw out first read (junk data) and configure input 0 as single ended bipolar -5 to +5V
  extendedADCShield1.analogReadConfigNext(0, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 1
  extendedADCShield2.analogReadConfigNext(0, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 2
  extendedADCShield3.analogReadConfigNext(0, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 3
}

void loop() {
  ch0 =  extendedADCShield1.analogReadConfigNext(1, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 1
  ch9 =  extendedADCShield2.analogReadConfigNext(1, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 2
  ch17 =  extendedADCShield3.analogReadConfigNext(1, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 3
}

Lovely, thank you so much. Thanks also vffgaston