I have a project involving the following components:
- Raspberry Pi Zero W
- MCP3002 (Datasheet)
- Adafruit PowerBoost 500C (using a TPS61090)
The Setup:
The MCP3002 is connected to the Pi via SPI0 (pins 19,21,23,24), VREF is connected to 5V and VSS is connected to GND (pin 39) giving a 0V-5V range of measurement. CH0 is connected to the battery via the Bat pin (schematic here) of the 500C.
The Pi is powered by the PowerBoost 500C, which is a USB/Li-Ion battery power supply. The 500C is an all-on-one board using the TSP61090 with a female USB-A jack to power the RPi via the USB micro power jack.
The Problem:
When the RPi is powered on and running, everything works as expected. Reading the value of CH0 returns the correct voltage. However, when I shut down the RPi, I notice 60mA - 70mA of current flowing from the battery into the MCP3002. This clearly looks to be a problem that will drain the battery needlessly at best, and I suspect damage the RPi at worst. What is the right way to prevent this?
One idea (untested) would be to put a 47k resistor between the CH0 pin and the battery, reducing the current to 90uA. However, I am still unsure as to whether this is the 'right way' to setup this circuit. What is the right way to setup this circuit?
[EDIT]: Added the schematic below.
Note that the issue I am seeing is only when the RPi is off. The 500C is still providing power via the 5V pin.
simulate this circuit – Schematic created using CircuitLab
CH0 is connected to the battery via the Bat pin (schematic here) of the 500C
andOne idea (untested) would be to put a 47k resistor between the CH0 pin and the battery, reducing the current to 90uA
make it sound like the MCP3002 (and possibly other parts of the circuit) are being powered via the input protection diodes in the MCP3002 - see FIGURE 4-1: Analog Input Model in the data sheet. \$\endgroup\$