0
\$\begingroup\$

I want to build a little voltage switch that switches on a buzzer and a relay when a certain voltage is reached. Please have a look at the schematic.

I use a trim potentiometer to set up the switch voltage so that it equals the zener voltage, in this case 3.3 volts. Then the Op Amp (741) switched to Vcc and drives the transistor (PN2222A) which switches on the 12V Relay and the buzzer. The Basis resistor is set in a way that I will have a Ic of around 150 mA.

So far so good.

My problem is that the Op Amp is not "ideal" and does not switch to 0V when the Voltage on the positive input is lower than the Zener voltage. There is about +2V, which is obviously enough to drive the transistor, so the relay/buzzer is always on.

There is also not a "hard switch" from 0 to Vcc, the Op Amp slowly increases the output voltage and then suddenly goes to Vcc.

I am aware of the DC offset problem, but how can I compensate it if I only have Vcc and 0V?

One other solution I found on the web was to put a feedback loop in. How do I dimension the feedback resistor?

These might be very basic questions, but I would appreciate your help.

Thanks in advance.

schematics simple opamp switch

\$\endgroup\$
  • \$\begingroup\$ You're using the op amp as a comparator. Any reason you aren't using a comparator? Also, you've used the symbol for a tunnel diode on what appears to be a zener diode. Also also, you should never use a 741. It's extremely obsolete. \$\endgroup\$ – Hearth Nov 4 '18 at 23:39
  • \$\begingroup\$ Hi. Sorry, yes, the symbol is wrong. It is a Zener. Quicky scribbled it. Re comparator: I assumed an OP amp is the simplest way to implement a comparator. Re 741. i might be outdated here. When i learned about this 30 years ago (and i forgot a lot) the 741 was up to date ;) what is a modern alternative? \$\endgroup\$ – Dsch Nov 4 '18 at 23:42
  • \$\begingroup\$ A popular op amp for hobbyists is the LM358; two op amps in one package, cheap, and superior to the 741 in every way imaginable. But you want a comparator for this job, not an op amp. Try looking around here for a selection of comparators, and if you want to browse op amps, they have those too. \$\endgroup\$ – Hearth Nov 4 '18 at 23:46
  • \$\begingroup\$ Thanks! So for instance a LM393 (first result) would be fine. \$\endgroup\$ – Dsch Nov 4 '18 at 23:50
  • 1
    \$\begingroup\$ The reason the op amp is sluggish to go from off to on initially is that in the off state it's saturated--it's output is pulled as close to the negative rail as it can get, and it's still not at equilibrium because the inputs aren't equal. Op-amps are generally slow to recover from saturation, which is one reason they make poor comparators. \$\endgroup\$ – ajb Nov 5 '18 at 1:17
0
\$\begingroup\$

You are using an op-amp as a comparator, not ideal but not the end of the world in many applications. Your circuit could work with the proper op-amp. You need one that can reach ground when its power supply is tied to ground. This is what most single-supply op-amps do, particularly if they have rail-to-rail outputs.

But if you are going to actually buy the parts (not just pick them up from a drawer) go for a real comparator.

\$\endgroup\$
  • \$\begingroup\$ Yes, i will buy the parts now. So will go for compartors. Thanks! \$\endgroup\$ – Dsch Nov 7 '18 at 20:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.