Electrical – Arduino fingerprint sensor turning computer on/off

arduinosensor

enter image description here
Hello everyone,

I have the above circuit connected to my computer. The Pro Micro is running the following program (code HERE):

  1. Check if computer is on or off by verifying if the motherboard LED+ pin is HIGH or LOW, respectively (pin 5)

  2. If the computer is off, check the input from the fingerprint sensor;

  3. If the fingerprint is valid, turn on the computer by setting pin 4 HIGH which in turn switches the transistor and then sets it LOW after a small delay — mimics a power button press.

As long as the Pro Micro is powered, the setup works with no issues. But when I unplug the Pro Micro, the computer shuts down and I don't understand why. And it's not momentary like a button press. It's like the transistor is on fully, resulting in a long button press.

Can anyone help me understand why this is happening when unplugging the Pro Micro?

Best Answer

The computer turns off because the end R1 is then floating, and thus the base of your transistor is floating. I suggest pulling pin 4 HIGH with a resistor