1
\$\begingroup\$

I'm pretty new to EE and I'm trying to use a sensor and saving battery as much as possible. I've already looked into similar topics (like this), but they are not satisfying me.

So, I want to power up sensor from time to time and get its output. Its regular capacitive soil moisture sensor, that's output voltage is dependent from moisture. The whole circuit is running on 3.3V. I was using n-MOSFET to power it like in the following schema:

circuit

Problem is that this sensor does not require to be connected to the ground to work and consume energy (checked on few of them, all operated the same way), so I cannot power-up and power-down it with MOSFET. I was thinking that connecting it to source instead of drain, but I do not want to do it as it is n-MOSFET. Theoretically, p-MOSFET would solve my problem, but it will require to set controller GPIO on almost all of the time, which is what I want to avoid.

Another way would be to power up sensor directly from GPIO (sensor consumes around 5mA, while port can supply around 12), but GPIO voltage under load drops under 3V, which causes sensor output unpredictable.

So, question, do you know the way to achieve it? I was thinking about using a relay, but relays are usually much bigger than transistors.

\$\endgroup\$
  • 1
    \$\begingroup\$ Why is using a PFET a problem? Driving an IO high doesn't consume power, or are you putting the controller to sleep? \$\endgroup\$ – Aaron May 12 at 19:42
  • 1
    \$\begingroup\$ What is the sensor? Can you also put a FET on the output, so there is no ground leakage path for the power to go? \$\endgroup\$ – Aaron May 12 at 19:44
  • \$\begingroup\$ Yep, I do plan to put it to sleep, so it would automatically power it up and consume battery \$\endgroup\$ – Pawel P May 12 at 19:47
  • 1
    \$\begingroup\$ If it uses energy without it connecting to ground, can you explain why that is so? Is it a miracle? \$\endgroup\$ – Andy aka May 12 at 19:48
  • \$\begingroup\$ @Aaron it is one like this \$\endgroup\$ – Pawel P May 12 at 19:49
0
\$\begingroup\$

If I get the question, the idea is that the host will power off, and so take the GPIO down with it. And, you'd like to keep the sensor grounded.

It's possible to connect an N-FET as a source follower. The problem is, the source will be one Vgs below the gate. If you have a 2.5V threshold FET, and the gate is at 3.3V, then the output voltage is only (3.3 - 2.5) = 0.8V. Clearly, that's not going to work.

An n-FET with a weak pull-up followed by a p-FET high-side would accomplish this. This would use zero power when the host is off - exactly what you're looking for.

A non-inverting buffer like an LVC1G125 can sink or source 32mA. This would also work.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I really liked the idea of using n-fet with p-fet - will definitely try it! I have only to wait until my ordered parts will arrive. \$\endgroup\$ – Pawel P May 14 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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