GPIO AINx output fluctuations

Hello,

I am trying use the Beaglebone Black to monitor a smoke detector activation. I have two wires coming from the smoke detector, ground and positive lead. The voltage on the wires will go to 0.6v when the detector is activated. I have the ground connected to the P9 header GNDA_ADC and the positive wire from the detector going to AIN6. When monitoring the base values of AIN6 without the detector being activated I get a wide range of values. Example output below…

pin AIN6 value is 2
pin AIN6 value is 105
pin AIN6 value is 0
pin AIN6 value is 0
pin AIN6 value is 687
pin AIN6 value is 195
pin AIN6 value is 29
pin AIN6 value is 1799
pin AIN6 value is 182
pin AIN6 value is 0

When the detector is activated the AIN6 value will just be above 1000. However the random base values frequently exceed 1000 as well resulting in a lot of false positive activations.

My questions…

  1. Why is there so much variance in the base AIN values when no voltage is being applied? Should it not be near or at zero?
  2. What can I do to remedy this so I can get consistently low baseline AIN values so I do not generate false positive activations?

Please remember - newbie question with very basic knowledge of electronics.

Thanks

Analog or digital ground? The two are different.
The digital ground will appear to float since the two are not connected.
AGND is at P9-34, whereas GND is P9-1, P9-2, P9-43->46 and P8-1, P8-2.

Chad

normally your agnd will be connected to your dgnd in one place so both
are at the same potential.

Have it on AGND

Hi!

I am trying use the Beaglebone Black to monitor a smoke detector activation. I have two wires coming from the smoke detector, ground and positive lead. The voltage on the wires will go to 0.6v when the detector is activated. I have the ground connected to the P9 header GNDA_ADC and the positive wire from the detector going to AIN6. When monitoring the base values of AIN6 without the detector being activated I get a wide range of values. Example output below…

Post more information about the sensor if you want a concrete answer.

pin AIN6 value is 2
pin AIN6 value is 105
pin AIN6 value is 0
pin AIN6 value is 0
pin AIN6 value is 687
pin AIN6 value is 195
pin AIN6 value is 29
pin AIN6 value is 1799
pin AIN6 value is 182
pin AIN6 value is 0

Where does these values come from and how are they scaled (ADC digits or mV)?

When the detector is activated the AIN6 value will just be above 1000. However the random base values frequently exceed 1000 as well resulting in a lot of false positive activations.

My questions…

  1. Why is there so much variance in the base AIN values when no voltage is being applied? Should it not be near or at zero?
  1. An open ADC input has high impedance, meaning any input will rise the signal, even with low current. The connectors and cables act like an antenna, you’re receiving “Radio Erivan”. → Connect a resistor (~100 k) between the AIN-6 pin and AGND to force the signal down. (You can use the example oszi in the package libpruio to study the behaviors of the ADC subsystem.)
  1. What can I do to remedy this so I can get consistently low baseline AIN values so I do not generate false positive activations?
  1. Send a circuit diagram to get concrete answers.

Thanks! That did the trick. This would be a pulldown resistor correct?

I had to use a 330k to not loose the 0.6v input threshold for activation. Here is the new data…
Smaller values are baseline and larger consecutive numbers are with alarm activation. If I want to get it cleaner I suppose I would have to supply a larger threshold voltage from the smoke detector and use a smaller resistor.

pin AIN6 value is 0
pin AIN6 value is 0
pin AIN6 value is 3
pin AIN6 value is 117
pin AIN6 value is 14
pin AIN6 value is 20
pin AIN6 value is 0
pin AIN6 value is 3
pin AIN6 value is 116
pin AIN6 value is 12
pin AIN6 value is 16
pin AIN6 value is 0
pin AIN6 value is 5
pin AIN6 value is 131
pin AIN6 value is 11
pin AIN6 value is 754
pin AIN6 value is 122
pin AIN6 value is 137
pin AIN6 value is 264
pin AIN6 value is 145
pin AIN6 value is 146
pin AIN6 value is 68
pin AIN6 value is 753
pin AIN6 value is 264
pin AIN6 value is 763
pin AIN6 value is 147

Hello,

I am a newbie in Beaglebone. I would also like to build smoke detector therefore I would like to kindly ask you whether you could share with me the sensor part name.

Best regards,
Ivo