0
\$\begingroup\$

I am using this op-amp circuit to buffer voltage (0-5V) received from MCU. Resistors at the output are used to limit the current controlling the solid-state relay. However, (Vin) coming from MCU is noisy and as a consequence (Vout). This makes the operation of the SSR unstable. How can I reduce or avoid this noise. Vin is an on-off square signal of maximum pulse duration of 20ms, to switch the SSR on and off.

buffer op amp

Edit:

A view of the PIC circuit is given below, Vin is taken from A0 pin. Next, a view of the noisy Vin signal taken from Oscilloscope is shown. And a zoomed view of this signal at the high-to-low change is also given. I am sorry for combining all images in a one, because I am not able to attach more than two images in this question.

MCUandNoise

\$\endgroup\$
  • 1
    \$\begingroup\$ You said: "However, (Vin) coming from MCU is noisy" (a) Do you have a 'scope trace image / photo to show what you mean? It would be unusual for an MCU output to be "noisy" unless there is something odd going on... (b) Please supply more of the schematic (preferably the whole schematic) to show the MCU and all its connections, which may help us to understand how its output is "noisy". \$\endgroup\$ – SamGibson Aug 23 '16 at 22:36
  • 1
    \$\begingroup\$ Please be specific when writing questions electronics.stackexchange.com/help/how-to-ask When you say noise, that could mean a number of different signals that could be considered noise and each will require a different solution. Ditch the op amp, use a mosfet or a bjt to drive the relay. \$\endgroup\$ – Voltage Spike Aug 23 '16 at 22:54
  • \$\begingroup\$ What do you do with the other op amp in the package? \$\endgroup\$ – Sredni Vashtar Aug 23 '16 at 23:06
  • \$\begingroup\$ @SredniVashtar The other op amp in the package is not used/connected. \$\endgroup\$ – n.na Aug 23 '16 at 23:16
  • 1
    \$\begingroup\$ maximintegrated.com/en/app-notes/index.mvp/id/1957 , or do a search for "unused op amp connect". Might help you. \$\endgroup\$ – Sredni Vashtar Aug 23 '16 at 23:23
2
\$\begingroup\$

Is there any reason why you are using an op-amp in the first place?

Now in case this is because you must use the op-amp please note that: by placing a resistor in the op-amp's input you are reducing its input impedance. This setup is inducing the ripple you see in the scope. If by placing the input resistor it's your intention to reducing the current, you are doing quite the opposite because the opamp already has a high input impedance. Taking off the resistor will reduce the load on the microcontroller's output thus reducing the ripple.

schematic

simulate this circuit – Schematic created using CircuitLab

Now, as the circuit is driving a LED, I would recommend a single rail op-amp like LM158. This will simplify your design as you won't have to worry about the reverse current on the LED.

If an op-amp is not a must, an open collector digital driver like the old 7407 would be enough.

schematic

simulate this circuit

Even if noise is an issue, you could use an Schmitt trigger buffer like 7417. These circuits work well up to 15 volts but there are devices available with higher rated voltages. Now, if you want to simplify even more. Use a transistor as others have suggested.

\$\endgroup\$
  • \$\begingroup\$ thank you for your attention, I am using this circuit to control Solid-state relay (pvx6012). This SSR need a deriving current of maximum 25mA. A larger current would damage the SSR. The SSR works as a fast switch (2ms) for current to another circuit. Can I do this with open collector driver? \$\endgroup\$ – n.na Aug 25 '16 at 10:46
  • \$\begingroup\$ The resistor is there to limito the current. Read the PVX6012 datasheet again because it has a minimum control current. Then use an intermediate current to calculate the value of the resistor. Calculating the value of the resistor should be pretty easy. Anyway if you are not sure, you may refer electronics.stackexchange.com/questions/17179/… and electronics.stackexchange.com/questions/14852/… \$\endgroup\$ – Krauss Aug 25 '16 at 13:32
  • \$\begingroup\$ Noise ripple shown in the figure above is observed in the MCU pins even if it is not connected to OP-AMP. \$\endgroup\$ – n.na Aug 25 '16 at 13:39
  • \$\begingroup\$ I believe there is something wrong on the MCU or elsewhere. This is not typical behavior. Some thoughts: The crystal frequency is too low, there is another load attached to the pin (like a long cable.) Have you tried with a 10x oscilloscope probe? \$\endgroup\$ – Krauss Aug 30 '16 at 8:28
0
\$\begingroup\$

I don't think you need a Op-amp to drive a SSR. A NPN bipolar would do the job without the "noise" issue.

Anyway, the question regarding the noise can be solved by replacing the op-amp stage by a Schmitt trigger(nice comparator with hystersis). Set the Vref to around half of the MCU Supply. This will ensure zero false triggers for SSR.

enter image description here

More power to you.

\$\endgroup\$
  • \$\begingroup\$ I have tried using Schmitt trigger with V+ (+5v) and V-(0v). However, I still have the same noise at the output, as shown in the Figure in the quastion above. \$\endgroup\$ – n.na Aug 25 '16 at 13:32
  • \$\begingroup\$ how about you put the Vref to 2.5V and then check it out. \$\endgroup\$ – ammar.cma Aug 25 '16 at 15:22

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.