I'm trying to run a motor through an L293D turned on and off by an Attiny85. The Attiny85 has the micronucleus bootloader on it, which is why pin 3 is connected to a pull up resistor.
On the Attiny is a program that toggles PB0 on and off every second. I've attached an LED indicator on it, and while the motor is not connected to 1Y, it runs fine. It also works fine if I put an LED between 1Y and ground. But when I put a small motor between 1Y and ground, LED1 flashes briefly and then the Attiny resets.
Basically, how do I get it to not crash when running a motor through it?
- 5V wall power supply with up to 3000mA output.
- Motor pulls around 300 mA while active.
- Also tried powering it through my computer's USB and got the same results.
What I've tried:
- Replacing C2 with a 1000uF capacitor. That allowed me to plug the motor directly to the power supply with the Attiny85 running.
- Putting the 1000uF capacitor between 1Y and gnd. No change.
The reason I was using L293D is because I didn't have any viable diodes at hand while testing. The only ones I had were too big to put on my breadboard. Connected it through alligator clips for now, and made the following changes, and that seems to be working quite well for now: