This is a common problem with the iPhone 5 it's most likely the power ic U2 chip .. It's can be caused by using 3rd party chargers
open