Symmetrical triangle wave using BJT's? or?

crutschow

Joined Mar 14, 2008
34,417
The high output voltage of LM324 is marginal for delivering a logic 1 to CD4000 logic when Vcc=5V.
Possibly. I believe the unloaded high output voltage is about 1.5V below Vcc which would make it 3.5V, right at the CD4000 limit. If that's a problem or you want to provide margin, you can add a pull-up resistor at each output, which would raise the high output to 5V.
 

Thread Starter

keithostertag

Joined Oct 4, 2012
55
Thanks Ron, when I get some parts I will try that one too.

One additonal question: even though according to the scope trace the curve touches the zero reference line, using your discrete circuit the actual meter needle does not go all the way to zero. There seems to be a few microamps above zero still. What would I adjust to tweak that? I have tried this on two different meters, the problem is not a mechanical zero problem with the meters. Would this be due to some difference in transistors?

Thanks,
Keith Ostertag
 

Ron H

Joined Apr 14, 2005
7,063
Thanks Ron, when I get some parts I will try that one too.

One additonal question: even though according to the scope trace the curve touches the zero reference line, using your discrete circuit the actual meter needle does not go all the way to zero. There seems to be a few microamps above zero still. What would I adjust to tweak that? I have tried this on two different meters, the problem is not a mechanical zero problem with the meters. Would this be due to some difference in transistors?

Thanks,
Keith Ostertag
What is the full scale current of your meter movement? Also, how much is "a few microamps"? I can show you how to tweak the circuit, possibly by adding a pot and a resistor, but my impression was that this project is more art than science. This circuit is not a precision circuit. If you want precision, we can use dual supplies and op amps, and get pretty darned precise on the zero end.
 

Thread Starter

keithostertag

Joined Oct 4, 2012
55
Hi Ron- it's a 50uA scale, by a few uA I mean, say, two or three, I didn't measure it.

I'm not going for precision in this case, I'm just going by the visual look of it. While watching the needle move back and forth it is noticeable that the needle doesn't go all the back to zero, whereas I can adjust the full-scale movement quite a bit by choosing the value or R10.

It will be a week or so before I get some opamps ordered and delivered, I just thought in the meantime I'd see if there were a way to adjust this circuit's zero placement.

For this particular project, dual supplies is not good. I'm using existing commercial VOM meters, and they have very little physical space to work with. In fact, this Triplett meter only has the space for the small 15V battery that it was designed to use, other than a small circuit board.

Thanks,
Keith Ostertag
 

Ron H

Joined Apr 14, 2005
7,063
Before I dig into this: Ar you connecting the meter's negative terminal to ground, and the positive terminal through a resistor to the emitter of Q4?
 

Thread Starter

keithostertag

Joined Oct 4, 2012
55
Hi Ron-

Yes. "the meter's negative terminal to ground, and the positive terminal through a resistor to the emitter of Q4".

I am using 2N2907's for the PNP's, and choosing various values for C1 and R10 (pot). For R3 I'm using a 15K- just out of junkbox convenience. Other than that the circuit is as you designed it. So far, depending on which values I use for C1 and R10 (for different meters or different periods) R10 is around 100K, C1 is between 10uF and 200uF.

Thanks,
Keith Ostertag
 

Ron H

Joined Apr 14, 2005
7,063
The main culprits are Q8 base current, and the fact that Q1 and Q2 are not matched.
The Q8 base current can be almost eliminated by making it a Darlington, but you might not need to do that.
Depending on how much the offset is, you might be able to solve the problem by increasing the value of R9. In my simulation, 12k was the magic value. If you make it to high, the circuit won't oscillate.
The sure fix is a pot (10k - 100k) from vcc to vee, with a 1Meg resistor from the pot wiper to the base of Q2.
 

Thread Starter

keithostertag

