I'm implementing a small IoT project. Basically, I've a small device capable of monitoring the temperature and humidity (DHT22) and if the lights are ON or OFF (basic LDR). Both sensors are connected to the 3.3v pin and the output connected to a GPIO. The generated data is sent to a local server via WiFi and saved in a SD card. I'm using the ESP8266 to send the data over network, using the Wemos D1 mini as a board. The sensor goes to deep sleep and wakes up to do his job. Everything works fine execpt the current consumption in the deep sleep mode which is a little bit high (around 1.2 mA).
When the board goes to sleep, it's crucial to have the lowest power consumption as possible. Which is the best MOSFET or Transistor, that works as a switch, that "cuts" the power from the sensors when the module goes to sleep?
I'm implementing a small IoT project. Basically, I've a small device capable of monitoring the temperature and humidity (DHT22) and if the lights are ON or OFF (basic LDR). Both sensors are connected to the 3.3v pin and the output connected to a GPIO. The generated data is sent to a local server via WiFi and saved in a SD card. I'm using the ESP8266 to send the data over network, using the Wemos D1 mini as a board. The sensor goes to deep sleep and wakes up to do his job. Everything works fine execpt the current consumption in the deep sleep mode which is a little bit high (around 1.2 mA).
When the board goes to sleep, it's crucial to have the lowest power consumption as possible. Which is the best MOSFET or Transistor, that works as a switch, that "cuts" the power from the sensors when the module goes to sleep?
Thanks for the help.
Any will work fine, leakage currents are measured in nanoamps for most BJT/MOSFET devices, you have milliamps to worry about. Watch out for floating inputs, they consume power.
Yup. Mosfet's for this application take (VERY) little current.
Since the Sensors are 3v3 powered, you can use a 3v3 IO line (and a 3 Volt Vgs Mosfet) easily enough as a "Switch".
To wolframore's point, schematic would help. But I would consider using an N-Type Mosfet to switch the "GND" or "negative" to the Sensors. That's assuming they are 3-wire (Vcc, Gnd, Output).
With the N-Type making a "switched GND" you can drive the Output line low to turn OFF OR have a pull-down resistor on the Gate of the Mosfet. Then you just tri-state the control line (which may happen anyway in super duper low power mode). The pull-down resistor won't draw any power in this config.
If you want to switch the 3V3, you need a "high-side" type switch configuration. P-type Mosfet. But then you need to drive 3V3 or have a pull-up to 3V3 on the gate when you want to turn "OFF". This means power.
If you can, switch the GND with an N-type Mosfet. There are tons designed for 3V gate drive (Vgs).
Burntman:
If you can, switch the GND with an N-type Mosfet. There are tons designed for 3V gate drive (Vgs).
Not many compared to the total number of MOSFETs out there. Just a tiny minority is able to switch properly on at 3.3V V(GS). And those come pretty much exclusively in the tiny SOT-23 package, or in the form of MOSFET arrays in SOIC or SSOP packages and smaller.
Nonetheless those pesky SOT-23 things can switch a surprisingly large current.
wvmarle:
Which exact part of your project is responsible for this?
The SD_Card module is the biggest responsible.
I added an image with my circuit schematic (ignore the type of the sensors and the pins of the SD_Card module. Everything is working fine). My idea is to place the MOSFET between the 3.3V and the VCC of the 2 sensors and the SD_Card module.
The LDR and the Temperature sensor are working fine. I'm using the IRF5305 (Datasheet) as a MOSFET.
When I connect the 3.3V pin of the SD_Card Module to the MOSFET Drain, the MOSFET's Vdrain drops to 2.5 volts and my circuit doesn't work. If I remove the SD_Module everything works fine.
Try an N type logic mosfet. You don’t need a power mosfet. If you add up the current required it won’t add up to 1 amp. I would put it right on the ground side. Much easier to set up and control.
wolframore:
Try an N type logic mosfet. You don’t need a power mosfet. If you add up the current required it won’t add up to 1 amp. I would put it right on the ground side. Much easier to set up and control.
Thanks for the suggestion. So the circuit would be: All the sensors connected to the 3.3v from the MicroController while the GND would connect to the N-Type MOSFET Source. The Gate is still controlled by a PWM pin and the Drain connected to the GND.
Drain being connected to ground makes the gate easy to control. Just use a logic high on the gate. You can use a PWM pin but don’t use a PWM signal.
Also you can use a resistor divider on the gate side to reduce current. The MOSFET uses voltage not current which makes them very efficient. Look up mosfet as switch or examples.
That MOSFET is drawn the wrong way around (just look at the body diode).
The source/drain markings are interestingly where they should be, just the symbol is wrong.
Now if you look carefully at the image you posted and compare it to the schematic the OP posted you will notice that the source and drain markings are reversed with respect to the symbol. Also the symbol itself is drawn upside-down (in a P-channel the source should be at higher potential than the drain).
Now if you look carefully at the image you posted and compare it to the schematic the OP posted you will notice that the source and drain markings are reversed with respect to the symbol. Also the symbol itself is drawn upside-down (in a P-channel the source should be at higher potential than the drain).
Right. Only the schematic is wrong, I've mounted the circuit in the right way ^^'.