74AHCT125 Quad buffer/line driver question.

Thread Starter

Bod

Joined Sep 18, 2016
256
I have a circuit that produces 4 different outputs between the range of 0-5V, coming from audio biased at 2.5V (the circuits are a high + low pass filter, positive + negative peak detector)
The micro controller I am using is an ESP32. It can only take up to 3.3V on the input (3.6 if you want to push it). Since my outputs are often greater than 3.3V, it will fry the board.

That means I needed a way to lower the voltage from 5 to 3.3. One of my ideas was to use something a logic level convertor like this: 12009-07.jpg
It takes 5V and makes it 3.3V, or 3.3V -> 5V. I am already using one for the light strips connected to my ESP32. The problem is, they are using transistors, which I believe won't switch fast enough for audio. Since my output is a range (0-5V) not just a constant 5V, I don't know what the output would be if the input was something like 4.2V.

Anyway, I did some more looking around and came across the 74AHCT125 Adafruit chip. It is 3-state quad buffer/line driver. The datasheet describes it as a "a high-speed Si-gate CMOS device". It says it's 'high-speed', so I'm hoping it will work with audio.
In the datasheet under section 9 - static characteristics, it provides a good table:
Screen Shot 2020-01-30 at 17.49.38.png
I don't really understand it though. Unlike the logic level convertor, there are no low/high voltage pins, just input and output pins. If I were to put 2.0V in, how would it know whether I wanted more than 2V out or less than 2V out?

Is anyone able to provide more insight into this chip? Or even better, a way to covert a range of 0-5V to a range of 0-3.3.
 

dl324

Joined Mar 30, 2015
10,072
The device referenced is a tri-state buffer. When enabled, the output will be the same logic level as the input. It doesn't do level shifting. Like most CMOS devices, it has diode clamps on the input.

At audio frequencies, you could use a voltage divider. Or you could use CD4050 which are designed to do high voltage to low voltage conversion (they removed the clamp to the positive supply).
 

Thread Starter

Bod

Joined Sep 18, 2016
256
The device referenced is a tri-state buffer. When enabled, the output will be the same logic level as the input. It doesn't do level shifting. Like most CMOS devices, it has diode clamps on the input.

At audio frequencies, you could use a voltage divider. Or you could use CD4050 which are designed to do high voltage to low voltage conversion (they removed the clamp to the positive supply).
Thanks for the reply. Honestly, the voltage divider is definitely the best way to go. I was trying to think about any reason it would not work, but as long as the input voltage is clamped between 0 and 5, if I halve it, it will never go above 2.5V anyway.
 

ericgibbs

Joined Jan 29, 2010
9,576
hi Bod,
I use the level shifters as shown in your picture, they work OK.
Using as level shifters at 20MHz on SPI.

If you solder a 78L03.3, TO92 across the top of that PCB, you can create 3.3V from 5V for additional 3.3V devices.

E
Edited 78L
 
Last edited:

Thread Starter

Bod

Joined Sep 18, 2016
256
hi Bod,
I use the level shifters as shown in your picture, they work OK.
Using as level shifters at 20MHz on SPI.

If you solder a 78L05, TO92 across the top of that PCB, you can create 3.3V from 5V for additional 3.3V devices.

E
That's good to know. I think I should be able to try it out. Im not sure how much voltage my function gen puts out.
Even if it works for frequency, will it work for the full voltage range?
I.E on the level shifter, a 0V input will be a 0V output and a 5V input will be a 3.3V output. But what about a 2.3V input. Will the output be 0V or will it be 1.3V? (1.3 is the actual voltage you will get out when you put in 2.3, providing the board allows that)
 

Chris65536

Joined Nov 11, 2019
164
I have a circuit that produces 4 different outputs between the range of 0-5V, coming from audio biased at 2.5V
I don't think digital buffers or level shifters are the right choice for your analog signals. Simple resistor voltage dividers would be better.
 

Analog Ground

Joined Apr 24, 2019
305
However, you convert the signal, the minimum input voltage for a logic high level on the EPM32 is 75% of the power supply voltage. So, 75% of 3.3 V is 2.475. You mention 2.5V but this is too close to the minimum high level. I suggest going above that to give some margin. Like 3V or more.
 

OBW0549

Joined Mar 2, 2015
3,221
Are his signals digital? From the original post, I thought it was analog signals going to the A/D converter inputs.
I'm getting an impression that the TS may not be totally clear on the difference between analog and digital signals, and what his various buffer/level translator solutions will do to his signal. He starts out clearly identifying his signal as analog, specifically "audio biased at 2.5V" but then goes into discussion of logic level converters and the 74AHCT125 chip. He may not be aware that these devices do not produce a voltage output which is a linear function of input voltage and that instead, they produce a logic output in response to a logic input.

I'm at a loss as to what he's trying to do here.
 

eetech00

Joined Jun 8, 2013
1,844
I have a circuit that produces 4 different outputs between the range of 0-5V, coming from audio biased at 2.5V (the circuits are a high + low pass filter, positive + negative peak detector)
The micro controller I am using is an ESP32. It can only take up to 3.3V on the input (3.6 if you want to push it). Since my outputs are often greater than 3.3V, it will fry the board.

That means I needed a way to lower the voltage from 5 to 3.3. One of my ideas was to use something a logic level convertor like this: View attachment 197928
It takes 5V and makes it 3.3V, or 3.3V -> 5V. I am already using one for the light strips connected to my ESP32. The problem is, they are using transistors, which I believe won't switch fast enough for audio. Since my output is a range (0-5V) not just a constant 5V, I don't know what the output would be if the input was something like 4.2V.

Anyway, I did some more looking around and came across the 74AHCT125 Adafruit chip. It is 3-state quad buffer/line driver. The datasheet describes it as a "a high-speed Si-gate CMOS device". It says it's 'high-speed', so I'm hoping it will work with audio.
In the datasheet under section 9 - static characteristics, it provides a good table:
View attachment 197931
I don't really understand it though. Unlike the logic level convertor, there are no low/high voltage pins, just input and output pins. If I were to put 2.0V in, how would it know whether I wanted more than 2V out or less than 2V out?

Is anyone able to provide more insight into this chip? Or even better, a way to covert a range of 0-5V to a range of 0-3.3.
Hello,

If I understand correctly, you have an audio signal in the range of 0-5 you want to scale to 0-3.3v?
Why not use an opamp with a voltage divider to scale the audio into the ESP32?

Or, are you needing to scale a DC voltage (output of peak detector)?

You may, instead, need to use level detectors (comparators).

eT
 

Thread Starter

Bod

Joined Sep 18, 2016
256
Well, unfortunately, it seems my reply didn't get posted, so I'll summarise what I said.
To put it simply, I did in fact get confused between digital and analog. I did end up just going with a voltage divider.

Sorry to everyone who was waiting for a response!
 
Top