I am using the following setup on my Arduino UNO to measure cpu fan RPMs:

enter image description here

The code is set to bring the trigger pin for each transistor high when it is checking that fan's RPM and FreqMeasure.h is then used to check the frequency of the signal on pin 8 which is then translated to RPM and sent to the LCD display.

I am experiencing reading issues and suspect that the signal is remaining on the measuring bus during the subsequent reads, however before revamping my code I simply wonder:

Is my circuit logic sturdy? I am just getting my feet back under me with microprocessors and have always found transistors to be a tricky subject, thanks in advance for your help!

If you'd like to see more info all can be found on GitHub.

  • 1
    I'm not sure I follow the logic of what your circuit is supposed to do. Why do you need the transistors - why don't you just have each fan's HE output connected to its own input pin with a pullup resistor on each one?
    – Majenko
    Sep 15, 2015 at 19:51
  • I have setup as such because the FreqMonitor.h library only reads on Pin 8. (edit: for the UNO, it is a different pin on each model iirc)
    – queen.Tea
    Sep 15, 2015 at 19:58
  • Ok, that's fair enough then.
    – Majenko
    Sep 15, 2015 at 20:03
  • I am experiencing reading issues - can you be more specific? What happens compared to what you expected to happen? What does your debugging output tell you?
    – Nick Gammon
    Sep 15, 2015 at 22:22
  • 1
    I have a post about analog multiplexers which may be a simple solution compared to the transistors.
    – Nick Gammon
    Sep 15, 2015 at 22:23

1 Answer 1


I have simulated your circuit and it seems sound enough to me.

It is a little confusing having the transistors there though. I would prefer to convert the three open drain outputs to logic level outputs (each having its own pullup resistor) then use a digital 3:1 MUX (or discrete logic gates) to select the signal to sample.

  • Thanks for your answer! And definite thanks for that simulation! I wasn't aware of this tool, definitely bookmarked. As I'm seeing, my method is essentially a MUX, just without using logic gates. However a discrete MUX chip will definitely be on my consideration list.
    – queen.Tea
    Sep 15, 2015 at 20:38
  • Do you have a datasheet that says the A1301UA has an open drain output? The file A1301-2-Datasheet.pdf says the A1301 outputs are ratiometric, increasing 2.5 mV per Gauss. Its working voltage is about 5 V, with abs max 8 V. Sep 16, 2015 at 5:39
  • The A1301 was just being used as a place holder for an actual open drain output.
    – queen.Tea
    Sep 21, 2015 at 21:52

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.