You don’t need the transistor if you use a comparator, the transistor is inside the comparator.Would that be more accurate than just using a voltage divider? What would the output of the comparator be connected to, my transistor base?
And yes, a comparator is far more accurate than a simple transistor. It is an entire circuit designed to accurately compare two voltages and switch when one exceeds the other.
