Switching +/-12V from 6/0V

That's more robust in the general case, providing a higher threshold for when Vin doesn't pull fully down.

I pretty well trust the 555 and its brethern not to source current when their outputs are low, but if you don't you could always just pull its output low:

+10v (+6V/GND) R1 --- input >--+---[1k]--. | | | +------. R2 | '>| | | [10k] Q1 |-------. [load] | | PNP /| | | | --- | --- +-|>|--' D1 GND | GND | | |/ +------------| Q2 R3 | |>. NPN [1k] | | | '--------------+--- -10v

That saves a power supply connection and a diode :) (I've left your

1k values for R1 & R3; I prefer the higher drive, in both directions.)

Cheers, James Arthur

Reply to
James Arthur
Loading thread data ...

Looks like my MC1488 design of 40+ years ago. Except the 1488 had some diodes to match DTL/TTL thresholds.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
         America: Land of the Free, Because of the Brave
Reply to
Jim Thompson

I was not concerned with the steady state Vol of the 555 so much as the fall time goes asymptotic to a Vbe for a bit at that level whereas it will fly right past 2xVbe, gets you off the tail of an exponential where everything is turning off. If it's current he's worried about, I would say that if he gets the overhead bias to

Reply to
Fred Bloggs

As an amateur at all this, I'm afraid my knowledge is too limited to understand all of these different versions everybody is talking about. In this case, I don't understand what keeps all the current from the 555 from flowing through the base of the PNP to GND in your design (with no resistor there), or the purpose of the base diode the other post. And I'm kinda reluctant to impose on you to explain it in terms I would understand, since I'm probably the only one in here who doesn't understand how/why your circuit works.

The way I've done it seems to work. I've tested it for a while, and it trips the shutter reliably. As for the current requirement, I guess the maximum draw would be at the beginning of the discharge when the voltage is at its maximum of about 22V, with the DC resistance of the coil being 100 ohms. So maybe it shouldn't work, but it does.

Reply to
George

As long as the transistor remains in the active region, the base current Ib will cause Hfe x Ib of emitter to collector current Iec=Hfe x Ib. Since you know that the emitter terminal is at Veb~0.7V with respect to GND, and the input is at 6V, you must have 6-0.7=5.3V drop across the 1K emitter resistor. So the emitter resistor is carrying 5.3V/1KR=5.3mA and this is the sum of Ib and Iec, or

5.3mA=Iec+Ib=Iec+Iec/Hfe=Iec*(1+1/Hfe). With a typical Hfe of say 100, this makes Iec=5.3mA/1.01=5.25mA, leaving 5.3-5.25=0.05mA for Ib. So you see all the current does not shunt through the base to GND, because the base current causes the transistor to shunt the majority of current entering the emitter to the collector. The PNP collector is clamped to a Vbe above -10V by the base of the NPN, so this keeps the PNP junction well into reverse bias keeping the transistor in the active region. Your circuit on the other does not

At a DC resistance of 100 ohms, the solenoid draws 20V/100R=200mA, so that as a minimum you would want 1/10 that into the base or 20mA. Use the calculation I just showed you to adjust the drive.

Reply to
Fred Bloggs

no load low output from a 555 is less than 0.6v so r2 isn't needed.

remember that the +/-10V rails are derived from the max232 and therfore will sag towards 5.4V and 0.6V when the load is activated,

putting some resistance on the base of q1 and increasing r3 could help keep Q2 saturated. 4V may be enough to hold the relay on after it has pulled in.

+10v (+6V/GND) R1 --- input >-----[470]--. | | +------. '>| R2 | | Q1 |--[1K]--. [load] | PNP /| | | | | --- +-|>|--' D1 | GND | | |/ +--------------| Q2 R3 | |>. NPN [10k] | | | '----------------+--- -10v

Bye. Jasen

Reply to
Jasen Betts

I'm really confused. Assuming what you say is right about the PNP (that essentially all of the current is shunted through to the collector), there's still the question of total current through the 1K emitter resistor. It seems to me that total voltage drop is not 6V, but 16V - from +6V to

-10V. So why isn't the total current 16ma using a 1K resistor?

I just don't understand that. You're assuming a maximum hfe of 10? Not the 100 you referred to above?

Reply to
George

The base terminal of the PNP is sandwiched between the collector and emitter. If the base is pinned to GND, then the emitter, when forward biased, is one Veb above the base potential which is 0.7V nominal. This makes the voltage across the emitter resistor 6-0.7=5.3V. The collector will be at one Vbe of the NPN above -10V, making it 0.7+(-10)=-9.3V. Then the base collector voltage of the PNP is 0-(-9.3)=9.3V, a good reverse bias from N-base to P-collector which puts the transistor into its active region. All of this can be confirmed by measurement so you might try making some of those sometime.

The transistor loses current gain when driven into saturation. Saturation is the operating condition of both junctions forward biased. Most switching transistors are designed for deep saturation at an Ic/Ib ratio of 10 or less. This is the point where you have least emitter to collector voltage drop and least power dissipation. You would be better off taking your discussion to the basics NG.

