Home › Forums › Microcontrollers › PIC Microcontroller › Unexpected behaviour of 12V DC Motor with PIC Microcontroller › Reply To: Unexpected behaviour of 12V DC Motor with PIC Microcontroller
Your problem seems to be with Power Supply. Hope you are using same power supply for powering DC Motor and PIC Microcontroller. There will be a sudden drop in the supply voltage when the motor is powered, this will reset the microcontroller and program starts from the beginning again and again.
Try the following,
- Use separate 12V and 5V power supplies.
- Make sure that every components used in the circuit is able to provide peak current required during motor switching
- Increase the capacitance of both 12V and 5V rail. Eg : Put 1000µF for 12V and 100µF for 5V. Add 0.1uF near each ICs.