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.

Output of ADC when no input is suppiled

Hi all,

Sorry if this question's answer is rather obvious, but this is my first time working on a MSP430 and I may be missing something.

I have an external sensory device connected to the ADC12 on the MSP430 and currently my data conversions and all is working fine, but when I disconnect my external sensory device from mine, I still get data conversions coming from the ADC (ADCIFG being triggered) and the values are significant with respect to the data I would get when the external sensory device IS still connected.

Are these values noise? Is there a software/firmware solution to not getting these data or is this a hardware issue of grounding the connector port or am I missing something.

If any details on the code used is needed I can provide it.

Thanks

Jeff Jway

  • Jeffrey Jway said:
    I still get data conversions coming from the ADC (ADCIFG being triggered)

    Firstly, the ADCIFG will be triggered as long as the conversion is on and the ADC is enabled,

    when you remove your sensor the ADC channel is kept floating, thus it reads the value which is around 3.0V.

    As using the internal pulldown resistor is not possible for the primary functionality of the GPIOs, connect a pulldown resistor to the ADC channel which should make the reading to 0 after removing the sensor.

  • So basically, there is no software/firmware method to detect the removal of the sensor and the only way is to use a hardware solution (the pull-down resistor) to pull the floating input to 0.

    In that case, I believe that there would also be no non-hardware method to detect the removal of the sensor to allow me to change the ADC12CTL values to stop the conversions?

    Thanks

  • I try adc10 with open circuit (nothing is connected)

    and the value i obtain is 1023.

  • Tan Chin Yew said:
    and the value i obtain is 1023.

    yup dats what i said, it reads your reference voltage in this case.

  • Jeffrey Jway said:
    So basically, there is no software/firmware method to detect the removal of the sensor

    Well, that depends on the readings of your sensor, if by reading 0 on the ADC channel you can conclude that the sensor is absent (i.e your sensor will never give value of 0) then providing the pulldown resistor to the adc channel will work out.

  • I was trying to find a software/firmware only answer without the pulldown resistor, but I accept the answer. So thanks.

  • Jeffrey Jway said:
    I was trying to find a software/firmware only answer without the pulldown resistor, b

    only on some ports of the MSP430 MCUs for a particular family, the internal pull down/pull up  cant be used along with primary functionality.

    it depends on the MCU and the ADC channel that you are using.

    which MCU are u using. check whether for that MCU and that particular ADC channel the internal pulldown can be enabled.

  • Jeffrey Jway said:
    I was trying to find a software/firmware only answer

    Well, if all possible input values are possible sensor readings, then there is no way to tell whether they come form the sensor or are random noise.
    If the sensor has soem values that are never given and you read these values, then you know for sure the sensor is absent. But if you read 'correct' values, you don't know whether this is a sensor reading or just coincident noise. a weak pullup or pulldown that ensures an 'invalid' sensor reading when the sensor isn't there is the only way to be sure.

  • Jens-Michael Gross said:
    . a weak pullup or pulldown that ensures an 'invalid' sensor reading when the sensor isn't there is the only way to be sure.

    and now the question is whether the internal pulldown resistor can be used for the ADC channel. Though I have never used the same personally, I wonder whether its possible.

    moreover Mr. Jeffrey Jway has not mentioned about the MCU he is using.

  • chethu gowda said:
    and now the question is whether the internal pulldown resistor can be used for the ADC channel.

    Not all MSPs have one at all. On some, it is disabled when the ADC is in use. A look into the port pin schematics might be enlighting. Once the MSP model is known.

**Attention** This is a public forum