Accurate ±2.5V square wave from ±15V - Page 1
Forum section: electronics / beginners

author: bonzer
author_rank: Regular Contributor
timestamp: May 09, 2020, 08:20:13 am
content: Hello everyone. Please help me to understand how to properly generate from 15V alternating square wave a precise alternating 3.5V one using two references that I can use: TL431 that have 2.5V as voltage.EDIT-- unfortunately I can't delete the topic soI've just noticed that ON voltages of these two zeners (0.6V about) aren't fixed as reference voltages, they depend on diode. So I'm trying to figure out some sort of compensation to avoid this problem, I want the two voltages to be equal but opposed sign.

author: ogden
author_rank: Super Contributor
timestamp: May 09, 2020, 09:06:09 am
content: What is purpose of your circuit? It is homework, challenge or some circuit you are trying to build? Please do not call TL431 zener. It is blasphemy. Yet you are right that it has reverse protection diode inside. You need to implement adjustment circuit for both TL431, thim them at 2.9V - if diode forward drop indeed is 0.6V.

author: bonzer
author_rank: Regular Contributor
timestamp: May 09, 2020, 10:01:54 am
content: It is part of a homework project. The purpose of this part is to make the two voltages precise and chosen. For example if I want ±2.5V. I don't know if it is easily possible because I've just invented this task. The ±15V come from a comparator configured as schmitt trigger. But I use then the output as feedback so these voltages are gonna be thresholds, this is the reason why I want them to be chosen and precise.There's actually a way I've just found by trying but the problem is that I can't choose the voltages and I'm also affected by practical values of ON voltage which I don't know prior but I suppose they are close to 0.6V. I can make them symmetrical precise but I can't have other values of voltages, I'm kinda forced in this case.I still didn't try to adjust both diodes with their trimmers because I actually wanted to use only one trimmer, and the other exploit its natural 2.5V reference. Anyway I'm gonna try to do adjustment for them both now.

author: ogden
author_rank: Super Contributor
timestamp: May 09, 2020, 10:19:05 am
content: Each TL431 must be trimmed individually, trim circuit can't be combined. You must have 4 resistors and 2 trimposts. Check datasheet of TL431 - you will see typical circuits here.

author: Zero999
author_rank: Super Contributor
timestamp: May 09, 2020, 10:22:13 am
content: Over what frequency range?Do you want 2.5V or 3.5V?The problem is the diode has a negative temperature coefficient, so will drift.If the 15V square wave is already well-regulated, use a potential divider and unity gain buffer to get +/-3.5V.Otherwise, use one TL431 to power a Schmitt trigger off 7V, to convert the 15V to 0 to 7V and AC couple it to get +/-3.5V. This will only work if the square wave doesn't go down to a very low frequency, which would require a massive capacitor.

author: Yansi
author_rank: Super Contributor
timestamp: May 09, 2020, 10:34:31 am
content: Make a pair of precision sources of +2.5 and -2.5V sources, place an analog multiplexer behind them. (pair of JFET switches, 4066, 4053, 3157, ...) and add a buffer after it if necessary.

author: bonzer
author_rank: Regular Contributor
timestamp: May 09, 2020, 10:38:13 am
content: Actually it doesn't matter exactly what voltage. It would be good having 2.5V but it's not possible in this case because of ON voltage so I would accept greater voltages. For instance I did it here for 5V. Do you think it would work?Range of frequency 200Hz-20kHz.Solution proposed by yansi sounds good also.I've already done the AC coupling solution proposed by Zero999 in fact this is what I want to do but I was looking for an alternative just to have it there.EDIT--- the previous image was wrong it had +-6.4V at the output

author: Zero999
author_rank: Super Contributor
timestamp: May 09, 2020, 11:08:00 am
content: Quote from: bonzer on May 09, 2020, 10:38:13 amThe problem with that is you won't get below +/-3.1V.If you want something which can work down to DC, use CMOS logic gates run off +/-2.5V to make a Schmitt trigger.

