PCB designers often have the tough job of balancing perfection in design and keeping the cost down. For designs dealing with storage medias, like microSD, neglecting simple terms like “hot insertion” or “inrush current” can result in a prototype that imperfect and costly.
My philosophy is to keep my hardware designs simple. I am quick to discard any components that seem superficial in my design. Unfortunately, I learned the hard way that keeping things simple can sometimes make things more complicated. This was the case ten years ago when I was working on a project that involved an SD interface, which at the time was an unfamiliar component with barely any technical resources.
Don’t neglect the in-rush current
On first glance, the pinout of the microSD or SD card is anything but complicated. An engineer with minimal experience would have no problem figuring out the which pin does what. A typical microSD consumes up to 100mA at 3.3V, so obviously nothing would go wrong when I connected it to a 3.3V supply. At least that’s what I thought until I re-inserted the SD card in my working prototype. I, like many engineers before me, neglected an important concept when designing circuitry for an SD interface. We did not take the in-rush current into consideration. This resulted in our microcontroller resetting itself every time an SD card was inserted into it.
There is a lesson to be learned from this that extends to the present day. SD cards share similar electrical characteristics with their smaller form factor counterpart, the microSD card. This means that remaking my mistake from 10 years ago will result in the same PCB design problem for you today.
Capacitors to the rescue!
Decoupling Capacitor: A quick fix after your prototype is built.
So, what should you do after you’ve made this mistake on a board intended for a microSD card? Most microSD connectors come with a card detection pin that the microcontroller can use to detect the presence of a microSD Card. The system should only turn on the power when the microSD is properly inserted and turn off the power when the microSD is removed. A quick fix to your problem is to add a decoupling capacitor near the power pin of the microSD card. This will provide the extra stability that the circuit needs. I’ve found this solution effective for solving the problem of inrush current from microSD insertion.
It’s true that manually soldering a capacitor across a finished PCB is not an elegant solution, but it’s the only thing you can do when you’re scrambling to get things to work. The most important thing to consider here is choosing a capacitor that can store enough charge to mitigate the inrush current and prevent the voltage supply from destabilizing.
The best value for a decoupling capacitor should exceed the total load capacitance and the capacitance between Vdd and Vss of the microSD card. In most cases, any values above 45uF will do. The trick is to place it as near to the microSD as possible. Sometimes it’s impossible to do so with your PCB prototypes and you’ll need to revise your board.
The question is should you stick to this simple solution that relies on a single capacitor, or should you take a more elegant approach. My past experiences with memory medias have shown me that electrical characteristic of microSD cards can vary by brand, and so for future designs, I recommend not taking any chances.
An elegant solution for the design phase
Decoupling capacitors aside, the best way to prevent a disturbance to the internal voltage supply from a microSD card is to limit the inrush current through an electronics switch. To be more specific, you should use an FDN340P MOSFET to control the power supply of the microSD. This is where electronics and firmware logic goes hand in hand to manage microSD power efficiently.
A MOSFET can help you avoid inrush current problems by limiting the rate of voltage increase. You can choose a MOSFET with an acceptable voltage slew rate for your application. This slew rate will keep the voltage from fluctuating too quickly. It will also limit the maximum downstream inrush current. Both will help keep your microSD operating correctly.
It’s up to you to go for the quick fix of decoupling capacitors or to implement microSD inrush current management with a MOSFET. But if you’re making the same mistakes of my past design, you can fix it now easily using CircuitStudio.
Have a question about decoupling capacitors? Contact an expert at Altium.