Triangle wave generator with flipflop

Thread Starter

hrs

Joined Jun 13, 2014
414
Hi,

I'm trying to emulate the block diagram of the ICL8038 and can't figure out what the latch or flipflop should look like.

Two current sources charge and discharge a capacitor. The output of the flipflop should turn on and of the lower of the two current sources (Q3, Q4, R5). This is what I think needs to happen at the output:
Code:
Comp U1     Comp U2   ->  Output
  0           0             1
  0           1             does not occur
  1           0             do not change output
  1           1             0
How do I get that output for the given input?
 

Attachments

crutschow

Joined Mar 14, 2008
34,833
That circuit is way to complex.
All the transistor circuitry on the left is not needed, since it just part of the comparator circuit (see functional diagram below).
All you need are the comparators and a few resistors to establish their trip points with just one latch (flip-flop).

A simple constant-current source can be provided by current mirrors, one NPN pair for discharge, and one PNP pair for charge.

This all could be done very simply with one 555 timer configured as an astable oscillator with the two current mirrors to charge and discharge the timing capacitor.

1714222326844.png
 
Last edited:

Thread Starter

hrs

Joined Jun 13, 2014
414
That circuit is way to complex.
All the transistor circuitry on the left is not needed, since it just part of the comparator circuit (see functional diagram below). All you need are the comparators and a few resistors to establish their trip points with just one latch (flip-flop).
I don't understand. How are they part of the comparator circuit?

Transistors Q1 through Q4 are current sources producing currents I and 2I respectively. That is 4 transistors, like the current mirror that you propose. Q5 switches the bottom current source off.

I don't want to use a 555. I did look at the 555 block diagram though and there it shows an SR-latch. That does not work in my circuit somehow. What I forgot to mention is that V2 is just a placeholder where the latch output should go.
 

Attachments

LowQCab

Joined Nov 6, 2012
4,290
Please state exactly what You want to accomplish, the overall big project picture,
rather than presenting your questionable solution as the problem.
This is a constant and routine problem in these Forums.

Why do You need a Triangle-Wave ?, what is it's purpose ?
Does it have to be precise in any way ?
Will it be used for a PWM-Circuit ?
.
.
.
 

crutschow

Joined Mar 14, 2008
34,833
I don't want to use a 555.
Why?
I did look at the 555 block diagram though and there it shows an SR-latch. That does not work in my circuit somehow.
A SR-Latch with level triggered inputs (thus requiring no comparators) is what you want.
The TRIG sets the latch (DIS open and capacitor charging) at below 1/3 Vcc, and THRS resets the latch (DIS closed to ground and capacitor discharging) when above 2/3 Vcc.

LTspice sim of an example triangle wave generator below, using a 555 and two complementary current-mirrors:

The DIS terminal shunts the top current-mirror current to ground when the high THRS voltage is exceeded, allowing the bottom-current mirror to discharge the capacitor.
The top mirror generates twice the current of the bottom mirror, allowing the capacitor to charge when the DIS terminal is open.

You could use a more complex circuit with other parts, but I like to follow the KISS motto.

1714233882307.png
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,403
To use your post #1 circuit get rid of U4. Use U1 to drive the Preset input of U3. Use U2 to drive the Clear input of U3. The U3 Qbar output drives R10.

Edit: You would also need to swap the inputs to U1.
 
Last edited:

Thread Starter

hrs

Joined Jun 13, 2014
414
Please state exactly what You want to accomplish, the overall big project picture,
I make no secrets about this. As stated in the first sentence of the first post, I want to emulate the block diagram of the ICL8038.
Re: no 555
Why?
Because then I might as well use the ICL8038. All a 555 would do is bring out the current sources and then I cannot, for example, play with the resistors that set the trigger levels.

A SR-Latch with level triggered inputs (thus requiring no comparators) is what you want.
Presumably you mean external comparators, as I see it you still need comparators but now they are internal to the 555.

LTspice sim of an example triangle wave generator below, using a 555 and two complementary current-mirrors:
Thanks for this. I had trouble imagining what that current mirror would look like. I appreciate the KISS moto, but I want to play with the internals and maybe learn something.

To use your post #1 circuit get rid of U4. Use U1 to drive the Preset input of U3. Use U2 to drive the Clear input of U3. The U3 Qbar output drives R10.

Edit: You would also need to swap the inputs to U1.
Thanks for this hint, Alec. Looking more closely at the 555 block diagram it also has the inputs swapped on one of the comparators, which I missed. I can't get it to work right now but I think I can noodle it out from here.
 

Alec_t

Joined Sep 17, 2013
14,403
Here's a simplified version demonstrating the charge-discharge principle :
1714321525981.png
RA and RB affect the duty cycle and, with Cext, set the frequency.
BTW, you are aware that ICL8038 IC is obsolete?
1714321070973.png
 

Attachments

Last edited:

Thread Starter

hrs

Joined Jun 13, 2014
414
That's a nice current mirror. No need for diodes to switch it off.
BTW, you are aware that ICL8038 IC is obsolete?
I'm aware of this. In the past I made some triangles with an opamp and a comparator. Now I wanted to figure out how to do it with current sources like the ICL8038. And I got it to work by doing what you said in post #6.
 

eetech00

Joined Jun 8, 2013
4,038
Here's a way using Behavioral devices:

I've left in C2, but with this method it is not needed.
Also, a "B" device could be substituted for G1.
1714347388561.png
 
Last edited:

crutschow

Joined Mar 14, 2008
34,833
Presumably you mean external comparators, as I see it you still need comparators but now they are internal to the 555.
The 555 does not have separate comparators as such.
They just configured the latch set and reset inputs to have different logic-level and polarity trip points.
If you could do that with a standard latch, you wouldn't need any comparators.
 
Last edited:

Thread Starter

hrs

Joined Jun 13, 2014
414
Can someone help me understand how the current sources work and specifically the voltage control? And can we make a simpler voltage controlled current source from the one in post #5 or post #8? The ICL8038 can vary duty cycle, but if symmetric is simpler I prefer that.
 

Attachments

Top