Hi Russell, On Mon, Feb 07, 2005 at 01:56:10PM +1300, Russell McMahon wrote: > The reason you are not getting much negative swing is because R3 is > returned to ground and not to DTR. Connect this to DTR and you will > get full swing. At present, when Q1 is off Q2 base is at about ground > and emitter can only fall to about -0.6v before Q2 turns back on. That is similar to my first circuit, minus Q2. With the source of Q1 connected to -12V (DTR), -Vgs never rises enough to shutoff Q1. You're right R3 does keep Q2 on somewhat when Q1 of off. > Note that the FET gate has 24v applied when the opto is on. Ensure it > is happy about this. Some wouldn't be. Thanks, I'll check the datasheet. I've downloaded it somewhere... > I can't imagine that you really need Q1 at all. > If you don't mind the extra components then using the FET as you are > doing now (subject to comments above ) makes the design easier and > dissipates less input power. But - if you want to save a transistor > and some Rs: Change R8 to 10k (or even higher), remove R5 and Q1, > return R3 to DTR and connect R8 left hand end to Q2 base. You may need > some playing with the values of R8 and the drive to the 4N28. The FET > Q1 does help make this less critical. Cool! :) Fewer part is better. I'll breadboard this and see what I can do. I'm afraid I may have to redesign the circuit to reach the voltage swing goals I would like. At least it works :-| > At present you have 120V and 1M > so say 100 UA peaks (actually more). If the opto has a CTR ("current > gain" of 10% (as per spec sheet) then you get 10 uA peaks out of the > opto. R4 would need to be 1M. Getting a bit tight. BUT input power is > 120^2/1m ~= 15 mWatt! Reducing R2 to 100k gives 150 mW - choose R2 > suitably. Now you get 1 mA + pulse to the opto and 100 uA out and with > R4 = 1M you can have the better part of 100 uA drive to the > transistor. If Q2 has a beta of 100 (modest) you drive DTR with 10 mA > ability which should be heaps. Well, for this part of the circuit the current limiting is done by C1. With values of 0.1uF and 60Hz AC at 120V the max current should be about 4mA. A bit of clarification on the design: the reason for the C2-R4 combo is to keep Q1 on during times that current throught the LED in the opto is low due to the rectified AC current. Russell, thanks for your input! (My county's name is the same as your's!) Matthew. -- "Last night I shot an elephant in my pajamas and how he got in my pajamas I'll never know." -- Groucho Marx -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist