Maker Pro
Maker Pro

Temperature compensating a transistor?

fadGadget

Apr 12, 2014
8
Joined
Apr 12, 2014
Messages
8
Hello,
This is my 1:st post here :). Wondering if anyone knows how to temperature compensate a single transistor? I have this simple Schmitt trigger vco and control the frequency via the base on the bjt npn (see below). I get a nice waveform from it but the transistor is extremely temp sensitive, causing the frequency to wander way too easy. Any ideas on how to solve it?
Thanks for your help!

vco.PNG
 
Last edited:

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
I do not understand how the circuit works. At the least, I think the op-amp is upside down.
The transistor presumably passes current depending on the base voltage. I think you should feed the base with a current not a voltage.

The ICL8038 will do what you want.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Hello and welcome to Electronics Point :)

I also don't see how that circuit will work.

I think there's a resistor missing between the non-inverting input and the 0V rail.

What are the power supply rails? They should be shown on the diagram.

The transistor won't do what you expect if it's connected that way. The only path for current out of the capacitor is through the base-emitter junction in the reverse direction. In this situation, the junction behaves like a zener diode. This may be why you're seeing the variation with temperature.

What is your control voltage? Do you have a graph for the expected frequency vs. control voltage for this circuit?
 

fadGadget

Apr 12, 2014
8
Joined
Apr 12, 2014
Messages
8
Yes, you are absolutely right. :oops: Guess I rushed the schematic together, tried to simplify things too and it turned out a mess, sorry for that...
Here's a new one and this is really what's on my breadboard right now. One can run it on 9 -15 v with just a few adjustments.

vco.PNG
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
OK, you've fixed one problem, but not the other.

You also have not shown the power supply connections to the op-amp. These are important in determining whether the circuit will work.

As an aside, your arrangement to generate a half supply voltage on the 4.7 µF capacitor can be simplified and improved. Delete the 4.7 µF capacitor, replace the 10k resistor from pin 3 to the centre tap point with a short circuit, and change both of the remaining 10k resistors to 20k (or 22k). A voltage divider from VCC to 0V made from two 20k resistors is equivalent to an ideal half supply voltage point in series with a 10k resistor. See http://en.wikipedia.org/wiki/Thévenin's_theorem

As I understand it, that oscillator works by discharging the capacitor through the transistor at a constant rate, which is supposed to be determined by the control voltage.

As I said before, the transistor is being operated with reverse base-emitter bias and its behaviour is not well-defined. You will also find that the waveform on the capacitor doesn't look much like a sawtooth. In other words, that way of controlling the oscillator frequency is totally wrong.

You haven't specified how the control voltage is supposed to determine the oscillator frequency.

If you want a linear relationship between control voltage and capacitor discharge current, you can replace the transistor with a variable current sink using an NPN in common emitter configuration with a current sense resistor, with an op-amp. See https://commons.wikimedia.org/wiki/File:Current_sink.PNG
 

fadGadget

Apr 12, 2014
8
Joined
Apr 12, 2014
Messages
8
Hi, and thanks for your quick reply!
I run the opamps from +/- 9 volts and get a perfect falling ramp. Strangely, I can reverse the transistor and still get a good looking wave. The pot is used for controlling of the frequency. The problem as mentioned before is that the transistor is too temperature sensitive. I'll certainly test what you suggest and see if I can get a better linear behavior.
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Because the PSRR of the half supply circuit is only 6dB with two equal resistors I personally would keep the 4.7uF as this helps with PSRR.
Adam
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Because the PSRR of the half supply circuit is only 6dB with two equal resistors I personally would keep the 4.7uF as this helps with PSRR.
No, that's not a good idea. The impedance of that point will vary with the frequency of oscillation, so the high and low trigger voltages for the Schmitt will also vary. Another way to put it is that at lower frequencies, the current through the feedback resistor will pull the voltage at the top of the capacitor around. This will cause some nonlinearity in the frequency vs. current relationship.
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Sorry Kris I thought this was just a standard op-amp buffer splitting the supply. I should have looked a bit closer.
Adam
 

fadGadget

Apr 12, 2014
8
Joined
Apr 12, 2014
Messages
8
Fyi: I'm a noob in electronics so I won't argue against what you are saying here above, still, I've built oscillators before based on different chips like XR2206,2209 and ICL8038 and found they're really not that linear one might expect. This one covers 20Hz - 20Khz easily with a perfect shape all the way. The linear response seems to be within an acceptable range although it could obviously (always) be better. Replacing the caps with some lower values seems to help a lot. My only concern is the temp sensitivity but it might not be that easy to solve as I expected. Is there another way I could feed the CV into this setup without a transistor?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
This one covers 20Hz - 20Khz easily with a perfect shape all the way.
I'm really surprised to hear that. Can you clarify a few things for me?
1. What are the minimum and maximum control voltages at the transistor's base that produce that range?
2. Does a higher control voltage produce a higher frequency, or vice versa?
3. Is the schematic in post #4 an EXACT representation of your test circuit with no changes or simplifications?
4. Can you clarify the powering arrangement for the op-amps? You said you're running the op-amps from ±9V rails but the circuit as drawn won't work if that's true, because when the op-amp output goes negative, the non-inverting input would be pulled below ground.
5. What type of op-amp are you using in your test circuit?
6. What transistor are you using?
My only concern is the temp sensitivity but it might not be that easy to solve as I expected.
I might be able to suggest something, but I would have to first understand how the circuit is working at the moment! I suspect it may be operating the transistor as a "common emitter" circuit but with the collector and emitter swapped. Apparently transistors will amplify to some extent in this configuration; I've never tried it myself! But that could also explain why the ramp is linear, and probably the temperature sensitivity as well.
Is there another way I could feed the CV into this setup without a transistor?
Not that I can think of. You need a voltage-controlled current sink. These are usually implemented with transistors or FETs, using a current sense resistor and some kind of negative feedback.
 

