0
\$\begingroup\$

I have a microcontroller Atmega328p and some sensors like Dht22,Lm35,Soil Moisture,switching voltage regulator and a 9V battery.When my microcontroller is on sleep the total circuit consumption is about 6mA.That i want to do is not only the microcontroller to be on sleep mode but also the rest circuit such as my sensors(except Zigbee).So i used a mosfet as said at the comments below.I created a schema and as you see i connected Gate to pin14(so i will enable through microcontroller the mosfet),Drain to the 5v Switch Mode Regulator output and Source to the Gnd and to the Vcc of each sensor.Now when my device is on sleep my total consumption is about 2mA.Because i don't have someone to verify my schema and i am a newbie i want to check if my schema its ok and so my measurements.Thanks in advance!

ps. Gate Threshold Voltage is about 2-4V.So i have to put a resistor from Atmega pin14 to Gate?

\$\endgroup\$
7
  • \$\begingroup\$ a relay would produce less switching emi. \$\endgroup\$
    – scorpdaddy
    Jul 22, 2016 at 18:17
  • 2
    \$\begingroup\$ An enhancement to your relay idea is to use a MosFET to switch the power to the sensors. That way, it can be controlled directly from the AtMega and it will use less current than a relay. \$\endgroup\$
    – Mark
    Jul 22, 2016 at 19:52
  • 2
    \$\begingroup\$ A mosfet is definitely the way to go, you do not need another DCDC regulator. Keep in mind that an N channel on the high side will drop a Vth when fully on, you will need to pick a device with a very low threshold voltage. \$\endgroup\$ Jul 22, 2016 at 22:18
  • 1
    \$\begingroup\$ Powering down micro-controller peripherals such as your "sensors" can get pretty tricky. Best if you include a complete schematic in your question. Show all power connections. \$\endgroup\$
    – FiddyOhm
    Jul 22, 2016 at 22:19
  • \$\begingroup\$ So after reading this Tutorial and that Tutorial to understand what a mosfet is and assuming that i use this Power mosfet I tried to create that schema As you see mosfet takes 5v from regulator output as drain and also all Vcc from sensors are connected. \$\endgroup\$
    – G-V
    Jul 23, 2016 at 3:27

1 Answer 1

2
\$\begingroup\$

Your current schematic will not work, you have the FET drain connected to VDD and the FET source connected directly to ground. In this use case, the FET acts like a switch when it is "on", so you will just be shorting your 5V rail to ground (sort of, it would probably stick somewhere between 5V and GND until something smoked).

What you want to do is something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

The NFET will turn on like a switch when the gate voltage is sufficiently high enough. When it is on, current will be able to flow through the sensors, thus powering them.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.