AD7793
Production
The AD7792/AD7793 are low power, low noise, complete analog front ends for high precision measurement applications. The AD7792/AD7793 contain a low noise...
Datasheet
AD7793 on Analog.com
Hello,
I am working with the AD7793 ADC on the ESP32-IDF platform using SPI communication. I have successfully configured SPI and verified communication by reading the ID Register (0x04) and the AVDD monitor channel, both of which return correct values.
However, when I try to read analog values from AIN1 (AIN1+/AIN1-), I am getting garbage values instead of expected ADC conversions. Here’s what I have done:
ID Register (0x04) returns expected value (
0xB masked with 0xF). AVDD monitor mode (AD7793_CH_AVDD_MONITOR) gives correct values (~3.3V).
Reading from AIN1 (AD7793_CH_AIN1P_AIN1M) returns garbage values.
1️⃣ Reset AD7793 before configuration.
2️⃣ Set AIN1 channel using AD7793_SetChannel(AD7793_CH_AIN1P_AIN1M).
3️⃣ Set Gain = 1 using AD7793_SetGain(AD7793_GAIN_1).
4️⃣ Enable internal 1.17V reference using AD7793_SetIntReference(AD7793_REFSEL_INT).
5️⃣ Wait for RDY bit to go low before reading.
6️⃣ Use AD7793_SingleConversion() to get the ADC result.
Despite following these steps, I am getting incorrect/random values when reading from AIN1.
Could you please help me debug this issue? If possible, could you provide any reference code or examples for correctly reading analog inputs on the AD7793 with SPI?
Thank you for your support!
Hi ManoharCapuf ,
Can you specify what were the "garbage values" you were getting?
Despite following these steps, I am getting incorrect/random values when reading from AIN1.
Sample codes are available on the AD7793 product page under software resources: AD7793 Datasheet and Product Info | Analog Devices
Here are the links to the drivers/references:
linux/drivers/iio/adc/ad7793.c at main · analogdevicesinc/linux · GitHub
AD7793 - Microcontroller No-OS Driver [Analog Devices Wiki]
AD7793 IIO Low Power Sigma-Delta ADC Linux Driver [Analog Devices Wiki]
Thanks and regards,
Rod
Hi Rod,
Thank you for your reply! The resources you shared were really helpful, and they solved my problem. I truly appreciate your support.
I now have another issue. I'm using the AD7793BRUZ ADC to measure voltage readings from a pH sensor in the range of -400 mV to +400 mV. The circuit follows a schematic suggested by Analog Devices and includes a unity gain amplifier (AD8603AUJZ).
However, it seems like the amplifier is blocking negative input signals. I suspect this might be because the supply voltages at VP (pin 5) and VN (pin 2) of the AD8603AUJZ are connected to 3.3V and ground, respectively, and no negative supply voltage is applied. Since my pH sensor probe gives both positive and negative signals, I’m wondering if this could be the reason.
I’ve attached the reference schematic I followed as well as my own schematic for your reference. Could you please help me understand how to modify the circuit to properly handle the -400 mV to +400 mV range? I’d appreciate your guidance.
My Schematic
Reference Schematic
Thanks again!
Hi ManoharCapuf
Apologies for missing the thread, do you still need assistance in resolving your new issue?
Could you please create a new related question so that your questions will be seen and responded in a timely manner.

Thanks and regards,
Rod