P and N MOSFETs for powering up

Hello. I am using several sensors (Soil moisture, wind speed, direction etc) to get environmental data once in every 15 Minutes. As they are not measuring anything most of the time and consuming power, I wanted to use MOSFETs to power them up only when needed. But I am having problem finding correct P Mosfet with combination of N, as it's not getting completely turned on or off. Can you please suggest some combination and the whole diagram? Thanks

The sensors used:
Soil moisture: SMT100
Wind speed: PCE-WS P
Direction: PCE-WV A

  • Every 15 minutes :thinking:
    A 5v mini relay might be used here.

  • Always show us a good schematic (hand drawn is fine) of your proposed circuit so we can learn what hardware you have selected.

Simple rule of thumb, P is for positive and N is for negative switching. To switch a MOSFET the reference point is the Source regardless of the power system. When the gate voltage is ~ to the source voltage it will be off. A P channel device needs the gate negative in reference to the source and a N channel devices needs the gate positive in reference to the source. If you look at the data sheet there is a term Vgs (Voltage gate source), that chart will tell you how much voltage you will need to switch it.

This is for switching the low side where you ‘ground’ it to turn it on.

This is a High Side switch. The first N-Channel MOSFET is connected the same as the low side switch which it is. It allows the voltage to go to 24V referencing ground to put the gate and source of the P Channel device at 0. When it is turned on it switches the gate towards ground forcing the P Channel Source to Gate voltage to go - turning it on.

When switching MOSFETs it is always to put a resistor between gate and source to be sure it it turns off and stays that way until you switch it on. This is especially important when the Arduino is first turned on and until the processor gains control. The place to put this resistor is at the signal source. Placing it at the gate will form a voltage divider lowering the drive to the MOSFET.

Hopefully this helps.

Why use a MOSFET on a sensor? They draw trivial amounts of current; you would do much better to put the board to sleep. What board are you using?
BTW, the LED on the board is probably using way more power than all of the sensors combined

Pololu sells handy power switch modules that do what you ask.

Adafruit sells similar switches with built in timers. See also this one.

How long, after turning the sensor ON, does it take for the sensor to "boot up" and settle down to a reliable output?
Are you applying "pulled up" voltages to sensor while it is OFF?

The problem with removing power or ground to sensors is that the sensor still can get powered through it's data lines. And that could be harmful to the sensor or Arduino pin.

There is no standard recipe to power off a sensor.
Give us links to the exact sensors and we might be able to give the right advice.
Leo..

Thanks for the detailed diagrams. As the sensors should be connected to ground, I think I need the high side switching. But the MOSFETs are not logic level, right? As it'll be controlled via Arduino, can you please suggest some logic levels MOSFETs?

For Wind speed/ direction, required time is negligible. Arduino'll also complete other tasks, that'll take some time.

PCE WV A: Wind Direction Meter PCE-WV A | PCE Instruments
PCE WS P: Anemometer PCE-WS P | PCE Instruments

The wind direction is more of a problem for power, as it requires 12V and the output is 4-20mA.

Use this

If you want to build our own

@jim-p's circuit (post#12) can be used safely to disconnect power to that sensor.
It comes from this page, where it is explained in detail.

The other sensor is just a reed switch. You could power it's pull up resistor from an Arduino pin, and turn that HIGH/LOW if needed.
Leo..

No it does not.

How are you collecting the data?

It's always useful to say something about the project and what you expect it to achieve.

Still need help?

Thanks a lot for the circuit.

You are welcome
Have a nice day!