2

I am trying to read voltage using ADC of expander pi. when I connect one sensor the output is correct but when I connect more than 1 sensor the reading is not right. help me out on this issue. I am using the following link to read adc voltage https://github.com/abelectronicsuk/ABElectronics_Python_Libraries/tree/master/ExpanderPi

Update:

I want to measure voltage from 3 different sensors. I have connected the output via jumper wire with the adc channel pins, and have connected the ground pin of the circuit with expander pi. If I connect only 1 sensors output with the adc i get the voltage near to that of measured via digital multimeter, with a drop of 0.11 volts but when I connect one more the reading goes to 0.0 the reference voltage is sef to default i.e 4.096

adc = ADC() # create an instance of the ADC


# set the reference voltage. this should be set to the exact voltage

# measured on the Expander Pi Vref pin.

adc.set_adc_refvoltage(4.096)


while True:

    # read the voltage from channel 1 and display on the screen

    print adc.read_adc_voltage(1)

    time.sleep(0.5)

To measure voltage from different pins m simply changing

adc.read_adc_voltage(2)
  • 1
    We need to see the specific code you are using, and some pics of the connections. How do you know the reading is wrong? – Steve Robillard Apr 8 '16 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.