I’trying the low power sketch and a grove ultrasonic ranger connected on the SARA AFF Grove D15.
As soon as the ultrasonic ranger draws a lot of current also during sleep cycles, is it possible to disable power supply on D15 during sleep ?
I’m afraid not, at least not the simple way. There may be other approaches you could take, such as making sure that your signal line is forced to be high impedance (input).
As it doesn’t consume very much, an alternative option would be to change the pinout of the connector of the ranger slightly.
You can see in the schematic that the actual “data” line only uses one pin, the other is left unconnected.
An option would be to move the power supply to the unused pin and then toggle the supply directly. Perhaps your variant can be connected with jumper wires?
thank you for your answer.
Yes, the option is to connect the sensor to different pins and drive its power with a digital output.