Hi. I am trying to replicate a very old circuit that uses transistors to turn a 6v dc motor CW or CCW depending on what voltage is coming from 2 potential dividers.
If A > B go CW
If A < B go CCW
If A = B do nothing
The problem with the old circuit is the old transistors are no longer available and the equivalents have a different gain which are causing the motor to twitch a lot.
I was looking into using OPAMPS to compare the 2 input and switch on Darlington arrays that control the motor via 2 relays.
I haven't really used OPAMPS before and don't know which type would be best and how to wire them to function how I want them to.
About the simplest thing you can make with an op-amp is a comparator.
If the +input is greater than the -input, the output goes high (to the maximum). If the +input is less than the -input the output goes low (to the minimum).
You have one output (2 states) so you'll have to figure out how to control your relays.
You can add hysteresis (which is done with positive feedback) for better stability (no switching back-and-forth when the inputs are equal or about equal).
That would be easy to implement with a microprocessor, but quite difficult with op amps, especially if A and B can take on any voltage between 5 and 7 V.
However, defining "=" is not trivial for any system where the voltages on A and B are variable.
Yeah... In the real analog world A will never exactly-equal B and there will be some noise/instability so hysteresis or a "dead zone" my be the answer.
...Similarly, with analog-to-digital conversion there is always the possibility of being on the hairy-edge between two digital values and the numbers can jump up & down by one count. And frequently there is noise, drift, or other instability, and the readings jump by more than one count.
It does pretty much exactly what you wrote; it compares a reading with a set value (pot meter), and then runs a motor in one direction if it's below the threshold or the other if it's above. There's a 'dead zone'/hysteresis in between where neither motor relay is switched. This hysteresis is settable with a second pot meter.
I traced the schematic mostly for amusements' sake and even ran some LTSpice sims on it. The defect I fixed was unrelated to the comparator setup, which still worked fine after 37 years in the field. It's all very simple electronics with discrete components etc.
Maybe you can take inspiration from it in some way.
Heh. I was wondering about how an actual deadband might look.
Edit: What I like about this circuit is the configuration of the variable resistors with the "Voltage" VR providing the top comparator with a its threshold voltage, and the "Sensitivity" VR providing an offset from the other voltage to give the bottom comparator its threshold.
If this were my project, I'd replace all the control circuitry with a single ATtiny, two small MOSFETs to drive the relays and a handful of resistors to lower the two control voltages (insofar as necessary) into the ADC. A small linear regulator can power the microcontroller.
Something with opamps and discrete components is of course also possible if you enjoy the engineering exercise. But if it's a "let's get this over with" kind of project, I'd lean towards the microcontroller solution.
To be clear, the partial schematic you refer to in @DaveX's post is from a voltage stabilizer unit built in the late 1980s. So we're talking about design decisions made by an anonymous engineer who, for all we know, may be retired or even deceased by now.
The sense of the 12V is that they used a 78L12 as a voltage reference. The 15V rail is made with a zener shunt regulator and will in practice drift, so was likely deemed insufficiently stable.
It's a nice exercise. I'd recommend firing up a simulator of your choice and playing with some concepts until you've got something that works. Then build a prototype and evaluate it. I prefer to use LTSpice for this kind of thing, but I've been using it for...I dunno, way too long. It has a learning curve. There may be alternatives out there that are also quite capable and more user friendly.