Joined Oct 4, 2012
55
Hi Ron- thanks for continuing your help. I tried adjusting R9- at about 16K it stop oscillating, but didn't afffect the output current (meter needle) at all.

Taking your hint about matching Q1 & Q2, I tried different combinations of transistors. Using my DMM diode check, I measured Vbe of both, using two exactly the same (about .690). No change. I then tried finding two with a wide difference- I didn't have many, so I tried a couple of 2N2222's I have that had about .1V difference (.750 - .650) That actually seems better!

I am not interested in the "sure fix" method. I think that's enough playing with this circuit.

Next week or so when I get some parts I will try your other circuit, the "triangle gen with op amps". I have a question about that circuit: What is the advantage of using Q1 (2N3904) over merely using a 5V (or 5.1V) zener and R5?

Thanks,
Keith Ostertag
 

Ron H

Joined Apr 14, 2005
7,063
Hi Ron- thanks for continuing your help. I tried adjusting R9- at about 16K it stop oscillating, but didn't afffect the output current (meter needle) at all.

Taking your hint about matching Q1 & Q2, I tried different combinations of transistors. Using my DMM diode check, I measured Vbe of both, using two exactly the same (about .690). No change. I then tried finding two with a wide difference- I didn't have many, so I tried a couple of 2N2222's I have that had about .1V difference (.750 - .650) That actually seems better!

I am not interested in the "sure fix" method. I think that's enough playing with this circuit.

Next week or so when I get some parts I will try your other circuit, the "triangle gen with op amps". I have a question about that circuit: What is the advantage of using Q1 (2N3904) over merely using a 5V (or 5.1V) zener and R5?

Thanks,
Keith Ostertag
I think you have an error somewhere. I suspect a transistor with emitter and collector swapped (Check Q8. Collector goes to ground.) or a wrong resistor value somewhere, but troubleshooting by forum is difficult...

I ran a simulation on the regulator in the other circuit. Get rid of the transistor and change the zener to 5.1V. The current savings when using the transistor is not worth it.

Note: Be aware that, in the new circuit, the triangle will NOT go to ground. As I said, this is difficult with a single supply.
 

Thread Starter

keithostertag

Joined Oct 4, 2012
55
Hey Ron- I am just now getting around to investigating simulation and PCB software. Which software package did you use to generate your .asc files for this thread? Are they netlist files, or what exactly? Everyone has their preferences, but I'd like to learn to use the gEDA programs- can I use your .asc files with gschem and PCB?

Thanks,
Keith Ostertag
 

Ron H

Joined Apr 14, 2005
7,063
Hey Ron- I am just now getting around to investigating simulation and PCB software. Which software package did you use to generate your .asc files for this thread? Are they netlist files, or what exactly? Everyone has their preferences, but I'd like to learn to use the gEDA programs- can I use your .asc files with gschem and PCB?

Thanks,
Keith Ostertag
I used LTspiceIV from Linear Technology. It's free and powerful. Unlike the demo or student versions of some commercial spice packages, it is uncastrated.
The .asc file is generated by LTspice each time a schematic is saved. AFAIK, it will not run on any other simulator.
 

Thread Starter

keithostertag

Joined Oct 4, 2012
55
Ok, thanks Ron. Yea, LTSpice is very well respected and I will probably use that as well. Which program do you use that uses the LTSpice schematic files for pcb layout and fabrication?

Keith Ostertag
 

Ron H

Joined Apr 14, 2005
7,063
Ok, thanks Ron. Yea, LTSpice is very well respected and I will probably use that as well. Which program do you use that uses the LTSpice schematic files for pcb layout and fabrication?

Keith Ostertag
I don't make PC boards. Maybe other members can give you some suggestions.
 

Thread Starter

keithostertag

Joined Oct 4, 2012
55
Yes, I am still working on this project. (sigh)

Due to space restrictions, I can only use either one 9v battery or two AA's. The triangle circuits Ron showed me work fine, but for this particular project I need to shift the triangle wave slightly negative, maybe 50-100mV.

