I've recently begun experimenting with AVRs and am keen to progress beyond making blinkies to making things move. I've tried to start with something easy, but it seems I'm already foiled! What I'd like to know is this: is it possible to drive both an AVR and a motor from the same power source and without them interfering with one another?
The schematic below illustrates my initial attempt at doing this. The ATtiny is generating a ~3kHz PWM signal (1/3 duty cycle) on pin 5, with the intent of supplying a time-averaged voltage of 3V to the motor via the power transistor. When I wire this up though, the motor just seems to cough and sputter.
Thanks heaps in advance,
p.s. I'm just wondering about the fundamental possibility/impossibility of what I'm trying to do: I don't expect anybody to debug my circuit for me! :-)