But only need 24 measurements a day - so want to disconnect power to the HC-SR04 in between measurements but have tried with a NPN-transitor without success - so if there is someone who can help, I will be very happy - thank you
I'm guessing you use the NPN transistor between the HC-SR04 ground pin and Ground. It may have found a path to Ground through one of the I/O pins. Set the I/O pins as inputs so they won't act as Grounds.