Can't change those they are fixed values (in my other part of the ciruit), I was going after adding a resistor or capacitor somewhere to make it work.Remove VEE and replace it with VCC.
This will do it:
When S1 is connected to 5v, Out will be near 0v.
When S1 is connected to ground, Out will be near -22v.
Power dissipation in R3 is about 220mW due to 10mA current flow across 22v, which is why a 1/2 Watt resistor is required. If you need less current to Out, you can increase R3.
BTW, the more positive voltages are usually labeled Vcc, and negative labeled Vee.
Also, when drawing a schematic, inputs come from the left, and outputs to the right; more positive values towards the top, more negative towards the bottom. This makes schematics much easier to read/comprehend.
No, the Vbe of the 2N2222 won't go above about 0.8v.In this configuration you are exceeding the base-emitter voltage rating of 6VDC of 2N2222. This will cause the damage to the transistor.
In the original schematic I posted, R2 should have been 22k instead of 1k.Thanks for your help!! Is there an easy fix that doesn't require another transistor?
Also thanks for the circuit drawing tips.
edit:
I don't want the transistor to burn up, lol there must be another way.
I never tested this but in theory it should be possible with an optocoupler, the simple ones with just one phototransistor, (without using the base).Do you know of any type driver available in the market that changes ttl logic to -22vdc logic?
Problem is always the shipping cost...I think that it might work too.
Found this one @ digikey for $1.00 and has four channels. That makes a total of $5 plus shipping.
Should be ok. The output will be either on -22V + Vsat of the opto's transistor or on 0V. Since I don't know what logic you are driving this from I can't recommend any resistors for the optocoupler. Just make sure to configure them correctly. CTR is >50% at 5mA LED current the datasheet says.For the output I'm thinking on landing the Vcc terminal to ground and the ground terminal to -22vdc. (this ground terminal would not be joined with the input ground.)
The input direct to the 5vdc logic.