I would like to have a red LED ON when the voltage on a line is between +3V and +15V and OFF when the voltage is between 3V and -15V.
And the same thing with a green LED : ON when the voltage on a line is between -3V and -15V and OFF when the voltage is between -3V and +15V.
Of course it is possible but if the voltage reference will be related mostly to Vbe, the circuit will be sensitive to temperature.
And using one transistor for each detector, the output will not have a sharp transition.
So two transistors in the least will be needed for each detector so that a positive feedback can be added.
In case you didn't find yet a solution, I will draw, on your request, a practical circuit for each detector assuming you have a supply of +5V.
I am also assuming you can't get LM339 or LM324 (LM358)... right?
I didn't find a solution yet.
The purpose is to add LED on RS232 signals (breakout box).
With transistors the base current will vary with the RS232 voltage applied, so the loading on the line will vary. Would it be possible to use JFET current sources for the LED, so with 2mA LED it should be OK.
Or is a solution with comparators better?
I can have LM339, ... but I thought that there could be a simplest solution with transistors.
Do I hear that there is no DC supply as 5V? (see below)
And how many lines you look to monitor?
Added:
It seems you look to work on the RS232 signals only.
In this case you can use a transistor as a constant current.
The circuit would consist for the positive signals:
npn transistor
a resistor between its emitter and ground
an LED at its collector
a small diode in series with the LED since the LED reverse breakdown voltage is likely less than 15V.
a resistor between base and the signal line to drive the transistor.
Finally a combination of a few components, between the base and ground, to start driving the transistor from 3V and keep the emitter resistor voltage rather low (see note below)
In your case the drawback in using a transistor is that a red LED will need 1.8V (typical) and the protecting diode has a forward voltage of 0.65, Sum is 2.45 which leaves about 0.55V (to 3V) for Vce and the current limiting resistor (for the constant current).
I will try to draw it.
A constant current source can be made with a zener diode between the base and GND, but the current in the base will vary with the voltage on RS232 line.
I have a +5V available.
if you can use a regulated +5V and an IC comparator as LM339, the circuit would be simple and robust.
I will try to draw one for +3V detection and another for -3V.