Dave So just making sure I understand the ascii art...bottom circuit PNP device, base has a threshold of 1.5V (divider from the +5), emitter is = the input thru a 4.7K, collector is tied to the base of the NPN.=A0 emitter= of the NPN is tied thru a 100K to -5V, and the collector has a pull down t= o ground, and is the output. 0V on the input keep the circuit off, so the collector of the NPN is low.= =A0 When a 5V input is applied, it bias the base of the NPN, causing it to = turn on, providing the -5V output. Do I have that correct? ----- Original Message ----- From: Dave Tweed To: piclist@MIT.EDU Cc:=20 Sent: Tuesday, November 8, 2011 10:58 AM Subject: Re: [EE] -5V to 0V swing from a +5 input (again) I thought this topic was dead. But if it isn't, here's the solution I came up with. BTW, most respondents seem to be ignoring the requirement that the output be -5V when the input is +5V. =A0 =A0 =A0 =A0 =A0 +5V o-------+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 4k7=A0 R1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 Q1=A0 +----+----+=A0 Q2 =A0 =A0 =A0 =A0 =A0 =A0 PNP=A0 |=A0 =A0 =A0 =A0 |=A0 PNP =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 E=A0 =A0 =A0 =A0 E =A0 =A0 =A0 =A0 Vin o----B=A0 =A0 =A0 =A0 =A0 B----o Vth =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 C=A0 =A0 =A0 =A0 C =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 Gnd o--+----------------+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 470r=A0 R= 2 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 +----o= Vout =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 C=A0 Q= 3 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 +-----B=A0 NPN =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 E =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 R3=A0 100k=A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 -5V o------------+------+ Q1 and Q2 form a current switch: when Vin < Vth, the output is 0V (pulled up by R2); when Vin > Vth, the output is -5V, pulled down by Q3. Vth can be set to any value appropriate to the technology driving Vin; for example, for a TTL input, you might set it to about 1.5V. This can be done with a resistive divider between +5V and Gnd, for example. The base drive to Q3 is determined by the combination of Vth and R1. R3 serves to keep any leakage current through Q2 (up to 5 uA or so) from turning on Q3. You could tie Vth to Gnd, but then there would be no noise margin when Vin is in the low state. You could simplify the circuit by eliminating Q1 and connecting the input to the top end of R1: =A0 =A0 =A0 =A0 =A0 Vin o-------+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 4k7=A0 R1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 Q2 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 PNP =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 E =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 B----o Vth =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 C =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 Gnd o--------------+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 470r=A0 R2 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 +----o Vout =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 C=A0 Q3 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 +-----B=A0 NPN =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 E =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 R3=A0 100k=A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 -5V o-------+------+ But now the switching voltage is less well controlled (a Vbe drop above Vth= ), and the source has to supply the drive current for Q3. Again, you could tie Vth to ground, but there would still be no noise margin in the low state if Vin is being driven by a logic gate. -- Dave Tweed --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .