Closed kamocat closed 4 years ago
The issue has been viewed. What do you think is the best way to read the voltage drop across the resistor, just an analog pin? Do you think that the drop through the MOSfet also effect the reading? At the moment, the LOOM team report that the analogRead from Feather M0 is not working properly.
Maybe you're right, that no-one is going to measure the current from the Feather. I found a different issue that complicates this, though. My SD card seems to be feeding power back into the 3.3V rail through the SPI bus. I haven't tried a current test (because I don't wish to break the SD card), but it's enough to turn on the LED. I think it's getting the power either from MOSI or SCK, because setting CS low didn't completely fix it. Maybe a schottkey diode would do it? I guess the simple answer is that if I want the feather to sleep, I need to disable all the output drivers first.
Did you have the SD card inserted then started the SPI protocol? I am trying to replicate the issue on my end for troubleshooting.
Closing this issue. I changed my mind about the current consumption, I can put a sense resistor on the 3v3 rail if I want.
Currently there isn't a way of measuring the current consumption of the SD card separate from the reset of the system. A simple 1-ohm high-side sense resistor would allow measurement, requiring minimal board space. Optionally, this signal could be wired back and monitored by the Feather.
Benefits of measuring the SD card current: