Attenuation of a signal using a hex inverter ..#2

MrAl

Joined Jun 17, 2014
13,667

Attachments

Thread Starter

rpschultz

Joined Nov 23, 2022
808
I found a youtube video called CMOS Inverter that helped me build this circuit in LTspice. But I'm not sure if it is the same as the 74HCU04 or not. I sure looks like the schematic in the data sheet.

1724782214962.png
1724782270471.png

When I change the input from pulse to 50hz sine I get this. Makes sense.
1724782554441.png

But then when I try to reduce the input level to guitar levels of +/- 200 mV... it doesn't work:
1724782650573.png

The 74HCU04 is suppose to gain up 40 db I thought. What am I doing wrong?
 

ronsimpson

Joined Oct 7, 2019
4,647
The 74HCU04 is suppose to gain up 40 db I thought. What am I doing wrong?
You are getting no gain because the signal is at or near zero volts. The "inverter" switches near 1/2 supply. (2.5V switching point)

I have not tried this in decades, so my memory is bad.
Capacitor in the input will remove the DC from the signal and allow the input to float up to 2.5Vdc.
Resistor 10meg from out to input is negative feedback.
Give this a try.
1724785809289.png
 

Thread Starter

rpschultz

Joined Nov 23, 2022
808
OK that works:
1724788970522.png

Then I can add R3 to form a LPF. Increasing R3 makes it more square.
1724789928423.png

I have generic CMOS in this model. I thought this was suppose to push towards the rails. 5V and GND.
 

MrAl

Joined Jun 17, 2014
13,667
The idea here I think is to get the inverter to function in the linear region, and that is done with a high value resistor from output to input. Then, a capacitor can be used to couple the guitar signal to the input. If the gain still isn't high enough, you'll have to use a second stage with another high value resistor to get a better square wave.
 

sparky 1

Joined Nov 3, 2018
1,218
On page 12 Practical Oscillator Circuits uses an SN74LVC1GU04 and 25MHz 16pF crystal 2.2M pierce Oscillator
The datasheet shows how to derive values, these could be put into a spread sheet .
Running an unmolested simulation of the original test circuits for the U04 keeping a list of
all the various nodes values. The datasheet shows Rs = 3k output waveform (It is U04)
Its not supposed to be sine or square wave, a microcontroller and frequency synth does that,

The attenuation methods can be evaluated, and which changes occur to the original U04 at the various nodes.
Use of the CMOS Unbuffered Inverter in Oscillator Circuits (ti.com)
 
Last edited:

Thread Starter

rpschultz

Joined Nov 23, 2022
808
On page 12 Practical Oscillator Circuits uses an SN74LVC1GU04 and 25MHz 16pF crystal 2.2M pierce Oscillator
The datasheet shows how to derive values, these could be put into a spread sheet .
Running an unmolested simulation of the original test circuits for the U04 keeping a list of
all the various nodes values. The datasheet shows Rs = 3k output waveform (It is U04)
Its not supposed to be sine or square wave the microcontroller does that,

The attenuation methods can be evaluated, and which changes occur to the original U04 at the various nodes.
Use of the CMOS Unbuffered Inverter in Oscillator Circuits (ti.com)
@sparky 1 , love the name. I had something similar in college.
Interesting document, I'll study. I'm not sure how applicable a crystal oscillator is here. I'm trying to use the CMOS inverter to take a guitar signal and square it off before going into a microcontroller so I can use digitalRead(); Maybe I don't understand what I'm reading.
 

sarahMCML

Joined May 11, 2019
695
So I found an actual model file on Theremin World for 74HCU04. And @ronsimpson is right... adding a LPF at the end does significantly reduce the gain. I was planning to use a voltage divider at the end to lower the output to 3v, but not sure I can.

View attachment 330276
Just put the above signal through one or more stages to square it off, then use a series resistor into your micro's input, with a small signal schottky diode, cathode to V+, from the micro's input to V+ as a clamp. Done!
 

Thread Starter

rpschultz

Joined Nov 23, 2022
808
The 2nd stage definitely squares it off more than just 1. D1 is listed as a 4.7v zener, strange that it cuts it off at 3.3v.

1724859040581.png
 

MrChips

Joined Oct 2, 2009
34,628
There is nothing strange about that 4.7 V zener.
No zener has an abrupt zener breakdown voltage. The zener voltage is a function of current.
The "knee" bend gets even more soft for low voltage zener diodes.


1724860487618.png
 

Thread Starter

rpschultz

Joined Nov 23, 2022
808
OK. A little more detail in the 1N5224 model. This shows a max voltage of 3.147v, which is less than the max MCU voltage.

1724866078770.png
 

MrAl

Joined Jun 17, 2014
13,667
OK. A little more detail in the 1N5224 model. This shows a max voltage of 3.147v, which is less than the max MCU voltage.

View attachment 330328
It might be wise to place a small value resistor in series with the output before the zener. That will limit the current from the output of the M3 MOSFET. Without that it may be too much current for both the transistor and the zener alike.

There is a chance that the output voltage is not that much higher than the zener voltage, but it's something that should at least be checked.
 
Top