author: ogden
author_rank: Super Contributor
timestamp: May 09, 2020, 11:57:56 am
content: Quote from: bonzer on May 09, 2020, 10:38:13 amThis circuit also do not folow requirement "Each TL431 must be trimmed individually, trim circuit can't be combined.". Each trimpot must be connected between anode and cathode of trimmed TL431.

author: ogden
author_rank: Super Contributor
timestamp: May 09, 2020, 12:00:47 pm
content: Quote from: Zero999 on May 09, 2020, 11:08:00 amWellll. That's rocket science. We talk about paper planes here.

author: bonzer
author_rank: Regular Contributor
timestamp: May 09, 2020, 01:36:34 pm
content: Is this in the image what you mean ogden? I was hurrying upAbout CMOS logic gates thanks for the idea Zero999, I didn't know they exist with dual voltage supply, are they accurate when giving those voltages? Because from what I remember they just have to keep values into their input ranges. But why did you put different resistances (39k and 100k) ? Maybe I didn't mention but I want my threshold voltages also to be ±2.5V so I would put those resistances equal, maybe both 39k.---EDIT----Maybe I got you, we need like 2/3 Vcc to make it switch so they can't be equal. Feedback one should be smaller. But I feel like these type of thresholds aren't precise.

author: ogden
author_rank: Super Contributor
timestamp: May 09, 2020, 01:46:52 pm
content: Yes, this is how it is supposed to be. Other solution could be opamp configured as unity gain buffer, powered from +/- 15V with resistive divider or even trimpot on input. Then you may trim any voltage swing you want, from +/- 0V up-to +/- 12V or so.

author: bonzer
author_rank: Regular Contributor
timestamp: May 09, 2020, 02:36:13 pm
content: Another solution I thought about is this:using a comparator that provides arbitrary emitter connection at the output transistor (LM311). As you see I connected it to -2.6... from the TL34 V or anyway something below -2.5V to be trimmered, this way I can eliminate undesired Vce of the output transistor. The other TL431 is at fixed 2.5V without trimmer. Vcc is ±15V.It feels like I'm going offtopic but after seeing you all active so I wanted to get to the original problem.So what I try to do is precise schmitt trigger comparison with ±2.5V thresholds, 200Hz-20kHz and I have ±15V power supply.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: May 09, 2020, 02:54:48 pm
content: Hi,Take a look at this:The advantage of this is that the Schottky diodes are inside the regulation loop of the TL431.You get this (in simulation):If you reduce the circuit to this:It doesn't work as well because the TL431s have to recover from being reverse biased.Regards,Jay_Diddy_B

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: May 09, 2020, 03:08:29 pm
content: Hi,If you power supplies and op-amps you can implement this:This is a generic positive and negative precision clamp.Regards,Jay_Diddy_B

author: bonzer
author_rank: Regular Contributor
timestamp: May 09, 2020, 03:25:35 pm
content: Thanks a lot! This is really interesting! I actually use some TL082 in my circuit, so I can use a TL084 chip to use more of them.What do you think about my comparator solution? I don't invert bias there

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: May 09, 2020, 03:44:34 pm
content: Hi,In your circuit, the top TL431 gets reversed biased when the LM311 output goes negative. The internal diode in the TL431 limits the negative voltage to one diode drop:Regards,Jay_Diddy_B

author: bonzer
author_rank: Regular Contributor
timestamp: May 09, 2020, 03:49:41 pm
content: Sorry I really didn't notice it! I did it yesterday and didn't check now I thought it wasn'tThanks a lot!What I've just done, I added a shottky this way. I didn't notice this effect described by you before but now I've just checked and it was there and so after adding a shottky this way, that delay disappeared (at least inside simulator).I would like to understand it better, let me know if I got it - the problem is that it takes a while to reverse bias for TL431 so when we add that shottky, we kinda isolate TL431 from reverse biasing, leaving it there (like floating).

