How to switch a transistor between gnd and floating?

Ron H

Joined Apr 14, 2005
7,063
But is Q10's base floating?
Come on, use your analytical skills. You can find the path from Q10 base to ground.;)
How are R13 and R14's sizes chosen?
R14 was a seat-of-the pants choice. It could be 100k and still work. At 10k, it draws about 70uA when Q8 is on. R13 is also noncritical. It just can't be too small, or it robs current from R16, which provides about 5mA to the base of Q10 (Ic≈50mA, Ic/Ib≈10). R13 also has to be small enough to provide the 70uA through R14, and enough extra to saturate Q9. Since Q9's collector current is only about 330uA, its base current can actually much lower than it is.
 

Thread Starter

tpny

Joined May 6, 2012
220
At 10k, it draws about 70uA when Q8 is on. R13 is also noncritical. It just can't be too small, or it robs current from R16,
How do you get 70uA? 12V / 22k(R13) + 10k(R14) = about 0.3mA?

And also, could you explain the positive feedback bit? Thanks!!
 

Ron H

Joined Apr 14, 2005
7,063
How do you get 70uA? 12V / 22k(R13) + 10k(R14) = about 0.3mA?

And also, could you explain the positive feedback bit? Thanks!!
I(R14)=Vbe/R14=0.7V/10k=70uA

When Q8 turns on enough to cause Q10 to begin to turn on, feedback through R17 pulls down on the base of Q8, turning it on harder, which turns on Q10 harder, which... The diode D4 prevents current from flowing from the battery, through the coil, through R17 and R15 and R12 to the collector of Q6, putting voltage there when it should be at ≈zero volts.
 
Last edited:

Thread Starter

tpny

Joined May 6, 2012
220
2.2k at R16 is going to give about 5mA at the base of Q10, isn't that enough to turn on the coil as is? why flow more current thru R15, R17 into collector of Q10?
 

Ron H

Joined Apr 14, 2005
7,063
2.2k at R16 is going to give about 5mA at the base of Q10, isn't that enough to turn on the coil as is? why flow more current thru R15, R17 into collector of Q10?
R15 and 17 don't help turn on Q10. They help Q8 to saturate. Without the feedback, Q8 will not saturate.
 

Thread Starter

tpny

Joined May 6, 2012
220
I breadboarded the positive feedback part, during trigger (30mA on the current loop) the coil and relay turns ON; but continues to stay on after current level drops down to 15mA. I wanted the relay to turn OFF at 15mA..
 

Thread Starter

tpny

Joined May 6, 2012
220
yes, I used a 20ohm, removed the 3 diodes in series and added your positive feedback.. the relay stayed ON even after current level dropped to 15mA, relay turns off when I depress the pb to cutoff current. It makes for a nice one shot switch though.. The original current sense setup switches the relay ON when there is 30mA and OFF when it drops to 15mA..
 

Ron H

Joined Apr 14, 2005
7,063
yes, I used a 20ohm, removed the 3 diodes in series and added your positive feedback.. the relay stayed ON even after current level dropped to 15mA, relay turns off when I depress the pb to cutoff current. It makes for a nice one shot switch though.. The original current sense setup switches the relay ON when there is 30mA and OFF when it drops to 15mA..
I suspect that either R15 or R17 is the wrong value. If R15 is too large, or R17 is too small, the circuit will latch as you observed. Maybe R15 is 10k when it should be 1k, or R17 is 4.7k when it should be 47k.
I believe that your original current sense circuit will switch the relay. It is just a marginal design, because the current through the PNP sense transistor is barely enough to drive typical transistors. I don't think it would work with minimum beta parts.
I'm an engineer. I don't like half-baked designs.:eek:

PS are you sure that your 15mA and 30mA levels are not actually higher than those values? That would also explain why you are seeing latching.
 

Thread Starter

tpny

Joined May 6, 2012
220
I rewired the breadboard and it works this time.. attached is the voltage measurements around the positive feedback components.. (red numbers are when current level is 15mA, green numbers are when 26mA (not 30mA as I had thought...))

