Raspberry Pi Pico and ADS7828

I've been working with the Raspberry Pi Pico for a project, but I need more ADC inputs than the pico itself has. To work around this issue, I've gotten an ADS7828, but I'm not sure how to use it so I've been going in circles...

I need to use the Arduino IDE, but the documentation on the subject is sparce or unclear (at least to me). The pinout for the 7828 is as follows:

I see the SCL and SDA pins, which I should be able to connect to the Pico: to simplify everything, I can use the default GP4 and GP5.

[I can't upload a second image with the pico pinout since I'm a new user]

Now the problem I face here is I'm not sure how to declare them in the code. I'm also not sure what the slaves A0 and A1 on the 7828 work and whether I need to connect them to the Pico or not (if I do, I also need to know how to declare them)

I'm new to this kind of situation as I've only done projects with a lot of documentation in the past, so I'm not sure how to approach this and would appreciate some help.

Thanks!

A0 and A1 are used as an address offset in case several ADC are used. Just connect them to GND and use the base address.

1 Like

Hi, welcome to the forum.
Are you using the Raspberry Pi Pico with the Arduino IDE with C++ ?
Then you can use a normal library and hope that the environment for the Raspberry Pi Pico is good enough by now to be compatible.

Have you installed the Raspberry Pi Pico board in the Arduino IDE ?

I suggest to use the default pins. A call to Wire.begin(); should use the default.

Connect SDA to SDA, and SCL to SCL. Add pullup resistors of 10k.
Then the next step is to upload a I2C Scanner sketch to check if it can find the chip.

After that you can try to find a good library.
This one seems simple : https://github.com/ControlEverythingCommunity/ADS7828/blob/master/Arduino/ADS7828.ino

ADS7828 manufacturer's page: https://www.ti.com/product/ADS7828.
To understand the chip, you have to read the datasheet.
At page 9, you will see an example how to connect it.
A0, A1, GND to GND.
REF to a capacitor.

1 Like

Thank you for the reply!

I have managed to make simple programs with the Pico thanks to a library made for it (that does work properly) and the board. I have no issues in that regard.

Thank you, this is the information I was looking for! The code you sent through the link seems like it'll work, I'll be able to test things out with this. I'll be sure to test things out and verify everything's working according to my needs :+1:

I've tried getting an I2C scanner sketch to work for a while now, but no matter what I try, I keep getting the same "No I2C devices found" message, meaning

if (nDevices == 0)
 Serial.println("No I2C devices found\n");
 else
 Serial.println("done\n");

This part of the code is active, AKA there's no devices despite the 7828 being connected to the Pico

ADS7828 manufacturer's page: ADS7828 data sheet, product information and support | TI.com.
To understand the chip, you have to read the datasheet .
At page 9, you will see an example how to connect it.

I've connected the chip as shown at page 9 and ran multiple versions of I2C scanner codes I could find, but in the end it's the same result...

I'll try it out with micropython but I still would like to be able to do it with the Arduino IDE, if anyone has an idea of how to fix the issue I'd appreciate it.

Do you have a Arduino board to test the ADS7828 with a I2C Scanner sketch ? It operates at 3.3V and and 5V, so any Arduino board is okay.
I have a Pico board, but no time at this moment to test it.

I've managed to fix it! I'm not sure what the exact solution is, as I had moved onto Python since Arduino wasn't working, and when I came back to it it did work (?)

Maybe my wiring was wrong, I have added a wire at pin 10 of the 7828 and connected it to VCC (I'm not sure if I had done so before)

In any case, here are all the resources I used for anyone interested (for the Arduino part, I'm still having some issues with Python) :

Datasheets :
Raspberry Pi
ARS7828
Programming the Pico
**Always reset the pico before programming
I2C with Arduino:
[CODE USED]
[Other refs] 1) https://create.arduino.cc/projecthub/abdularbi17/how-to-scan-i2c-address-in-arduino-eaadda
2) ArduinoCore-mbed/pins_arduino.h at master · arduino/ArduinoCore-mbed · GitHub

And here's my final wiring (I connected a potentiometer at ADC0 of the 7828 to test)
image
(ORDI stands for computer)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.