author: Zero999
author_rank: Super Contributor
timestamp: May 09, 2020, 09:11:14 pm
content: Lots of convoluted solutions have been posted. A couple of BJTs will do. If RL is increased/removed, it will overshoot a bit. Reducing the resistor values will speed it up.+-15V to +-2V5.asc(1.39 kB - downloaded 243 times.)

author: ogden
author_rank: Super Contributor
timestamp: May 09, 2020, 10:48:13 pm
content: Quote from: Zero999 on May 09, 2020, 09:11:14 pmIncluding yours.QuoteRight. One of simplest solutions if you completely ignore two 2.5V supplies

author: bonzer
author_rank: Regular Contributor
timestamp: May 10, 2020, 01:04:10 am
content: Thank you very much, really interesting solutions!What I noticed is that BJTs (BC337 for example) are slow when have big amplitude square waves in base at higher frequencies, for example over 20kHz. That's why they need other things like capacitor parallel to base resistor. Obviously the delay is small compared to the whole period so it always depends on the application.

author: Zero999
author_rank: Super Contributor
timestamp: May 10, 2020, 09:49:21 am
content: Quote from: bonzer on May 09, 2020, 01:36:34 pmCMOS logic gates will happily work from a dual rail, as long as the total supply voltage is within the voltage rating, so for ±2.5V, you need a part rated for 5V, which isn't difficult, the 74HC04 will do. The second gate could be five in parallel for reduced output impedance or, if you want to save space, there are dual gate parts such as the 74HC2G04.I chose those values of R1 & R2 so the input voltage at the gate doesn't exceed the ±2.5V supply rails.Why are you worried about the threshold voltages? As long as the rise/fall times of the 15V waveform are fast, compared to the frequency, the threshold voltages are unimportant.

author: bonzer
author_rank: Regular Contributor
timestamp: May 10, 2020, 02:10:44 pm
content: Quote from: Zero999 on May 10, 2020, 09:49:21 amSorry I didn't talk about it but I actually want as input a triangular wave. This wave gets transformed in +-15V square wave at the output of the schmitt triggered comparator but I want my comparator to have ±2.5V of thresholds even though the output is +-15V. Triangular wave is slow at rise/fall times (especially at 20Hz).... Anyway I already have a lot of solutions here that can work for this.

author: bonzer
author_rank: Regular Contributor
timestamp: May 10, 2020, 03:56:25 pm
content: Last question: I use the solution of Jay_Diddy_B but modified in this way, so I would have ±2.5V. Do you think it would work? It works inside simulator.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: May 10, 2020, 05:15:18 pm
content: Hi,It is a pretty slow day so …I built the circuit.To get it to work I had add two resistors:The reason is that there are substrate diodes in the IC I these locations. These diodes are not included in the model:Test Resultsat 1kHzat 20kHzThe overshoot is described on the TL431 datasheet as:Performance matches the datasheetRegards,Jay_Diddy_B

author: bonzer
author_rank: Regular Contributor
timestamp: May 10, 2020, 06:50:27 pm
content: I tried previously to avoid current circulation through that substrate diode with a solution replacing resistors with some shottcky diodes but it's WRONG so I deleted the post, I didn't notice the values of voltage at the outputs. I hope nobody tried to figure out, it didn't give me the negative 2.5V but ground instead. Anyway if someone already watching tried is already writing anything I'm gonna put it here.Thank you very much for all your answers.

author: Zero999
author_rank: Super Contributor
timestamp: May 10, 2020, 09:51:27 pm
content: Quote from: bonzer on May 10, 2020, 02:10:44 pmThis isn't for your VCO circuit again is it? If so, you could have saved a lot of time, by sticking to the previous thread, rather than creating a new one.https://www.eevblog.com/forum/beginners/two-op-amp-vco/