6 Replies Latest reply on Dec 6, 2016 9:57 AM by user_1377889

# Measuring voltage with Delta Sigma

I have a sensor that outputs a voltage between 0 and 3V.  When I use Delta Sigma, the reading from my PSoC is compared with a volt meter.  The result is not the same as the volt meter, it may be off by 5-10 mV some times, but I just want to prove the concept, and I'm just glad that it has some reading.

However, when I remove the sensor, the reading still says 200mV instead of zero.  What am I doing wrong?

Here is the code snippet of the sensor reading function:

void handleRead(uint8 *buf, uint8 len) {
int16 mVolts = 0;

} else if (((int16)adcResult) > 16383) {
}
}
memcpy(buf, &mVolts, len);
}

• ###### 1. Re: Measuring voltage with Delta Sigma
Is ADC input left floating? What voltage it shows when it is shorted?
• ###### 2. Re: Measuring voltage with Delta Sigma

The ADC input is configured to be one of the GPIO pins, which is connected to the input voltage of the sensor when present.

Should I short the GPIO pin to ground to see what voltage it reads?

• ###### 3. Re: Measuring voltage with Delta Sigma

The pin is high-z, this will allow for any voltage when left open. Set to a defined level between GND and Vdda. Use a porentiometer to check the ADC.

Bob

• ###### 4. Re: Measuring voltage with Delta Sigma

Do we need a potentiometer to measure the output voltage of a sensor?  How about a 10k resistor between the ADC pin and ground?

• ###### 5. Re: Measuring voltage with Delta Sigma

No you don't need a potentiometer to measure the sensor output voltage. But in order to test the zero voltage when the sensor is removed the input must be connected to ground voltage, and in order to test the performance of the ADC a potentiometer is very useful.

A 10k between the ADC pin and ground will make the voltage 0 when the sensor is removed, but it will also load the sensor output a little, and lower the signal a fraction. Probably not a noticeable fraction unless your sensor is very precise and stable.

• ###### 6. Re: Measuring voltage with Delta Sigma

"Do we need a potentiometer to measure the output voltage of a sensor?" No, but you can simulate a sensor with a poti.

"How about a 10k resistor between the ADC pin and ground?" Will connect the pin to GND.

Bob