title: Pic microcontroller stop working everytime when relay goes on
body: <p>I m using pic16 to operate relay having  inductive load of 20A(AC solenoid valve).</p>
  
  <p>According to program When i switch on the microcontroler it will switch on relay but when solenoid switched on by relay connected to microcontroller will hang the microcontroler.</p>
  
  <p>I m using 2A power supply for microcontroler and different 2A ppwer supply for relay. </p>
  
  <p><img src="https://i.stack.imgur.com/3VCeT.jpg" alt=""></p>