Reply to
Fred Bloggs

That is all wrong. The OP is working with a 12V relay with 200 ohm coil resistance or a rating of 12/200=60mA coil current. Ideally, you want to drive this with a current source that begins saturation at a 12V total circuit voltage, but then you add components and have to consider a fairly large power dissipation in an unknown junk box NPN. It's simpler to just current limit with a power resistor in the collector of a saturated NPN. The advantage here is less stress on the NPN, reduced discharge rate for the storage capacitor, and less base current drive from the PNP. So my money is on this, assuming a bipolar 555: View in a fixed-width font such as Courier.

. . . +6V +10v . - --- . R2| | . R1 [68k] +------+ . input >-[470]---. | | | . (+6V/GND) | | [load] | . '>| | 1N914A | | . Q1 |-+-|>|-|>|-. +-|>|--+ D1 . PNP /| | | . | --- | . | GND | . | R4|1W . | [150] . | | . | | . | |/ . +----------------------| Q2 . | |>. NPN . R3| | . [1k] | . | | . '------------------------+--- -10v . . .

The 150 and 220 divide the voltage to 0.6 across the coil. The relay should typically hold in for 0.2 x 12=2.4V, or a supply voltage of

2.4/0.6=4V. You say the 232 has sagged to 5.4 and 0.6 for 4.8, so it's good to go. Max coil current is 22V/370=60mA. At the 4.8V minimum supply, you have 0.6x4.8/370=~8mA through the NPN collector, requiring only 0.8mA base drive. The PNP collector will be at 0.6+0.7=1.3V. The PNP remains active. It is pointless to allow the PNP to saturate, you don't save any current, and you slow down the switching times. The maximum possible power dissipation in the NPN is less than 800mW peak transient for a few 10's of nsec worst case. A TO-92 can handle that.
Reply to
Fred Bloggs

Yes. I did that last night after my last post, and of course you are right. The emitter of the PNP does stay at .7V, which determines the current through the resistor. It's the transistor that drops the rest of the voltage.

The problem is that the -10V is not a regulated supply. It's just the negative lead of a capacitor which is charged by a relatively weak charge pump in the MAX232. It is actually -11.72V with the 555 Output low (no current flowing anywhere). If I remove the coil load, so that only the switching current is left, and then set the 555 Output high, the current drawn by my version (47K PNP base resistor and

10K NPN base resistor) was 1.56ma, and the voltage rises to

-10.64V.

But if I use James' version using only the 1K PNP emitter resistor and no base resistor, the switching current totals

4.1ma, and the voltage rises to -8.66V.

So, the more current I use to switch, the less I have left to apply through the load itself. But I understand your point about turning the NPN fully on. I guess I need to think about how I would find the Goldilocks point that would work for your average NPN transistor.

Maybe I should reverse everything and put the load below the transistor, so that the switching current also flows through the load, but I think that may complicate things more than it's worth. I don't know. I'll play with that.

Ok.

Reply to
George

George, The short version of all this is that the NPN transistor driving your relay (Q2) needs a certain amount of base current to do its 'thing,' to make sure it turns fully 'on' and drives your relay. We're all just trying to make sure it gets enough.

The amount needed varies with the gain of the NPN transistor. To switch 120mA, for example, a nice transistor might need a base current that is only 1% of that, or 1.2mA. So 1.6mA might even be enough, if you're lucky. A random junk-box transistor might need a base current as much as 1/10 its collector current to really pull all the way down. *We* over here don't know what your Q2 transistor is capable of--only you know that.

However much current your particular Q2 needs, it's a tiny fraction compared to the amount of your MAX232 supply's current that goes to driving your relay. Therefore, Q2's 'switching current' isn't very important UNLESS you're leaving this thing on for a long time.

If you leave the circuit on all the time, then Q2 (and the relay) will drag on your +/-12v and prevent them from building up.

You're relying on the voltage built up in your filter capacitors to do all this work, so once you start it has to be done quickly--push that button, then release it! If your MAX232 supply doesn't have enough energy to do that for as long as you'd like, then maybe you need some bigger capacitors.

I don't see how that would help. If it's already working, then heck, you're pretty close, right?

Best wishes, James Arthur

Reply to
James Arthur

Yes, I understand that. And I'm just trying to make sure it doesn't get more than it needs and waste battery power for no good reason.

Well, the transistor in question is a 2N2222A in a TO-18 case. Now you know as much about it as I do.

And, you know, in theory since the cap starts at +/-12V, we're looking at a 240ma current at the very beginning, although that drops very quickly. I guess if I could rig up a +/-12V regulated supply, and a 100-ohm resistor, then I could actually measure whether a given base current turns it on fully. Let's see - if I park two cars next to each other, then I could....

It's on for less than a second each time. That pretty much fully discharges the cap. Then it slowly (about 3 seconds) builds up charge again during the Off period, which in my circuit is adjustable from about 5 seconds to over a minute.

Well, at that point the MAX232 isn't contributing much. In fact, it isn't enough to keep the relay pulled in. So, it's basically all in the cap.

