Getting 3-5V signal into 3.3V circuit without 5V voltage source? - Page 1
Forum section: electronics / beginners

author: bayjelly
author_rank: Regular Contributor
timestamp: July 13, 2017, 09:24:18 pm
content: I am trying to get a signal (called "Control A1-II") from my MiniDisc deck into a 3.3V circuit I'm building. According to various non-authoritative sources on the web, the signal is supposed to be a 5V TTL level signal, but I'm measuring something closer to 3V. Since I don't think anybody has the real spec, maybe that's expected from my relatively new deck.The signal is relatively slow with a clock of about 1.6kHz.Anyway, given that I did not want to get surprised by 5V signals when plugging in other equipment, I am designing the input circuit to work with varying signal levels. Using the parts I had lying around at that moment, I built a comparator using a rail-to-rail OpAmp. I attached GND and 5V as the voltage rails, set the comparator threshold at about 2V with some hysteresis using simple resistor dividers, and divided the 5V output of the OpAmp down to about 3.2V. That signal finally either goes into the second OpAmp input, set up as voltage follower (for buffering) or, alternatively, I could use the 3.3V 74HCU04SN Schmitt Trigger Inverter I also have on the board.It works, but the problem I have is that this solution needs a 5V supply, when previously I only needed a 3.3V supply. How can I accept varying voltage inputs up to 5V, while keeping the same threshold voltage, without a 5V supply? Solutions I thought about:Use 3.3V as rail and supply on the OpAmp and let it just clip everything over 3.3V. But Absolute Maximum Ratings of the OpAmp say that signal levels must lie between the lower rail minus 5V, up to the upper rail.Use a resistor divider directly on the input, into a buffer. But won't I need to take the signal's output impedance into account? Also, a 3V signal would be divided down as well, and therefore effectively have a different threshold.Use a clamping or zener diode or something of sorts. You can tell by how I phrase it that I'm enough of a beginner to not even haven't used anything like that yet, so I have no idea whether that's viable and sensible here.Any suggestions welcome!

author: Benta
author_rank: Super Contributor
timestamp: July 13, 2017, 09:47:27 pm
content: You're overthinking this. High level output from TTL is around 3 V.If it really disturbs your sleep, place a series resistor on the signal and let the transient protection diodes on your 3.3 V IC take care of the rest. If you want to go 100% anal, a series resistor and a two-diode protection array to +/0 will take care of everything.

author: bayjelly
author_rank: Regular Contributor
timestamp: July 13, 2017, 10:16:14 pm
content: I was worried because the SoC I'm using (a Zynq) does not appear to tolerate 5V, and various resources on the net called out that the signal is supposed to idle at 5V. You might be right that handling that is unnecessary, though, especially given that I haven't actually seen an actual 5V level on the line yet.Still, this project, while also serving a practical purpose, is also a huge learning opportunity, so I am deliberately over-engineering some aspects of it. Say I would have a need to clip the signal to 3.3V, how would I do it?I'm quite happy to have found a solution myself already, but unhappy that it needs a 5V source.

author: Benta
author_rank: Super Contributor
timestamp: July 13, 2017, 10:30:41 pm
content: Well, the full program is series resistor to input, Schottky diode from input to +3.3 V, Schottky diode from ground to input.Lots of companies make such protection devices, check ON Semiconductor, for instance.

author: KL27x
author_rank: Super Contributor
timestamp: July 13, 2017, 10:44:48 pm
content: Overthinking? Yes.If you want to do it, anyway how about youDon't do this:QuoteInstead, divide the opamp input down. And reduce your logic high cutoff point to suit.

author: bayjelly
author_rank: Regular Contributor
timestamp: July 13, 2017, 10:46:18 pm
content: This data sheet suggests that I really, really shouldn't drive the Zynq inputs to 5V:https://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdfWhat am I reading wrong?

author: bayjelly
author_rank: Regular Contributor
timestamp: July 13, 2017, 10:48:57 pm
content: Quote from: KL27x on July 13, 2017, 10:44:48 pmAs stated, I see this problem as a learning opportunity.QuotePart of my question was on how that relates to the signal's output impedance. I'm a beginner, I don't know how this works yet.

author: bayjelly
author_rank: Regular Contributor
timestamp: July 13, 2017, 10:51:55 pm
content: Quote from: Benta on July 13, 2017, 10:30:41 pmThat sounds reasonable. I assume it works because (on the Schottky to 3.3V side) as soon as the signal goes over 3.3V, the diode is biased so that it starts conducting towards the rail? I never thought about sinking currents on the positive rail, is there anything special to think about?

author: KL27x
author_rank: Super Contributor
timestamp: July 13, 2017, 10:57:28 pm
content: Effectively, it doesn't. The opamp/comparator circuit and its slew rate are what will add latency to your signal. There may be some bit of inductance in a resistor, but the slew rate, which means how fast the opamp can change its output voltage, that's going to be the main factor.

author: Benta
author_rank: Super Contributor
timestamp: July 13, 2017, 11:04:57 pm
content: Quote from: bayjelly on July 13, 2017, 10:51:55 pmNot really. The supply rail is stiff enough to absorb a little bit of signal power. This is the standard way of doing it, you'll see it everywhere.

author: KL27x
author_rank: Super Contributor
timestamp: July 13, 2017, 11:12:02 pm
content: I suggest the standard way of doing this is to convert the output of the mp3 into open drain output. Pullup to w/e voltage you want. There are thousand ways to skin a cat, but this is one that should automatically pop to mind in this case.

author: alm
author_rank: Super Contributor
timestamp: July 13, 2017, 11:59:02 pm
content: Quote from: Benta on July 13, 2017, 11:04:57 pmActually the impedance of a voltage regulator can be surprisingly high when it has to sink even a little bit of current. What saves you here is that the regulator likely still sees a net positive current draw because of the other devices drawing from the current from the same rail. If you just had an LDO with a diode sinking current into it, then I would expect to see the 3.3 V rail go up.