I have an Arduino Uno R3 hooked up to an MPL115A1 barometer breakout board. I’m using SPI to talk to the barometer. It is hooked up as per usual SPI pins - SCK is D13, SDI/MOSI is D11, SDO/MISO is D12, CS is D7 for this chip and sleep/wake is D9.
I’m also trying to run this with an XBee on the same breadboard as the barometer. The XBee uses a fair amount of power (nearly as much as the 3.3V pin on the arduino will supply) so I’ve been experimenting with using a Sparkfun Voltage regulator power stick to power the breadboard and use USB to power the arduino while doing code development. I figured if I had the breadboard (with power stick) and Arduino (with USB) share the same ground, I’d be all set.
While doing this I noticed something that seemed pretty odd - with no power going to the breadboard with the barometer, the Arduino powers the sensor through only the SPI interface pins.
Does this make sense? Is the barometer just pulling enough power through the SPI pins to power it?
Yes, I have seen that happen. One reason is many chips have diodes from their IO pins to Vdd and Vss (ground) for over Voltage protection. The diodes conduct when the Voltage at the IO pin is more than a diode drop higher than Vdd.
With Vdd at 0 and 3.3V on an IO pin the diode conducts power from the IO pin to Vdd and powers on the chip.
What waltr said is quite correct. Of course you can’t (and shouldn’t) count on this “phantom” power mechanism. More so, you should prevent it from happening; because in this mode you have no idea how the barometer board is powered, what is powered, and what state it is on. So when you actually apply power to the board through the proper way (i.e. power pins), the board may come up the right way, or may come up in some undetermined way (which will lead to “phantom”/intermittent issues). That is the reason you may see comments on datasheets of some smart logic devices (good example are FPGAs, ADCs, DACs) about making sure the I/O pins are not powered before the power pins are properly powered. In your case, the proper design would be to either control the power to the boards the Arduino interfaces with or sense it, such that you can ensure the Arduino is not trying to communicate with them before they are powered.