I'd like to switch power supply of two sensors, each of them with a bypass capacitor at their supply pin, with an ATmega328P MCU output pin with an absolute maximum rating of 40mA.
The sensors themselves together draw only about 230µA.
The capacitors are 100nF, the supply voltage is 4.8V max:
Image source: Analog Devices TMP36 datasheet
To reduce charge current I'm adding a series resistor of 68Ω to the capacitor.
So I calculate for one sensor:
Charge energy/time: 1.15µJ/68μs
Power: 0.17W
Current: 35.2mA
For two sensors this would be about 70mA - well above the 40mA the MCU pin can switch.
Provided I calculated correctly, what would be the preferred solution?
- Increase series resistance to 150Ω to get a charge current of about 32mA. What is the consequence - just a slight delay until the bypass capacitors have their full effect?
- Use a MOSFET to switch power supply of the sensors and no series resistors at all?