I'm following a really simple electronics instructable found in this link: https://www.instructables.com/id/Vibrating-Timekeeper/.
I've been studying the circuit provided but can't figure out why the circuit is the way it is.
Just a brief explanation of what the circuit does. Every few seconds the ATTiny85 a signal out of PWM0 so that it can make the motor (Denoted by M) run. I understand most of the circuit except the one on the upper right. I understand how transistors work, why a diode is added there. But the right side of the motor does not seem to have any connection with ground because it just loops through the transistor through the diode and back again. Shouldn't there be a connection to ground somewhere in this general area?
I tried mocking this upper right part of the circuit and it no current flows if I follow the circuit (As shown below):
But if I tried to connect a line to the ground then current flows, just that the area with the diode is not used:
I understand my mock up is not exactly like the diagram (Not sure how to add an ATTiny to CircuitJs simulator), but i think I have the gist of it. I just need help figuring out if I'm missing something or if there is an error in the circuit.
Any help would be great. Thanks!