According to the circuit diagram image and below video I uploaded, voltage between the motor is not stable. What can I do? In Proteus the simulation of motor runs differently so to fix this, any option available? Changing voltage difference is mentioned in this video.
4 Answers
Operating an opamp in open loop like you do is practically never the right thing. So, what you should do is have a look at some standard opamp circuits, and pick one that describes your use case.
I'd recommend one, but I'm not 100% sure what you want to do, so I can't advise. I simply can't infer what you want your circuit to do – its implementation seems wrong in multiple ways: not only do you have no feedback, you're feeding Q1 without a base resistor; Q1 is almost certainly not the thing you want to drive a motor, unless that motor is very small, and even then, you'd want a flyback diode.
I recall building one of these circuits in my past.
First note: Op amps are never used as comparators for stability, noise, and precision reasons. Comparators like an LM393 are cheap and commonly available, so I suggest designing the circuit with one of those.
If that isn't possible, here are some quick solutions:
Regarding an unstable voltage, there are multiple things to consider:
- Is the spice software you are using have the correct IC model and characteristics? Are you building this circuit physically and testing it?
- Is the Op Amp chip you ordered a fake? Is it damaged?
- How much current is the base of your NPN transistor drawing from the op amp?
- Is there noise/debounce when the op amp comparator switches states? Maybe add a capacitor on the inverting pin (-) and output of your op amp (on the order of maybe 10nF - 100nF) to reduce any noise.
Suggested additions: I would add a resistor, probably a 2.2k ohm resistor, between the output of your Op Amp and base of that NPN BJT. The reason for that is because a large current draw from the op amps output can cause instability and undesired (or even unexpected) results. Check the op amp datasheet for the maximum current output and stay below that.
Also, the potentiometer could be reconfigured as a rheostat and you can connect the inverting pin of the op amp to the junction between the potentiometer and NTC thermistor, this should make tuning the temperature in easier.
simulate this circuit – Schematic created using CircuitLab
This is a simple on/off controller. The opamp is acting as a comparator. The advantage to using an opamp is that it has an active pull-up in its output stage, so you do not need an external pull-up resistor to turn on Q1. The LM358 is a good part for this because its output stage swings low enough to turn off Q1 without other components.
Besides a base current limiting resistor for Q1, I recommend adding hysteresis to the circuit so it does not vacillate rapidly between on and off when the temperature is right at the trip point. A 22K resistor from pin 1 to pin 3 should quiet the circuit.
In the video image there is 3.35 V across the Q1 base-emitter junction. This is not correct. It can vary based on the transistor, but it should be somewhere between 0.5 V and 1.0 V.
It's not clear to me why the simulation is doing that- whether it's simulating some effect or just not working properly.
However, you are overloading the output of the op-amp (which is being used as a comparator) by omitting a series base resistor. Try that in the simulation, something like 2kΩ between pin 1 and the transistor base.
In practice (when you get around to building it) you might want to add a bit of positive feedback so the fan switches cleanly from off to on and back again. For example, a resistor from pin 1 to pin 3 of the op-amp to give something like 1-2°C of hysteresis.
The pot connection is a bit unorthodox but it may work for you depending on what you're trying to accomplish.
For all LM358/LM324 applications this relatively recent application note is very useful, including comparator applications (pp24-26) and what to do with unused amplifiers in the same package. Kudos to TI for continuing to support a part that is 50 years old and still used in enormous quantity.