fadGadget

Apr 12, 2014
8
Joined
Apr 12, 2014
Messages
8
Hi Kris,
1. Approx. 0.45 up to 2.45 V if I remember it correctly.
2. Yepp, higher voltage = higher frequency
3. No, got smaller caps on now, 33nF and 3.3uF.
4. Well, I run it directly from a bench DC power supply. I've tested with 12 and 15v too. Measurements done at 9 volts +/- .
5. Works with 4558, LM324 etc.
6. Any garden variety NPN will do; BC457, BC550, 2n3904 etc.

I don't have in front of me right now, but I'm pretty sure that's it. Extremely easy to hook up and that's the beauty of it I think :)
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
OK, thanks for answering those questions.

I can't suggest any way to improve the temperature sensitivity. The transistor is being used in a way it's not supposed to be used, and its gain will vary with temperature, as well as from one transistor to another.

If you change the circuit to use a controlled current, you will reduce the temperature sensitivity. Otherwise I don't think you'll get repeatable performance.
 

fadGadget

Apr 12, 2014
8
Joined
Apr 12, 2014
Messages
8
Well, I kind of suspected that, guess I'll be looking for a FET solution in that case. Thanks for taking your time anyway.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Please excuse me if I misinterpret the reason for that transistor.

Well, I kind of suspected that, guess I'll be looking for a FET solution in that case. Thanks for taking your time anyway.

Yeah, I've kept out of this up to now, but that looks like the sort of place I'd expect to see a jfet. Having said that, the jfet will likely exhibit a change in effective resistance with gate voltage, whereas a mosfet will exhibit a change in Id with gate voltage. Both are likely to be temperature dependant though.

Another option is to use a control device (doesn't matter what you choose really) with a series resistor and an op-amp to compare the voltage across that resistance with your input voltage. This would essentially place a variable current sink across the capacitor, with stability of the current determined mostly by the op-amp and the resistor. The temperature stability should be far better than a single transistor (of any type).
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Right Steve. I suggested that in post #5, last paragraph, although I suggested using a BJT. You could also use a Darlington, or a FET of one sort or another, for better accuracy. I think that's the best way to get a (roughly) linear voltage vs. 1/f response.

I did some simulations in LTSpice to see whether the original circuit with the reverse-connected transistor would work, and it did, over a small range anyway. I think the transistor must be operating in "common emitter" mode with the collector and emitter swapped. Base current (base-collector current, that is) was controlling the emitter current. I was a bit surprised that LTSpice's transistor model (I used a 2N3904) simulated that aspect of transistor behaviour! I've never investigated that ...er... "mode" of operation with real components.

I also learned something new about using op-amps as comparators. The differential input resistance is a real thing, and it causes real problems! The falling ramp on the cap has a very clear knee in it, if the discharge current is low (I temporarily used a 1M resistor) because the op-amp's inverting input draws over 100 µA (IIRC) when the differential input voltage is significant. And this is with several different Linear Technology op-amps, which are among the best op-amps available. One big reason to use a comparator instead of an op-amp in a circuit where a comparator is appropriate!
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
LOL Kris. I have said this all along on a few posts, don't interchange op-amps and comparators. But know one listened to me as usual :)
Having a closer look at the transistor I think it might be in common collector mode as this is the only terminal that is not the input or the output. The transistor is I think operating in what's called reverse active mode and will work ok but with reduced gain. I have not used this myself but have come across this sometime ago, I couldn't remember what it was called.
Adam
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Just interested Kris can I see your original circuit that was playing about?
Adam
 

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
Yes, you are absolutely right. :oops: Guess I rushed the schematic together, tried to simplify things too and it turned out a mess, sorry for that...
Here's a new one and this is really what's on my breadboard right now. One can run it on 9 -15 v with just a few adjustments.

View attachment 12396

You are running the worst possible configuration for a BJT. You have high base resistance and low emitter resistance. That shunts the thermal current generated in the collector into the base emitter junction where it gets "betatized" (read amplified) by the transistor. By making the base resistance as low as possible and adding a emitter resistance as high as possible, you will shunt more of the collector thermal current out to the base lead where it can't cause problems. A high emitter resistance will also minimize the effect caused by the change of voltage across the emitter base junction (Vbe) with temperature.

Ratch
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Just interested Kris can I see your original circuit that was playing about?
Sure. Here's a screen cap of the schematic and the simulation.

sim.gif

The green trace is the control voltage, which ramps from 0V to 9V. The blue trace is VC, the voltage at the top of C1.

There are several changes from the OP's circuit: R7 is needed because the comparator output pulls high only very weakly by itself. R6 is desirable so that when the inverting input reaches the low-voltage threshold, the output can pull high cleanly and flip the threshold voltage at the non-inverting input quickly, without the output being dragged down by C1 as it charges up. The circuit won't oscillate with a split supply; when the output goes low, the threshold voltage at the non-inverting input goes below 0V and the capacitor will never discharge below 0V. So I used a single supply. I used a 1 µF capacitor instead of 0.1 µF so that the frequency is visible on the graph.

As I said earlier, don't assume that a real-life circuit will behave exactly like this. Transistors aren't supposed to be used like this (with collector and emitter reversed) so I wouldn't necessarily expect the LTSpice transistor model to behave exactly like a real transistor in that situation.

Any comments, Ratch?
 
Top