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.

Here's the circuit: enter image description here

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): enter image description here

But if I tried to connect a line to the ground then current flows, just that the area with the diode is not used: enter image description here

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!


2 Answers 2


The shockingly badly drawn circuit diagram (from the cited article) is wrong.
There should be a connection from the Q1 transistor emitter to ground (ATtiny pin4, battery negative). The transistor will then be driven on in the usual manner by R2 = 3.3 K Ohm.

As drawn diode D1 has minimal effect and R3 is of no real value.
Better would be to connect D1 across the motor (Cathode to B+) so that the diode does NOT conduct when the motor is being driven and acts as a "freewheel" diode when the transistor is off.

The value of R2 (= 3k3) will provide less than 1 mA drive to the transistor base and depending on the transistor used may limit motor current. A value of 1K Ohm or even lower may produce better results.

  • \$\begingroup\$ Thank you! All that you mentioned are exactly what my research tells me I should do. Your answer was able to confirm it. \$\endgroup\$ Feb 25, 2019 at 13:33
  • 1
    \$\begingroup\$ From the pictures (especially step 4), it looks like this is indeed what the author of the article did in their build. It even says so in the instructions. It also looks like the author inserted the diode facing the other way around and swapped positions of R3 and D1, compared to the schematic. Maybe this contributes to it running through batteries so quickly. \$\endgroup\$
    – wrtlprnft
    Feb 25, 2019 at 21:17
  • \$\begingroup\$ @wrtlprnft I read through the steps again and I think you are right. So it seems that the author did not follow the posted schematic which contributed to my confusion. Thanks for pointing that out. \$\endgroup\$ Feb 25, 2019 at 22:31

The circuit is wrong. I think the ground is connected to D1's anode, but that's not the only problem with it. 1N4001 is too slow there. Also, putting one diode between the motor's pins and another between the transistor's E and C works better. (the motor is probably small enough in this case to kill the transistor, that's why the original circuit didn't self-destruct, but it's still wrong)

R3 is probably there to limit the current through your motor, but I don't see why it's there (putting it between the transistor and the motor, or between the motor and Vcc would be better if it's necessary at all).

R2 is small - as Russell McMahon pointed that out.

You can use the ATTINY's internal pullup resistor, and put the switch between the pin and GND, and simply invert it in software. But it's just some minor modification.

Edit: you can clearly see what the original author did in his pictures. The diode is between Q1's emitter and collector, but at first he put it in the wrong way. The last picture shows it in the correct orientation (anode to the left). You could also reverse engineer the correct solution based on the last picture if you wanted to.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.