somebody1
Newbie level 2
I have a simple circuit on a breadboard and I've been doing some current measurements that do not seem to make sense. The schematic is here: https://www.circuitlab.com/circuit/ygk99b/screenshot/1024x768/
There is an MCU and a sensor, communicating over I2C. The MCU reads from the sensor every 10 seconds and the remaining time the sensor should be off and should not be drawing any current. The sensor is powered from an output pin of the MCU ("Pin6" in the diagram). When the sensor is not in use Pin6 is set to low and also SCL and SDA are switched to general purpose outputs and are also set to low. So, at that point all pins of the sensor should be 0V (and they are, as measured with the multimeter).
The MCU consumes about 0.1mA when not reading the sensor. I've measured the current between the MCU and the VCC pin on the sensor (AM2 on the diagram) and it appears to make sense: when reading from the sensor the current is around 1 mA and when the sensor is supposed to be powered off it is 0. I've also tried to measure the current on the SCL and SDA lines when the sensor is off and they show 0 as well.
Now, the problem: when I measure the current between the battery and the breadboard (AM1 on the diagram) it always shows about 1.5 mA, regardless of whether the sensor is on or off. If I physically disconnect the wire between the sensor's VCC pin and the MCU then it drops to about 0.5 mA. And if I disconnect SCL and SDA it drops to around 0.1 mA, which is what I would expect when the sensor is not powered.
I think I'm missing something very basic here. Are some of the measurements simply wrong for some reason? If not, then where is that current going when all pins of the sensor are set to 0V?
There is an MCU and a sensor, communicating over I2C. The MCU reads from the sensor every 10 seconds and the remaining time the sensor should be off and should not be drawing any current. The sensor is powered from an output pin of the MCU ("Pin6" in the diagram). When the sensor is not in use Pin6 is set to low and also SCL and SDA are switched to general purpose outputs and are also set to low. So, at that point all pins of the sensor should be 0V (and they are, as measured with the multimeter).
The MCU consumes about 0.1mA when not reading the sensor. I've measured the current between the MCU and the VCC pin on the sensor (AM2 on the diagram) and it appears to make sense: when reading from the sensor the current is around 1 mA and when the sensor is supposed to be powered off it is 0. I've also tried to measure the current on the SCL and SDA lines when the sensor is off and they show 0 as well.
Now, the problem: when I measure the current between the battery and the breadboard (AM1 on the diagram) it always shows about 1.5 mA, regardless of whether the sensor is on or off. If I physically disconnect the wire between the sensor's VCC pin and the MCU then it drops to about 0.5 mA. And if I disconnect SCL and SDA it drops to around 0.1 mA, which is what I would expect when the sensor is not powered.
I think I'm missing something very basic here. Are some of the measurements simply wrong for some reason? If not, then where is that current going when all pins of the sensor are set to 0V?