1

I want to read an ultrasonic sensor data every 10 minutes and expect that the module should be turned off in order to save power.

How do I do this?

I tried with a BC547 and PN2222 transistor but I end up with failure.

Can you please suggest a better method to cutoff power from the module? It has 4 pins (VCC,GND, ECHO,TRIG.)

JRE
  • 67,678
  • 8
  • 104
  • 179
  • You can use a MOSFET to cut Vcc power as shown in this schematic: https://i.imgur.com/fxNHoQ1.jpg. Of course you can also it for power reset. – tlfong01 Feb 25 '21 at 07:51

1 Answers1

1

Use a P-channel MOSFET eg. AO3401A to cut Vcc. Low to the gate = ON.

schematic

simulate this circuit – Schematic created using CircuitLab

Add a 1K resistor series with the TRIG input and make sure that you drive TRIG low before shutting off the Vcc and do not drive it high until after Vcc has been turned on. Also do not drive ECHO high as an output (it should never be an output). Adding another 1K on the ECHO line would not hurt.


Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842