How do I cutoff power to ultrasonic HC-SR06 when it is not been used, to save power
Use a P-channel MOSFET eg. AO3401A to cut Vcc. Low to the gate = ON.



simulate this circuit &ndash; 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.