Q1: Notice when relay is ON (26mA level) pnp's emitter and collector are at 11.95V and 9.14V respectively, therefore not fully turned on? But this still turns on the downstream npn and the relay regardless. When I changed R17 to 33k, this turns on the pnp fully but relay never goes OFF when current level returns to 15mA. Any room for improvement?

Q2. Why is during idle (15mA), voltage level reads 11.8V on one end of R15 and 11.4V on the other end? I would think it would be 11.8V at both ends..

Thanks! Yes, I do not like things half baked either! ^^
 

Thread Starter

tpny

Joined May 6, 2012
220
I changed the "sense" resistor from 20ohm 10% precision to 22ohm 1% and it turns pnp fully on. However when I touch the (+)probe of voltmeter at the pnp base, the relay clicks on and off.. is that ok to live with?
 

Ron H

Joined Apr 14, 2005
7,063
I rewired the breadboard and it works this time.. attached is the voltage measurements around the positive feedback components.. (red numbers are when current level is 15mA, green numbers are when 26mA (not 30mA as I had thought...))

Q1: Notice when relay is ON (26mA level) pnp's emitter and collector are at 11.95V and 9.14V respectively, therefore not fully turned on? But this still turns on the downstream npn and the relay regardless. When I changed R17 to 33k, this turns on the pnp fully but relay never goes OFF when current level returns to 15mA. Any room for improvement?
Try 39k.

Q2. Why is during idle (15mA), voltage level reads 11.8V on one end of R15 and 11.4V on the other end? I would think it would be 11.8V at both ends..
Your schematic says it is 11.8V on both ends.:confused:

Thanks! Yes, I do not like things half baked either! ^^
Are these measurements a result of measurements on hardware, or simulation?

Do you have an aversion to ICs?
 

Thread Starter

tpny

Joined May 6, 2012
220
I meant R17 sorry (11.4 on one end, 11.8V on the other end)..

I used breadboard.. I don't know how to use simulator.. but wanting to get started on it, btw, which software is good for that? Thanks!

And also, touching the probe to the base of pnp sets the relay on and off in a click.. is that ok? I would think probe sent a pulse and turned pnp on and off, won't happen in real life when hardware is live.. or will it..
 

Ron H

Joined Apr 14, 2005
7,063
I meant R17 sorry (11.4 on one end, 11.8V on the other end)..

I used breadboard.. I don't know how to use simulator.. but wanting to get started on it, btw, which software is good for that? Thanks!
I am using LTspice to simulate your circuit.

And also, touching the probe to the base of pnp sets the relay on and off in a click.. is that ok? I would think probe sent a pulse and turned pnp on and off, won't happen in real life when hardware is live.. or will it..
The probe capacitance momentarily turns on the PNP while it charges.
 

Ron H

Joined Apr 14, 2005
7,063
no, but yes i'd rather use discrete components given the choice.. but yeah I didn't want to wait around for a current sense ic to arrive..
I redesigned the portion I've been analyzing. It uses 3 ICs, the 2 transistors that drive the LED and the relay, and a few resistors. It's a much more solid design. This parts count doesn't include the current switch on the left, or the stuff to the right of the relay.
Speaking of that, you need to add a current limiting resistor. See the attachment.
What does that stuff on the right side do?
 

Attachments

Thread Starter

tpny

Joined May 6, 2012
220
cool~ can I see your redesign?!

Yes, I added the base resistor to the pnp subsequently because the voltage level on my current loop was a meager 2.something Volts.. Took me sometime to debug that to notice the missing resistor in the base path, put a 33k in there.

The right side circuit with the comparator and the voltage reference is to drive the pnp (we speak of in the prior paragraph). The voltage reference is set to 5V goes into one input of the comparactor. Voltage divider from the 12V battery reads 5V when the battery is at 12.5V. So the logic is to turn on the pnp when the battery is < 12.5V thusly to allow the current loop's 15mA to charge it during idle.

is ltspice free?
 
Top