Hi,
The purpose of the circuit attached below is sensing the state of the switch S1. If the switch is on, it should conduct ~50mA for V_POWER in the range of 6..15V. Q3 and Q4 stabilise that current. Q1 and Q2 are in fact a MUN5333DW1 which forms a current multiplexer -- there will be many clones of it. V2 enables this particular channel.
The problem: I would like to pass the binary information if the current flows through Q3 or not to the GND-referenced 3.3V logic domain. The circuit should be as simple as possible, and I can afford one V_be drop. It should also be reasonably efficient; in particular, the entire Q3 current should not be mirrored to GND. I know that I could use an INA199 or a tiny saturable reactor to sense that current, but I am interested in a discrete solution for educational purposes. The current one (based on two current mirrors) is excessively complex and does not produce a clean output: V_SENSE depends heavily on V_POWER. What would you suggest assuming that the circuit must be placed on the left of Q1 and be high-side?
Best regards, Piotr
Version 4 SHEET 1 1400 680 WIRE 176 -128 -352 -128 WIRE 512 -128 240 -128 WIRE -528 48 -528 -32 WIRE -480 48 -528 48 WIRE -352 48 -352 -128 WIRE -352 48 -400 48 WIRE -336 48 -352 48 WIRE -208 48 -256 48 WIRE -144 48 -208 48 WIRE 16 48 -48 48 WIRE 48 48 16 48 WIRE 176 48 144 48 WIRE 224 48 176 48 WIRE 320 48 224 48 WIRE 512 48 512 -128 WIRE 512 48 416 48 WIRE -208 64 -208 48 WIRE 512 80 512 48 WIRE -528 96 -528 48 WIRE 704 96 560 96 WIRE -352 128 -352 48 WIRE -256 128 -352 128 WIRE -96 128 -96 112 WIRE -96 128 -160 128 WIRE -96 144 -96 128 WIRE 96 144 96 112 WIRE 176 144 176 48 WIRE 176 144 96 144 WIRE 224 144 224 48 WIRE 256 144 224 144 WIRE 368 144 368 112 WIRE 368 144 336 144 WIRE 592 144 560 144 WIRE 96 160 96 144 WIRE 592 176 592 144 WIRE -528 192 -528 176 WIRE 512 192 512 160 WIRE 704 192 704 176 WIRE 16 224 16 48 WIRE 48 224 16 224 WIRE -96 240 -96 224 WIRE 368 240 368 144 WIRE -80 288 -320 288 WIRE 144 288 144 224 WIRE 512 288 512 272 WIRE -320 336 -320 288 WIRE -80 336 -80 288 WIRE 368 352 368 320 WIRE 144 400 144 368 WIRE 144 400 32 400 WIRE 464 400 432 400 WIRE 512 400 464 400 WIRE 672 400 592 400 WIRE 464 416 464 400 WIRE -80 432 -80 416 WIRE -80 432 -128 432 WIRE 672 432 672 400 WIRE -320 448 -320 416 WIRE -80 448 -80 432 WIRE 144 448 144 400 WIRE 1344 448 1344 416 WIRE 32 496 32 400 WIRE 32 496 -16 496 WIRE 80 496 32 496 WIRE 368 512 368 448 WIRE 464 512 464 496 WIRE 672 528 672 512 WIRE 1344 560 1344 528 WIRE -80 576 -80 544 WIRE 144 576 144 544 FLAG -528 192 0 FLAG 512 288 0 FLAG 464 512 0 FLAG 368 512 0 FLAG 672 528 0 FLAG 1344 560 0 FLAG -96 240 0 FLAG 592 176 0 FLAG 704 192 0 FLAG 144 576 0 FLAG -80 576 0 FLAG -320 448 0 FLAG -528 -32 V_POWER FLAG -128 432 V_SENSE SYMBOL voltage -528 80 R0 WINDOW 0 -35 4 Left 2 WINDOW 3 -68 92 Left 2 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value 6 SYMBOL pnp 416 112 M270 SYMATTR InstName Q1 SYMATTR Value BC557B SYMBOL res 496 176 R0 SYMATTR InstName R1 SYMATTR Value 1 SYMBOL res 240 160 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 0 56 VBottom 2 SYMATTR InstName R2 SYMATTR Value 47k SYMBOL res 384 224 M0 SYMATTR InstName R3 SYMATTR Value 4k7 SYMBOL npn 432 352 M0 SYMATTR InstName Q2 SYMATTR Value BC547B SYMBOL res 608 416 M270 WINDOW 0 32 56 VTop 2 WINDOW 3 0 56 VBottom 2 SYMATTR InstName R4 SYMATTR Value 4k7 SYMBOL res 480 400 M0 SYMATTR InstName R5 SYMATTR Value 47k SYMBOL voltage 672 416 M0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V2 SYMATTR Value 2.7 SYMBOL res -496 64 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 0 56 VBottom 2 SYMATTR InstName R6
SYMBOL voltage 1344 432 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V3 SYMATTR Value 29 SYMBOL res 1328 320 R0 SYMATTR InstName R7 SYMATTR Value 10 SYMBOL schottky 240 -144 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName D1 SYMATTR Value PMEG3010BEA SYMATTR Description Diode SYMATTR Type diode SYMBOL res -112 128 R0 SYMATTR InstName R8 SYMATTR Value 5k SYMBOL pnp -48 112 M270 SYMATTR InstName Q3 SYMATTR Value BC807-40 SYMBOL pnp -160 64 R90 SYMATTR InstName Q4 SYMATTR Value BC557B SYMBOL res -240 32 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R9 SYMATTR Value 13 SYMBOL pnp 144 112 M270 SYMATTR InstName Q5 SYMATTR Value BC557B SYMBOL pnp 144 160 R90 SYMATTR InstName Q6 SYMATTR Value BC557B SYMBOL res 128 272 R0 SYMATTR InstName R10 SYMATTR Value 5k SYMBOL sw 512 176 R180 WINDOW 3 -118 140 Left 2 SYMATTR InstName S1 SYMATTR Value SWITCH SYMBOL voltage 704 80 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V4 SYMATTR Value PULSE(0 1 0 1u 1u 250m 500m) SYMBOL npn 80 448 R0 SYMATTR InstName Q7 SYMATTR Value BC547B SYMBOL npn -16 448 M0 SYMATTR InstName Q8 SYMATTR Value BC547B SYMBOL res -96 320 R0 SYMATTR InstName R11 SYMATTR Value 1k SYMBOL voltage -320 320 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V5 SYMATTR Value 3.3 TEXT -262 584 Left 2 !.tran 1 TEXT -264 624 Left 2 !.model SWITCH SW(Ron=1 Roff=1g Vt=0.5 Vh=-0.4)