This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1230: Communicating ADS1230 using Raspberry Pi2

Part Number: ADS1230


Hi Joachim and Bob,

Merry Christmas and happy new year.

I've been trying to communicate with ADS1230 using RPi2, Python and SPIDEV library, however it seems I don't understand the "SPI-compatible" concept properly. I read your post to Jimenez question and connecting to Arduino, however I'm still struggling with my wirings here. as Jimenez mentioned, for a common SPI interface, we need MISO, MOSI, SCLK and CS(SS). and in response you mentioned since ADS1230 is just a read-out device we don't need MOSI connection (has to left unconnected) and CS has to be grounded(?) - SPIDEV holds chip-select low anyway: spi.open(0, 0 or 1). Then SCLK and DRDY/DOUT should be connected to SCLK and MISO pins on RPi respectively. The rest of my wirings are:

DVDD, AVDD, RefP >> 5 V

DGND, CLKIN, Gain, RefN, AGND, Speed, AINN >> GND

CAPS >> connected to each other with a 220 nF cap (bridged)

AINP >> I'm using a a simple Light-dependent resistor(LDR) to provide an analog signal

If anything's wrong with my wiring so far, I'll be appreciated if you could correct me. obviously, the first question is: what about the PWDN? do I need to have a separate GPIO defined for PWDN and set it High before starting to read bytes? or I'm missing something about PWDN.

next question is, since the MOSI pin left unconnected how are we supposed to send the (dummy) bytes and initiate the byte reading (calling clocks)?

Also, datasheet says that for data retrieval, DRDY/DOUT(which is now connected to MISO pin on RPi) goes low and then SLCK shifts 20 bits data and then again MISO goes high; do I need to operate these pins (SLCK and MISO) manually (bit banging for instance)?

Thank you very much

A.

  • Hi Amin,

    You can bit-bang the port, or you can use a standard SPI peripheral on your microcontroller.  To initiate the clocks for the communication when using the peripheral you would just send a dummy byte out of the MOSI buffer the same as you would with a normal communication even though it is not connected.  Once transmitted you would read the receive buffer.  As there is no CS pin on the ADS1230, you do not need to be concerned with this pin at all (no reason to connect or even enable).

    As far as the remaining pins, any digital input pin should be connected to a micro GPIO or directly to DVDD/DGND.  The PDWN pin cannot float.  This pin must be tied high to turn on the analog/digital circuitry, otherwise the ADS1230 will be in a powered down state.

    Whatever sensor you connect must be within the correct common-mode input range for the ADS1230.  This means that the voltage on AINP and AINN must be between AVDD-1.5V and AVSS+1.5V.  Depending on how you have connected the LDR to your input, you may not be able to accurately measure and possibly be violating the input common-mode.

    At one time we did have a reference design, but it is no longer available for purchase. However the user's guide is still available on our ftp site and is good reference information on how to connect the device:

    ftp://ftp.ti.com/pub/data_acquisition/ADS123xREF/ADS123x_CDROM/User_Guides/ADS1230REF/sbau125a.pdf

    Best regards,

    Bob B