Hi, I'm working with an ATtiny84 and an l239d dual h-bridge motor controller, and I'd like to power everything with a 9v battery. As both boards require 5v for board power, I have an L7805 5v regulator which works just fine. The battery is connected to only the regulator and the Vin of the motor controller.
I would very much like to control speed. In the past, I have sent a PWM to the enable pin using my Arduino, and it worked just fine for speed control.
Now, with the 9v powering both the boards and the motors, I'm worried the motor is drawing too much current away from the board, as it starts and stops randomly when I'm using the PWM for speed. When I attach the enable pin directly to 5v, it works fine, but it appears there's not enough current to do PWM, or something.
In the past, I worked on a project involving a motor, transistor(w/ PWM), a piezo buzzer, and an ATtiny85. When the motor started, it would interrupt/restart the board over and over again and just throttle to full speed. I'm worried that same thing may be the case here.
P.S.- I'm using a 9v because I want the circuit to be as small as possible