I am using an ESP32 to connect my old (1996) Accenta 8 burglar alarm panel to HA. The panel has 8 pairs of terminals with one of each pair at a nominal 5 volts (~4.6V). The terminals are connected to PIRs in each room which keep the pair normally closed and break the connection on detection. I am connecting the return terminal of each pair to a GPIO pin on the ESP32 via a voltage divider to reduce the voltage from 5V to 3.3V. I am connecting a ground terminal from the panel to GND on the ESP32. I am defining each of the connected GPIO pins as a binary sensor which will show off normally and on if the PIR detects motion.
This works perfectly on the bench with every binary sensor showing on when 5V is applied to the GPIO via the voltage divider and off when the voltage is removed. When I connect it to the alarm panel only 3 of the 8 channels work as expected:
Pins 14,16 and 26 work and pins 32,33,34,35 don’t work. Investigation shows that when connected to 5 volts (via voltage divider) pins 14,16 and 26 are drawing 6.6µA but pins 32,33,34,35 are drawing 6.6mA. The measured current between each pair of alarm panel terminals with nothing connected is ~3µA so I think it can’t handle a higher current draw. With an alarm panel PIR terminal connected to any of pins 32 - 35 the measured voltage between the PIR terminal and ground drops to millivolts.
Pins 32-35 are pins of ADC1 so my assumption is that is why they are drawing significantly more current than the other GPIO pins and my hope is that switching off the ADC in configuration will reduce this current draw. (Space constraints and the need for the voltage dividers make it more convenient to use these 8 pins on the same side of the ESP32).
Does anyone know if this is a correct assumption and if so how to do this?