Well, I am cranking my head around this one. I have a 5V microcontroller (AtTiny2313a-pu) which drives a 12V(max) DC motor(ampere rating unknown).
I have programmed my uC correctly and caused the motor to "blink" for one second then turn off for one second and so on(not resorting to PWM). I tested using this using this schematic and it works. (I am using a TIP120 npn transistor)
Instead Instead of using two batteries/ supplies, I tried to use the same battery for powering my microcontroller and Load and I am getting very strange behavior. I set the blink time to 2sec but here with this schematic(below), I observe random switching.
I have read about a phenomenon called ground bounce from the noise generated by motor that is temporarily resetting my microcontroller.
I followed the instruction from a similar post that appeared in the forum and I tried to connect the battery ground to collector first then to my microcontroller and its regulator as mentioned in the answer but I observe the same strange behavior of resetting. How would I get rid of this behavior?
Also, I have a 12V 2amps adapter and I want to power my project through this. Is there a way to split 12V into 5V(for microcontroller) and 9V for Motor as an independent power source as described in schematic 1?
I read that linear voltage regulators are very bad for powering motors,Will buck converter serve my purpose?
PS: I am very new to electronics please don't vote me down. In case I miss something I will modify in the post and abide by the standards of this forum.
Thanks you