CMOS inverters as comparators: "tweaking" threshold level ?

Status
Not open for further replies.

dedjazzgadgetz

New Member
Hello everyone !

In a design I'm working on right now, 3 comparators are used to detect (going "high") whenever their input almost "touch" Vdd (my circuit runs on +/- 7 volts). It just so happens I have 3 unused CD4069 inverters in there, as well...

Just for the sake of elegance & streamlining, is it possible to coax an inverter ("tweak" its threshold level using say, a resistor network, a zener diode... IDK) to act as a comparator (inverting, that is), in the process getting rid of my quad comparator chip ?

In other words: the inverters would be required to output "high" only this time, when their input just shy of Vss.

A quote off the net "sort-of" implied such a possibility (wishful thinking, I know...): "When you short-circuit the output to the input of a CMOS inverter, you are making a comparator." (I think it was off edaboard, or something... I searched a lot, including this site. Please forgive me if I overlooked anything... )

Thank you for reading on and pointing me in the right direction !

Joël
 
Find the data sheet on the CD4069 and look for input threshold.
Look at the TI data sheet Fig1. The input could switch at almost any voltage (usually 1/3 to 2/3 supply). So as a comparator you really don't really know where it will switch.

Fig2 shows that if the input is at ground or supply the supply current is about 0uA but if the input is at the switching point the supply current is 5mA with a 10V supply.
 
Seems to me that if you short the output to the input of a CD4069, you have yourself an oscillator running at a frequency according to the delay time through the inverter.
 
Last edited:
Thanks for the replies, guys !

I just found the quote:

"CMOS inverter is itself a simple push-pull Class B amplifier because PMOS pushes the load, whereas NMOS pulls the load.
When you short-circuit the output to the input of an CMOS inverter, you are making a comparator. Instead of a short-circuit, replacing it with a resistor will create a single-NMOS transistor amplifier with drain-feedback and a single-PMOS transistor amplifier with drain feedback. Such combination sets the operating point to the mid-point of a DC loadline, hence a Class A amplifier. This is used to prevent short-circuit between input and output in high-frequency application."


-from edaboard member SkyHigh

Basically, I'm just wondering if there was any clever way to alter (lower) the threshold level of a CMOS inverter (feed input Vss=1, anything say, 1/10th volt above Vss=0). IDK... maybe using it in the amplifier mode but biasing it somewhat; errr... IDK !? Just curious (and it would save a chip !)
 
Last edited:
First you need to lower the hysteresis, which can be done by using some value of resistor from the output to the input with the right value resistor you can get the schmidt inverter close to zero hysteresis.

Then the threshold level(s) can be adjusted by adding some resistor biasing on the inverter input in the form of a voltage divider.
 
a-Ha ! So you gather it could be done ?

-"Off to the Chip-cave, Breadboard-Man !"

Cool ! I'll fiddle with that and see what I can come up with...

Great: thanks-a-million !

Joël

errr... any ballpark figure resistor-wise, by any chance ? ...I didn't know CD4069 were Schmitt triggers, with hysteresis; oh well...

P.S.: I checked-out your site... cool stuff ! I like the motto:

"The secret to minimalist design
is to reduce the parts to what MUST be there
to get the task done.
But before that you reduce the task itself..."
 
Last edited:
Hi,

The key point in doing things like this is what the required accuracy is. If you can get away with very very poor accuracy, you can use a big hunk of volcano lava

When you need accuracy and repeatability that is a different store entirely. You might get a CMOS chip to work, and work well, but then something not under your control changes and all of a sudden it doesnt work anymore. Namely this change could be as simple as a small temperature rise. That could screw up the whole project.

This is why some parts are made to have very exacting specifications so that the designer can achieve the accuracy needed by selecting the part that fits the job.

So with this in mind, if you can suffer some accuracy you might get by on some special biasing, but if you need decent accuracy you'll need the standard parts that are made with this in mind.

I've done experiments even with CMOS analog switches with an analog signal on the *logic* inputs as well as the analog inputs. Results are interesting.
 
I'm a fan of simple circuits but not if it requires "tweaking" to get the desired result (As Einstein supposedly said "Make it as simple as possible, but no simpler"). I recommend sticking with the comparators and forget trying to kludge a CMOS inverter to do the job.
 
In other words: the inverters would be required to output "high" only this time, when their input just shy of Vss.

The attached accomplishes the equivalent of that function. You can adjust the threshold from several millivolts to about 0.6 volt above VSS by adjusting the value of R3 (and R1). Here, the threshold voltage variance with temperature is approx 2 mV/°C; small compared to the variance of the CMOS threshold (ignoring resistor variance and assuming your power supply is reasonably regulated). The threshold will vary 100 mV and more from transistor to transistor, however. The inverter provides a healthy dose of positive feedback so that a slow moving input voltage around the threshold doesn't toggle the output, and to ensure that the transistor snaps solidly off, or solidly on. This simple transistor comparator would not work without positive feedback.

 
Last edited:
Hi,


Cute circuit there but i cant see anyone wanting to do something like that just to get out of using a small chip comparator.
 
Hey ! Cool idea there, ccurtis ! Very clever indeed...

1 additional tranny (3 in my case): 1 quad comp. -gone ! I'll give it a go asap ('though I'll test with +/- 7 volts). Thanks/Will report !

Peace,
Joël

P.S.: I read (somewhere ?) at least 5 inverters in-a-row would be required for oscillation to occur...

P.P.S.: Guys... I see no harm in trying out new (and why not: plain silly !) ideas, if just for the sake of sheer, healthy "what if ?" creativity ! Plus: saving a square-inch (a 14 pin quad comp.+associated components) of board real-estate is crucial in my small Hammond 1590B guitar-pedal design... and the 3 unused inverters were just wasted otherwise...). Anyways: any and all advice well taken, no doubt about it; thanks all!
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…