I built a circuit using an Arduino board that tests a logical inverter using NPN transistors. It works, but I'm trying to understand why it works.
The circuit consists of 2 push buttons:
- Left most button on bottom board. This is the Inverter test. When Pin7 is High, this button is disabled. When Pin7 is Low, pressing this button will bring Pin2 Low (causing the onboard LED to illuminate)
- Right most button on bottom board. This button brings Pin3 Low, which will toggle the state of Pin7.
The yellow wire is my input. When Pin7 is high, the green LED is lit and the input to the right most NPN transistor is high. This is where I am struggling to understand what is happening. When the base is brought high (via Pin7 being high), current flows from the blue line, through the transistor, and back to ground, correct? Why doesn't current also flow through the orange wire? I guess, there is a tiny bit of current that flows through (the virtual multimeter shows ~5mV).
I guess my understanding of electricity is that if a wire is connected to power like the orange wire is through the resistor, then it should have a charge, right? Why does the path through the transistor back to ground take priority when the base is high? Why aren't both paths (blue and orange) energized at the same time?
The final question I have is around power consumption. Will having these NPN transistors connected like this continuously draw current through the circuit? Should I be worried about the current draw if this circuit were battery powered?
If you'd like to explore the circuit, here is a link: https://www.tinkercad.com/things/925tzr3eQgD-logical-inverter?sharecode=HnrjlXw_c_-TWucWs_Mr8GE4MERS-WJjVebuuhAwDyk
EDIT
Here is the schematic. I need to get better at learning how to read these as well... I don't know what the bottom circuits are showing, or why they are not connected to main circuit.
Version B
simulate this circuit – Schematic created using CircuitLab
Original somewhat en-visibilised schematic reloaded.
Both are a bit hard to read but together may be useful.
VERSION A