Microgrids are the solution to growing power requirement of consumers at distribution level. The distributed generators (DGs) and loads in microgrid are connected or disconnected at any instant of time, resulting in reconfiguration of microgrid network. Thus conventional protection schemes are not applicable to microgrids. In this paper, the optimization of relay settings in microgrid is done using dual simplex algorithm. The significance of adaptive protection scheme is highlighted and the hardware model of Arduino based overcurrent relay is realized, tested and validated for microgrid application.