Open user2684 opened 7 years ago
I would never switch off the GND pin of a sensor and leave its output connected to the Arduino without an internal path to GND....Basic Electricity 101 :-)
And if you add lets say a transistor switch to the GND of a sensor, the voltage drop across the transistor can be enough to raise the 0 level (0 to 0.8V above ground usually) sensor output so that the Arduino can mistakenly interpret it as a 1.
I have been looking at NodeManager's supply control and I have been always concerned that the two voltage drops induced by using Arduino pins to control both VCC and GND can render some sensors powerless if you use for instance two AA batteries to supply the circuit. I will probably never use the GND switching to a sensor for this reason and the one stated above.
One other thing: if you switch off the GND of a 3.3V sensor connected to a 5V Arduino, there will certainly be a strong current flowing from the Arduino pin thru the sensor output towards the sensors VCC pin. Almost all input or input/output pins have pull-up resistors or clamp diodes to VCC internally...
My 2 cents...
Thanks for the comment. All reasonable concerns I think. I'll definitely make this as an option and not as the default behavior to be safer when I'll come to it. Thanks!
https://forum.mysensors.org/topic/6534/nodemanager/109 https://forum.mysensors.org/topic/6534/nodemanager/120