Author Topic: Accurate ±2.5V square wave from ±15V  (Read 2018 times)

0 Members and 1 Guest are viewing this topic.

Offline bonzerTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: it
Accurate ±2.5V square wave from ±15V
« on: May 09, 2020, 08:20:13 am »
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 so

I'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.
« Last Edit: May 09, 2020, 08:40:42 am by bonzer »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Accurate ±2.5V square wave from ±15V
« Reply #1 on: May 09, 2020, 09:06:09 am »
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.
 
The following users thanked this post: bonzer

Offline bonzerTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: it
Re: Accurate ±2.5V square wave from ±15V
« Reply #2 on: May 09, 2020, 10:01:54 am »
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.
« Last Edit: May 09, 2020, 10:09:02 am by bonzer »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Accurate ±2.5V square wave from ±15V
« Reply #3 on: May 09, 2020, 10:19:05 am »
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.
 
The following users thanked this post: bonzer

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19537
  • Country: gb
  • 0999
Re: Accurate ±2.5V square wave from ±15V
« Reply #4 on: May 09, 2020, 10:22:13 am »
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.
 
The following users thanked this post: bonzer

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Accurate ±2.5V square wave from ±15V
« Reply #5 on: May 09, 2020, 10:34:31 am »
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.
 
The following users thanked this post: bonzer

Offline bonzerTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: it
Re: Accurate ±2.5V square wave from ±15V
« Reply #6 on: May 09, 2020, 10:38:13 am »
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
« Last Edit: May 09, 2020, 11:07:34 am by bonzer »
 
The following users thanked this post: WattsThat

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19537
  • Country: gb
  • 0999
Re: Accurate ±2.5V square wave from ±15V
« Reply #7 on: May 09, 2020, 11:08:00 am »
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.

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.
The 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.


 
The following users thanked this post: bonzer

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Accurate ±2.5V square wave from ±15V
« Reply #8 on: May 09, 2020, 11:57:56 am »
EDIT--- the previous image was wrong it had +-6.4V at the output
This 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.
 
The following users thanked this post: bonzer

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Accurate ±2.5V square wave from ±15V
« Reply #9 on: May 09, 2020, 12:00:47 pm »
If you want something which can work down to DC, use CMOS logic gates run off +/-2.5V to make a Schmitt trigger.
Wellll. That's rocket science. We talk about paper planes here.
 

Offline bonzerTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: it
Re: Accurate ±2.5V square wave from ±15V
« Reply #10 on: May 09, 2020, 01:36:34 pm »
Is this in the image what you mean ogden? I was hurrying up

About 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.
« Last Edit: May 09, 2020, 01:48:30 pm by bonzer »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Accurate ±2.5V square wave from ±15V
« Reply #11 on: May 09, 2020, 01:46:52 pm »
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.
 
The following users thanked this post: bonzer

Offline bonzerTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: it
Re: Accurate ±2.5V square wave from ±15V
« Reply #12 on: May 09, 2020, 02:36:13 pm »
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.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2734
  • Country: ca
Re: Accurate ±2.5V square wave from ±15V
« Reply #13 on: May 09, 2020, 02:54:48 pm »
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
 
The following users thanked this post: edavid, ogden, bonzer

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2734
  • Country: ca
Re: Accurate ±2.5V square wave from ±15V
« Reply #14 on: May 09, 2020, 03:08:29 pm »
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
 
The following users thanked this post: bonzer

Offline bonzerTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: it
Re: Accurate ±2.5V square wave from ±15V
« Reply #15 on: May 09, 2020, 03:25:35 pm »
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
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2734
  • Country: ca
Re: Accurate ±2.5V square wave from ±15V
« Reply #16 on: May 09, 2020, 03:44:34 pm »
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
 
The following users thanked this post: bonzer

Offline bonzerTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: it
Re: Accurate ±2.5V square wave from ±15V
« Reply #17 on: May 09, 2020, 03:49:41 pm »
Sorry I really didn't notice it! I did it yesterday and didn't check now I thought it wasn't
Thanks 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).


« Last Edit: May 09, 2020, 04:13:54 pm by bonzer »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19537
  • Country: gb
  • 0999
Re: Accurate ±2.5V square wave from ±15V
« Reply #18 on: May 09, 2020, 09:11:14 pm »
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 33 times.)
 
The following users thanked this post: bonzer

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Accurate ±2.5V square wave from ±15V
« Reply #19 on: May 09, 2020, 10:48:13 pm »
Lots of convoluted solutions have been posted.
Including yours.

Quote
A couple of BJTs will do.
Right. One of simplest solutions if you completely ignore two 2.5V supplies ;)
 
The following users thanked this post: bonzer

Offline bonzerTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: it
Re: Accurate ±2.5V square wave from ±15V
« Reply #20 on: May 10, 2020, 01:04:10 am »
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.
« Last Edit: May 10, 2020, 01:08:22 am by bonzer »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19537
  • Country: gb
  • 0999
Re: Accurate ±2.5V square wave from ±15V
« Reply #21 on: May 10, 2020, 09:49:21 am »
Is this in the image what you mean ogden? I was hurrying up

About 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.
CMOS 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.
 

Offline bonzerTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: it
Re: Accurate ±2.5V square wave from ±15V
« Reply #22 on: May 10, 2020, 02:10:44 pm »


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.

Sorry 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.
« Last Edit: May 10, 2020, 05:10:58 pm by bonzer »
 

Offline bonzerTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: it
Re: Accurate ±2.5V square wave from ±15V
« Reply #23 on: May 10, 2020, 03:56:25 pm »
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.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2734
  • Country: ca
Re: Accurate ±2.5V square wave from ±15V
« Reply #24 on: May 10, 2020, 05:15:18 pm »
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 Results



at 1kHz


at 20kHz



The overshoot is described on the TL431 datasheet as:



Performance matches the datasheet  :D

Regards,
Jay_Diddy_B



 
The following users thanked this post: bonzer

Offline bonzerTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: it
Re: Accurate ±2.5V square wave from ±15V
« Reply #25 on: May 10, 2020, 06:50:27 pm »
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.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19537
  • Country: gb
  • 0999
Re: Accurate ±2.5V square wave from ±15V
« Reply #26 on: May 10, 2020, 09:51:27 pm »


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.

Sorry 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.
This 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/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf