I have designed a fan controller using ESP32. It was working fine initially when we checked by giving the bulb as load. After that we connected it to a fan, and then it started brownout during the initial time and also during the turn off time. After doing these experiments continuously the board was short-circuited.