I've been using the microsd socket of my datalogger for programming. I made a simple adaptor that has pin 8 connected to reset on programmer. The rest of the pins are the same SPI pins used for logging to the microsd.
I know its good practice to have pin 1 and 8 of microsd socket pulled-up. On my setup pin 8 is pulled-up through reset. But I have nothing on pin one.
My question is can I use pin 1 to charge the battery through my adaptor? It would mean this pin would be directly connected to positive ie. 4.2v. The rest of the device is powered by 3.3v regulator. I know this is a reserved pin on the microsd card, but will the higher voltage cause any effect?
I was also thinking of using the card detect switch as a power switch. What are your thoughts?
Those are reserved pins, applying 4.2v to one of those pins while a microSD card is inserted may damage the card (uSD cards are iirc very picky about overvoltage)
Maybe a low reverse leakage diode between that pin and the battery (so you'd apply a higher voltage to that pin to charge it, since you have to overcome the voltage drop), and if you end up with excessive voltage on that pin with a dont-care-about-it uSD card plugged in, maybe add a very weak (ie, high value) pulldown on that pin to keep the reverse leakage from getting it above 3.3v. Usually you'd be fine with the diode like that, but uSD cards are not particularly forgiving of abuse.
Insert-detect as power switch is not unreasonable at all (it's a lousy connection I think though - better have it switch a fet or something, not directly power the whole mess)
DrAzzy cheers for that. Do you mean a simple blocking diode? Should it not stop all reverse voltage coming from battery, or do they only stop most reverse current?
I tried sticking a bit of tape over that pin on sd card. It had no effect in the logger, but I could not open it on computer. computer must use that pin for something.