I thought maybe I could do that with a clamper circuit, but it appears the lowest shift a clamper circuit can make is the forward voltage of the diode used, which is too much.

So, Ron (or someone else?) could you show me a way to take one of the triangle generator circuits (using an opamp) and shift it in an adjustable way very slightly negative? Or, maybe a different circuit?

Ron had said I would need dual supplies in order to do that. Could I use a 9v battery with a TLE2426 rail splitter to get +-4.5 volts?

Currently I am working with a TLV274 quad op amp, which can work with a supply as low as 2.2v. I thought maybe the batteries would last longer if I used a micropower op amp with two AA's. I am limited to through-hole components.

Keith
 

Ron H

Joined Apr 14, 2005
7,063
Yes, I am still working on this project. (sigh)

Due to space restrictions, I can only use either one 9v battery or two AA's. The triangle circuits Ron showed me work fine, but for this particular project I need to shift the triangle wave slightly negative, maybe 50-100mV.

I thought maybe I could do that with a clamper circuit, but it appears the lowest shift a clamper circuit can make is the forward voltage of the diode used, which is too much.

So, Ron (or someone else?) could you show me a way to take one of the triangle generator circuits (using an opamp) and shift it in an adjustable way very slightly negative? Or, maybe a different circuit?

Ron had said I would need dual supplies in order to do that. Could I use a 9v battery with a TLE2426 rail splitter to get +-4.5 volts?

Currently I am working with a TLV274 quad op amp, which can work with a supply as low as 2.2v. I thought maybe the batteries would last longer if I used a micropower op amp with two AA's. I am limited to through-hole components.

Keith
Post the schematic that you are using.
 

Thread Starter

keithostertag

Joined Oct 4, 2012
55
Hi Ron-

Thanks. Here is the current schematic. The entire left side is from the circuit you gave me early on minus one resistor (R9 49K).

With this circuit I can swing the waveform positive, but still not negative.

This is the first time I have ever used a schematic program (gschem), took me all afternoon to figure it out. So I hope there are no mistakes.

Keith
 

Attachments

Ron H

Joined Apr 14, 2005
7,063
Hi Ron-

Thanks. Here is the current schematic. The entire left side is from the circuit you gave me early on minus one resistor (R9 49K).

With this circuit I can swing the waveform positive, but still not negative.

This is the first time I have ever used a schematic program (gschem), took me all afternoon to figure it out. So I hope there are no mistakes.

Keith
A circuit like this is limited by the power supply voltages. An op amp output cannot swing past the rail voltages (0V and +3V, in this case). If you want to add a negative supply, or use the center tap of your batteries as GND, then I can show you how to do it. Just remember that your supplies will now be ±1.5V, so the positive limit will be 1.5V instead of 3V.
 

Thread Starter

keithostertag

Joined Oct 4, 2012
55
OK, please do show me how to use the center tap of the batteries. I forgot to show the load- the output needs to drive a d'Arsonval movement, about 50uA, fed through a pot adjusted for full-scale deflection. So the current delivered is what's important, not the absolute value of the voltage. Hope that makes sense.

Thanks,
Keith
 

Ron H

Joined Apr 14, 2005
7,063
OK, please do show me how to use the center tap of the batteries. I forgot to show the load- the output needs to drive a d'Arsonval movement, about 50uA, fed through a pot adjusted for full-scale deflection. So the current delivered is what's important, not the absolute value of the voltage. Hope that makes sense.

Thanks,
Keith
Do you know the resistance of the meter movement?
 

Thread Starter

keithostertag

Joined Oct 4, 2012
55
Sorry, I haven't measured it yet and won't be able to get to it tonight. I can say that with the circuit I gave you the current output was barely adequate- pot turned almost all the way to short (which surprised me). I will measure tommorrow and get back with you then. Thanks for your help.

Keith
 
Top