Near Field Notes

Videos

The notes, in motion

One video per topic, newest first. Point at a card for a silent preview.The card in the middle of the screen plays a silent preview. Open one to watch it whole.

41 videos, 41 with a note to read after.

2:22 · With sound

Back-powering

Why does a switched-off sensor still draw 1 mA?

Read Note 33

Transcript

This sensor is switched off.

It's drawing 1 mA.

Here's how the current gets in, why the load switch makes it worse, and how to spot it in a datasheet in five seconds.

Take a Bluetooth board on a coin cell, with two I2C sensors.

Between readings, a load switch cuts the sensors' power.

The I2C lines idle high, through pull-ups to the rail that's always on.

Every sensor pin has a protection diode up to the chip's own supply.

Cut that supply, and the diode turns on.

Current runs from the battery, through the pull-up, into the pin, and up onto the dead rail.

This is called back-powering.

Where it goes next depends on the load switch.

Most have a discharge resistor, about 150 Ω to ground, that turns on when the switch turns off.

Now the current has a path to ground, for as long as the sensor is off.

I simulated it: 0.94 mA.

A coin cell that should last years is empty in ten days.

The sensor rail sits at 0.14 V, so on a meter it looks off.

The bus sits at 0.8 V. Every chip on it reads that as low, so the whole bus is stuck.

Pick a switch with no discharge, and the leak stops.

But the rail floats up to 2.6 V, and the sensor is back on.

This one resets below 0.6 V. It never gets there.

So a power cycle can't recover a stuck sensor.

No resistor in between works. At 1 kΩ it still leaks 0.7 mA. At 10 kΩ the rail is back near 2 V.

The I2C spec says fast-mode pins must stay out of the way when their power is off.

I checked 23 popular sensors. 13 have the diode anyway.

Bosch's datasheet calls holding the pins high with the power off prohibited.

So how do you fix it?

Driving the lines low looks right. With the pull-ups still powered, it's worse: 1.26 mA.

Move the pull-ups onto the switched rail, and float the MCU pins. Zero.

Leave the MCU's internal pull-ups on, and you're back to 0.36 mA.

Nordic chips keep their pin settings even in System OFF.

If other chips share the bus, put a small FET in each line, with its gate on the switched rail. Zero, and the bus stays up.

Or skip the switch. This sensor sleeps at a tenth of a microamp.

A good load switch leaks a tenth of that. It was saving you 90 nA.

Here's the five-second check.

In the absolute maximum table, find the I2C pins.

VDD + 0.3 V means there's a diode to the supply.

A fixed number, like 6 V, means there isn't.

8 of the 23 pass.

Switched off should mean zero.