Hell, it was working back when I was using three transistors. But everybody said it would be better this way or that way, so I'm just trying to make it as good as I can. From playing with it, it's clear to me that getting that initial full current dump through the coil is critical to getting a reliable pull-in, even when the batteries are partially used up and all the voltages are lower. So I understand the need to turn the transistor fully on. I just don't want to use 4ma to do that if 1.5ma is all that's needed.

Anyway, I've played with your no-base-resistors version and it does seem to work quite well. So, I'll use that, with the only issue being the emitter resistor value.

But it does seem to me that putting the load below the NPN would make all the current flow through the coil, and thus not waste any of it no matter how large the switching current. I just don't know what complications that introduces when the switching current has to deal with that inductance. It's also not clear where you would put the snubber diode(s).

So, I'll play with it some more. It would be nice to get it right - just in principle. Otherwise, I would have farted it off three days ago when it first worked. I mean, you're having fun, aren't you? I certainly am. It's all in the journey.

Thanks very much for your help.

Reply to
George

Not quite. What you know (and we don't) is whether Q2's collector pulls all the way to its emitter supply. Really, I don't think it's that important here: since you've got supply voltage to spare, it doesn't hurt if Q2 fails to saturate.

After checking, your 2n2222a is guaranteed to have a gain of not less than 100 at 150mA and 1.0 volts collector-to-emitter, so that sounds like a pretty good choice. In theory, therefore, 1.6mA is just enough--even in the worst case--and most 2n2222as will have more gain and would operate with even less drive.

A second here's a pretty long time! Fortunately you're using higher than the coil's rated voltage. That gives your mechanism a big push initially, when the magnetic pieces are farthest apart and hardest to move. Once the solenoid pulls 'in' it's easily held there with a much lower current.

But, even considering that, what size capacitor do we need?

Suppose that the capacitor starts at 20v, and we need an average i=80mA, at 10v or more, for a second. This means we can afford to discharge the capacitor by 10 volts. Well, rearranging the approximation i*t = C*v, we get C = (i * t)/v, or (0.08amps * 1 second)/(10 volts) = 8,000uF !! FYI.

Any and all contributions are welcome though! I think the MAX232 may be working harder than you suspect, augmenting the (marginal) energy stores from your big storage capacitor.

Right, understood. We just don't quite understand why you're worried about 2-3mA when the relay is burning 100-to-200mA. But it does seem you're more 'right' than we were--your 2n2222a doesn't need very much drive, and even 1.6mA may serve fine.

Ah, now I understand. You want to use the NPN Q2 as an emitter follower, and put that base current to work. Sorry, but a) the circuit isn't set up that way and b) there's no free lunch--the circuit that *would* do that will pull a lot of current, even when off. And remember, even if any given new configuration worked, it'd only save you 1-5% of the current being used. It's not very much.

Of course I'm having fun!

Hey, if you're really dead-set on cutting that switching current just for the challenge, you could make Q2 a Darlington--or even an n- channel MOSFET--and raise the resistor values to suit. That'll save oodles of switching current.

You've been cheerful, communicative, clear, willing to try things & eager to learn. It's been my pleasure sir.

Sincerely, James Arthur

Reply to
James Arthur

I'm sorry. I didn't say it clearly. The time the relay stays pulled in is, I would guess, about 1/5 second. But the timer resistor was such that the output stayed high a good bit longer than that. The only thing that could accomplish is to reduce the amount of current flowing at the time the transistor shuts off. But that's also wasted power, so I've reduced the ON period a good bit.

I'm using 220 uF, which is probably on the bleeding edge, but it gives a long enough pull-in to take a picture, which after all is the important thing.

But I appreciate the lesson on how to calculate what it should be for a given case.

Well, after the big cap has been charged, the whole circuit draws about 10ma when idle. Then after the charge is dumped, current briefly spikes to a bit less than 40ma, which is all the MAX232 will put out, but that ramps back down to 10ma in about 3 seconds. I guess I'm making too much of the triggering current. Maybe it's because it's the only thing I can affect. Everything else was pretty much determined by what was in the junque box.

Yeah, I kinda figured something like that would be the case.

Yeah, but that would be cheating. :-)

Ok, I set it up per your design, with a 3.3k resistor which draws a bit less current than my earlier 1.6ma. It worked fine. But to simulate what will happen as the batteries run down, I ran it on just three C cells - 4.5V, with a corresponding reduction in the MAX232 output voltage. And the 3.3k didn't work - it wouldn't quite pull in the relay.

But 2.2k DID work at 4.5V. So I decided to use that. I doubt the timers and the MAX232 will work at all much below that, so if 2.2k works there, that's ok with me. Of course I don't really know if the NPN is turning on completely, but it seems to be turning on enough. I mean, it doesn't get warm. :-)

So, James, I'm gonna declared this project to be successfully completed. I'll post the final schematic and the pictures of how it goes together, including the rubber band, the masking tape, and the popsicle sticks, in the binary group tomorrow.

I appreciate everyone's help with this, particularly yours. I've learned a lot. Hope I wasn't too much of a pest.

Reply to
George

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.