Op-Amp buffer Enable/Disable

Thread Starter

Seif_141999

Joined Apr 4, 2021
5
I am designing an electric veichle controller for a University project. The motor driver receives an analog signal (0-12V) to adjust the speed. I use a digipot followed by a buffer to convert the digital signal of the controller to ana analog one. Now I need some way to enable an disable each motor independently. I thought I can achieve this by cutting the supply power off the Op-Amp, but I have no idea how. I think there is Op-Amp with a disable pin, but I cannot what the state if the output is when the Op-Amp is disabled and I tried to simulate it using proteus software but it does not seem to work at all, further more I couldn't find this kind of Op-Amp locally to actually try it out. I am interested to know what you guys think. I will attach the schematic below.IMG-20210404-WA0006.jpg
Edit: I also thought about adding a comparator and supplying power to the buffer from the output of the comparator. But think this could be unnecessarily complicated
 

Papabravo

Joined Feb 24, 2006
16,785
Using a comparator to supply power to an opamp is IMHO a profoundly stupid idea. An analog multiplexer is a much better idea. If the opamp is not needed then you can switch the output to a place where it will have no effect and switch something else in to replace it. Where did you learn to design things. Midnight Auto Supply & Cycle Parts?

These could work for example:

https://www.st.com/content/ccc/reso...df/jcr:content/translations/en.CD00003067.pdf

Connect the opamp to one input and GROUND to the other. The switch will either connect the opamp or the GROUND to the motor. Now you don't have to guess what is going to happen if you remove the opamp's power pin.
 
Last edited:

crutschow

Joined Mar 14, 2008
27,718
You could use an analog switch, such as CD4066 to cut off the signal, or add a resistor in series with the signal to the op amp with a small N-MOSFET connected to ground.
Turning on the MOSFET will clamp the signal to ground.

Below is the LTspice simulation of the two options:
Note that a high enable signal (green trace) allows the arbitrary analog signal (yellow trace) through the analog switch to be active (red trace), whereas it clamps the signal to ground for the MOSFET signal (blue trace).

View attachment 234510
 

Papabravo

Joined Feb 24, 2006
16,785
You could use an analog switch, such as CD4066 to cut off the signal, or add a resistor in series with the signal to the op amp with a small N-MOSFET connected to ground.
Turning on the MOSFET will clamp the signal to ground.

Below is the LTspice simulation of the two options:
Note that a high enable signal (green trace) allows the arbitrary analog signal (yellow trace) through the analog switch to be active (red trace), whereas it clamps the signal to ground for the MOSFET signal (blue trace).

View attachment 234510
Either one of those is head and shoulders above cutting the power to an active part.
 

MrChips

Joined Oct 2, 2009
24,181
The only time I would control power is if I want to go into low power or sleep mode. For digital signals, use a logic gate. For analog signals, use an analog switch or multiplexer as already noted.
 

Thread Starter

Seif_141999

Joined Apr 4, 2021
5
You could use an analog switch, such as CD4066 to cut off the signal, or add a resistor in series with the signal to the op amp with a small N-MOSFET connected to ground.
Turning on the MOSFET will clamp the signal to ground.

Below is the LTspice simulation of the two options:
Note that a high enable signal (green trace) allows the arbitrary analog signal (yellow trace) through the analog switch to be active (red trace), whereas it clamps the signal to ground for the MOSFET signal (blue trace).

View attachment 234510
This seems to solve my problem if I place the CD4016 before the buffer
Thank you
 

Ian0

Joined Aug 7, 2020
3,235
But don't put 12V on P0A. The datasheet says no pin (except SHDN) should be more than 0.3V above Vdd, and Vdd may not be more than 7V.
You can disable it without using any extra parts by connecting the disable signal to P0A, (if the disable signal comes from a logic gate running on 5V) - I'm assuming you have one MCP4131 for each motor - if you only have one MCP4131 in total then I'd agree with everyone who suggested an analogue switch.
If you really need a 12V output, then the op-amp will need to be connected to have a gain of 2.4. Or can your motor driver be set to use a 0-5V signal?
18k feedback, 13k to ground should do the trick.
And as a final point, if you power an LM358 off 12V you are not likely to get much over 10V on the output, it you need 12V output, you need a 15V supply, or a rail-to-rail op-amp.
 

Thread Starter

Seif_141999

Joined Apr 4, 2021
5
But don't put 12V on P0A. The datasheet says no pin (except SHDN) should be more than 0.3V above Vdd, and Vdd may not be more than 7V.
You can disable it without using any extra parts by connecting the disable signal to P0A, (if the disable signal comes from a logic gate running on 5V) - I'm assuming you have one MCP4131 for each motor - if you only have one MCP4131 in total then I'd agree with everyone who suggested an analogue switch.
If you really need a 12V output, then the op-amp will need to be connected to have a gain of 2.4. Or can your motor driver be set to use a 0-5V signal?
18k feedback, 13k to ground should do the trick.
And as a final point, if you power an LM358 off 12V you are not likely to get much over 10V on the output, it you need 12V output, you need a 15V supply, or a rail-to-rail op-amp.
Ohh I did not I did not know that the P0A pin cannot exceed Vdd
Thank you I will try using 5V and a gain of 2.4
Thanks
 

crutschow

Joined Mar 14, 2008
27,718
I don't see it as sarcasm as much as a sign of his highly developed sense of humor. He doesn't bite.
Well, you and PB have a difference sense of humor than I.
I certainly don't see how telling someone he has a "profoundly stupid idea" and "Where did you learn to design things. Midnight Auto Supply & Cycle Parts?" is an indication of a highly developed sense of humor.
To me, It's an insulting put-down with no trace of humor, and I understand why the TS is upset (as I would be if someone said that to me).
In my opinion such personal comments have no place on this forum, and as a Moderator, I don't see how that's not apparent to you..
 

DickCappels

Joined Aug 21, 2008
7,704
I appreciate your point of view and I do wish a certain member would be more gentle, especially with new members, but I don't see the comments as being actionable. Maybe the behavior is because it is familiar to me or maybe its because it struck me as way of waxing humorous.

One thing that more members should take note of is the User Agreement imposes the following requirement on members using the forums: Appropriate conduct. Debates should be a civil activity and can be both enlightening and entertaining, but always keep discussion to the facts and the opinions. Ad hominem tactics and directed abuse are always "out-of-bounds".

I guess this needs more attention paid to it by all of us.
 
Top