I'm using SparkFunHTU21D library to access HTU21d sensor.
I'm using a ProMini clone to access it. However, the phenomenon occurs even if no HTU21d sensor is connected. It must be a software issue.
I looked into SparkFunHTU21D.cpp but I don't see anything suspicious. I guess it has to do with pin configuration but I've no clue how to fix it.
Maybe someone has an idea and solution, respectively, how to stop the current loss.
You compare the power consumption to which state? I understand that you run above sketch and measure the consumption. What sketch did you run when you measured the comparison value? Was the hardware setup exactly the same?
Thanks for your reply.
Yes indeed, the hardware did not change in any regard--perfectly the same! Just hit the flash button between measurements.
And sorry, I thought the comment in the sketch was self-explanatory:
terraduino:
// no begin-statement -> apprpx. 20 µA while sleeping
// uncommenting begin-statement -> approx 180 µA current while sleeping //myHumidity.begin();
Firstly, run the sketch as is. Measure current. Here, 20uA.
Secondly, uncomment myHumidity.begin(); and flash the sketch. Measure current. Here, 180uA.
I de-soldered on-board LED and voltage regulator to get into uA range, just in case you don't get that low.
The call to myHumidity.begin() activates the I2C interface and even in power down mode the I2C address match circuitry stays active which uses some power. If you change your loop to