I'm using AMS1117 -3.3v regulator for providing 3.3v to my IO expander mcp23017, unfortunately some short circuit happened and my regulator gave 12v to IO expander, which burned my IC.
How can i prevent this?
I'm using AMS1117 -3.3v regulator for providing 3.3v to my IO expander mcp23017, unfortunately some short circuit happened and my regulator gave 12v to IO expander, which burned my IC.
How can i prevent this?
In the comments, you indicated this happened when proving between output and GND. This suggests to me you were trying to see if your voltage was OK / what you expected.
A good design practice is to place a pair of test points on each power rail you have on the board (one for the rail, one for ground / reference). This won't prevent dangerous short circuits, but it could potentially be safer than probing at the pins of a TO-220 or SOIC where it's easy to mess up due to the pin-spacing. I generally space these 100mil apart. Additionally, a simple LED on each rail (if possible) is a good binary indicator that can give you information before having to pull out the DMM. A LED won't tell you if your 3.3V rail is at 2.8V (unless you're good at visualizing LED brightness), but if it isn't on period, you know you've got a large problem.
If you are only interested in probing the output voltage, and not injecting power into the board through these test points, you can put a 10k resistor in-line with the test point for the voltage rail -- now you're protected against accidental short circuits. These are now sense test points for the rail in question.
None of this will fix what has already happened to you, but are things to consider for your next design.
Finally, if you are running your DUT from a lab power supply, take advantage of its current limiting function. This has saved me many times as well -- it won't always work, but for initial board turn-on, it's invaluable. Chances are you don't always need the potentially 10s of amperes a supply can source; perhaps if your current limit was set to 100mA, your regulator may get warm, but it likely wouldn't have gone poof.
You can't completely eliminate the risk but there are a few things you can do to reduce it. Some ideas: