OPEnSLab-OSU / OPEnS-Hypnos

Power Control Board for microcontroller projects, designed at OPEnS Lab OSU.
https://github.com/OPEnSLab-OSU/OPEnS-Lab-Home/wiki/Hypnos
GNU General Public License v3.0
5 stars 0 forks source link

Current leak from MISO, MOSI, CS ? #2

Closed baonguyen21 closed 4 years ago

baonguyen21 commented 4 years ago

When the SD card is initialized and the 3V power rail is disconnected, the 3VRAIL seem to still turn on (LED lit up).

Need to probe voltage at MISO, MOSI, CLK, SD to check if there is any current flowing backward to the 3Vrail when the 3V control pin is not activated.

Issue seen from Sitka+ SapFlow.

kamocat commented 4 years ago

Yes, you need to start the SPI protocol, or at configure some of those pins as outputs.

kamocat commented 4 years ago

Setting the pins as inputs seems to work pretty well. Just make sure you don't set pin 22 as an output. Here's an example sketch. https://gist.github.com/kamocat/b4cf9f0ccbd765f78a6d7390d2da2fe8

baonguyen21 commented 4 years ago

Hi Marshal,

Where you able to use this code with Loom?

kamocat commented 4 years ago

I haven't tried it with Loom, but I don't see any reason why it wouldn't work.

baonguyen21 commented 4 years ago

Updates. A diode has been place between 3v3Rail and the VCC of the SDcard that reduce leakage current down to 1.9uA.

Diode: SM5817PL-TP