hi . i am using an atmega328p with with a capacitive soil sensor link and temp sonsor ds18b20 link .
i wanted to lower the power consumption . so i was thinking of using a logic level mosfet to cut the power to the sensors.
i was thinking of using a n mosfet to cut the connection to the gnd of the sensor , thus stopping the current flow from the sensor.(assuming that there is very less leakage.)
i was thinking of using a p mosfet to cut the connection to the vcc of the sensor , thus stopping the current flow from the sensor.(assuming that there is very less leakage.)
is my approach viable ?
if so which mosfet should i go for ? p or n mosfet and why ?
Yes.
An output pin of an Atmega328 has an absolute max rating of 40mA.
If this sensor can be powered with 5volt and only draws 5mA, then I don't see a problem.
Leo..
ok in this case sensors can be powered using atmel chip . but lets say there are some heavy sensors which draw , for eg 100 mA , then will my approach be correct ?
manveen_singh:
ok in this case sensors can be powered using atmel chip . but lets say there are some heavy sensors which draw , for eg 100 mA , then will my approach be correct ?
Your approach using a P channel FET is the better option.
Switching the GND connection can cause problems, such as the sensor output appearing to be high when it shouldn't be.
However your schematic for the P-Channel FET option is wrong. You need to transpose the source and drain. (look which way the diode on the symbol is pointing)
JohnLincoln:
Your approach using a P channel FET is the better option.
Switching the GND connection can cause problems, such as the sensor output appearing to be high when it shouldn't be.
I thought so .
So which p mosfet would you recommend for these kind of application ? We want Vth to be very low so that any mcu can open it , as well as Rds on should also be very low such that there is a very low voltage drop across the mosfet.
On page 24 of the data sheet it says standby current is typically 750nA. Active current is 1mA. Are you continuously requesting readings? That will keep the device in active mode and prevent it from going into standby mode.
I would also find that valuable information. I am not expert in p-channel MOSFETs.
I know this: "logic level" is irrelevant for p-channel. With p-channel, the important question is how close to VCC must the gate be to completely switch off the mosfet.
manveen_singh:
Now what about my design for vcc switching for higher current ? which mosfet should i use ?
Depends.
There is a danger that the signal lines have a different potential than the unpowered sensor.
You could still phantom-power the sensor through it's I/O, and maybe damage it.
When the signal lines are always HIGH (e.g. I2C), you would switch ground of the sensor.
When the signal lines are always LOW, you would switch high-side.
You also might have to set the Arduino pins to INPUT before you remove power to the sensor.
Leo..
Wawa:
Depends.
There is a danger that the signal lines have a different potential than the unpowered sensor.
You could still phantom-power the sensor through it's I/O, and maybe damage it.
this might not be a good idea after all.
Wawa:
When the signal lines are always HIGH (e.g. I2C), you would switch ground of the sensor.
When the signal lines are always LOW, you would switch high-side.
yes i got your point here.
any particular mosfet that can do the trick ?
Wawa:
You also might have to set the Arduino pins to INPUT before you remove power to the sensor.
Yes , surely i will do that .
A side question . in above replies you can see that i am plaing to directly power the 2 sensors using gpio os the atmel 328 p .
DO i have to set my pin to INput everytime i have to shut down the power ?