Analog pins spike suddenly to 1.8V

Using the analog pins on my BBB, i have a light sensor (resistor) and a TMP36 temperature sensor, both plugged as shown on adafruit.

Would there any reason (on a BBB) that the following spike to 1.8V appear on both pins (and delayed)? This happened to me twice now. Otherwise they work fine…

See the second chart at http://beaglebone.codealpha.net/

I would understand that the light sensor could somehow show 1.8V if it is too bright, but the temperature sensor suddenly climbs up as well and shows 130 degrees Celsius! Is there any interference between the ADC pins or GND’s,etc…, or did I hit a fuse or something?

The down spikes at the end are when I blew on the sensors and put my hand over the light sensor. And then it looks like the TMP36 finally went down in temperature.

Arnaud

Are you using the ADC ground as your reference ground?

Gerald

Yes, using ADC ground for both.

The TMP36 is connected to 5V DC though (but should always return <= 1.8V).

Could it be related to http://hipstercircuits.com/noise-on-the-analog-pins-causes-the-adc-sampler-to-go-out-of-whack/ ?

Could be. Which pins are you using?

Gerald

P9_38 and P9_40 for reading ADC.

You have the ability in the processor to connect AIN0-3 to a pullup. It is used in TSC mode. Move to a higher AIN number and see if the same thing happens there.

Gerald

You mean the same setup but different pin for my temperature sensor?
How would a pullup help in analog?

Yes.

It is for the Touch Screen Controller mode which is the primary function of this interface… Have you looked at the TRM?

Gerald

Yes I did, that's why I picked those, since I didn't use the touch
screen controller.

Do you think that for example when the light sensor is in direct
sunlight there is a lot of noise coming in and messing up the ADC? And
you think using a pullup or switching to a higher pin would solve
this?

Just trying to understand what I am doing wrong and what my solutions are.

Put a storage scope on the analog signal and capture it to check the raw data being fed into the inputs over time.

You can also connect the scope and expose your sensor to various light levels and see what the output does,.

Gerald

Would there be any problems with the two sensors sharing the same AGND? Can noise propagate through the GND pin?

Not likely.

Gerald

I think the voltage on the analog pin to the light sensor may have
been > 1.8V (probably around 3V) when too much light was coming in.
What do you think would happen on the ADC in that case? Wouldn't it just fry?
I redid my whole circuit and so far all tests are good.

OH, eventually it will burn out and the processor will need to be replaced. If that is likely to happen, you may want to consider a voltage divider and a zener diode.

Gerald

Hi Gerald,

It is stated many times that the maximum voltage for the analog inputs is 1.8V, will a zener diode of 1.8V be enough to protect the analog input ?

The chip will need a little head room above 1.8V (say 0.05V or so) for a 1.8V zener to protect it. Is there a little bit of head room above 1.8V where the input would be saturated, but chip will not be damaged?

100omh
___ /\ /\ /\ /________________________________ AIN

/ / / / |
|/
/ /\ 1.8V Zener
/
_\

__________| AGND

Thanks,
Matthew

Hi Gerald,

It is stated many times that the maximum voltage for the analog inputs is 1.8V, will a zener diode of 1.8V be enough to protect the analog input ?

The chip will need a little head room above 1.8V (say 0.05V or so) for a 1.8V zener to protect it. Is there a little bit of head room above 1.8V where the input would be saturated, but chip will not be damaged?

100omh
___ /\ /\ /\ /________________________________ AIN

/ / / / |
|/
/ /\ 1.8V Zener
/
_\

__________| AGND

The zener will start to conduct near 1.8V so the accuracy of your analog inputs will be affected. It is better to use a diode with a small volt drop (Schottky or something equivalent) with the anode connected to the AIN and the cathode connected to the analog supply 1V8 rail. The processor will normally have an internal diode doing the same thing, but the current capabilities will be limited. By placing a fast low volt drop diode in parallel will help protect the analog input. A small capacitor (10nF ceramic 0402) between AIN and AGND will help slow the input pulse and give the diode time to respond.

Regards,
John