but please another small question :
why the voltage divider is not good way : ( i will keep the PNP)
View attachment 122471
Voltage divider?
In this circuit, R6 and R8 do not really form a voltage divider.
- R6 is there to control the base current of Q1.
- R8 is there to turn Q1 off when the output of the LM339 goes open.
The voltage across R8 is clamped by the base-emitter junction of Q1 and will never be more than about 0.7 Volts. If they formed a true voltage divider, then the voltage across R8 would be 10.9 Volts when the output of the LM339 was low. (Assuming Vcc=12V and there are no other currents in or out of the junction)