Sample and hold (3 discrete samples)

JoeJester

Joined Apr 26, 2005
4,390
Here is a tina simulation of the circuit ....

VG1 is offset by 2.4V is a 1V pink noise audio file.

The free version of TINA is TINA-TI.
 

Attachments

Ron H

Joined Apr 14, 2005
7,063
Here is a tina simulation of the circuit ....

VG1 is offset by 2.4V is a 1V pink noise audio file.

The free version of TINA is TINA-TI.
You forgot to put a Track switch in series with R1. And why does the output go up rapidly in the beginning of the integration time?
 

JoeJester

Joined Apr 26, 2005
4,390
I think it's because of whatever offset that model has. When the OPAMP, non-specific model is used, it's typically the first OPAMP model made for spice. I know I can change models and get slightly different results.

I've read somewhere that "when you use an old sloppy model, expect sloppy results." Some models are only good for training purposes.
 

Thread Starter

Top-Dog

Joined Mar 1, 2013
36
I've been trying to prototype and debug the attached circuit for almost a week now and almost have it working. At the moment only the integrator is not working properly and the output voltage dips relatively quickly (a bit too quick) when the integrator does work. I haven't been able to find out why exactly why, but it appears that all the BJT's are switching and the 'track' and 'rst' signals are being timed properly. Basically, the integrator is not integrating/ignoring the sensor output. When I use the sensor the resting voltage out (from the sensor node) is 0.65v, but it rises to ~2.7v while the track signal is high and then returns to 0.65v. If I replace the sensor with a voltage supply there is no rise in voltage. The output of the integrator goes to 1.8v (regardless of input voltage) when using a voltage supply, but with the sensor it only reaches ~1.3v. Any thoughts on what might be going on, and how to buffer the output so it 'holds' the voltage longer?
 

Attachments

Ron H

Joined Apr 14, 2005
7,063
I've been trying to prototype and debug the attached circuit for almost a week now and almost have it working. At the moment only the integrator is not working properly and the output voltage dips relatively quickly (a bit too quick) when the integrator does work. I haven't been able to find out why exactly why, but it appears that all the BJT's are switching and the 'track' and 'rst' signals are being timed properly. Basically, the integrator is not integrating/ignoring the sensor output. When I use the sensor the resting voltage out (from the sensor node) is 0.65v, but it rises to ~2.7v while the track signal is high and then returns to 0.65v. If I replace the sensor with a voltage supply there is no rise in voltage. The output of the integrator goes to 1.8v (regardless of input voltage) when using a voltage supply, but with the sensor it only reaches ~1.3v. Any thoughts on what might be going on, and how to buffer the output so it 'holds' the voltage longer?
You have chosen a poor op amp for this application. It has high bias current and high offset voltage.

From post #29:
It will hold that voltage with very little change for a long time, assuming you choose a zero bias current (CMOS) input op amp, and a low-leakage, low dielectric absorption capacitor (polypropylene or polystyrene).
The MC33202 input bias current is 200nA max.

From post #36:
You should choose an op amp with low input offset voltage.
I suppose I should have qualified "low". I would shoot for <250uV. The MC33202 has 8mV maximum input offset voltage. I'm guessing you chose it for rail-to-rail output and the through-hole package. I can pretty much guarantee you that a rail-to-rail CMOS op amp with low offset voltage will only be available in a SMD package.:(

BJTs are a poor choice for an analog switch. The one connected to your sensor is dumping current into the sensor (through the forward-biased base-collector junction) when it is on, and your sensor apparently has high output impedance, so the voltage changes. From post #29:
You can use a 74HC or 74HCT4066 for the switches (4 per package).
If you need help developing Track and Reset signals for the 4066 switches, let us know, and post a timing diagram.

If you are set on using BJTs as the switches, buy a dual op amp and use the other section as a voltage follower at the input. You should add a resistor to ground at the input (3.3Meg would work), to prevent the input from floating when the sensor is not present. I would also add a resistor between that resistor and the op amp input, to protect it from ESD. 100k should be a good value.

If you need help developing Track and Reset signals for the 4066 switches, let us know.
 

Thread Starter

Top-Dog

Joined Mar 1, 2013
36
You can use a 74HC or 74HCT4066 for the switches (4 per package).
I can't get those parts for the project unfortunately - our store doesn't stock them. I'll try your suggestion regrading the op-amp. Is the attached picture right (only using 1 op-amp)? I might also be able to get a solid state relay, would that be suitable failing the op-amp idea?

The op-amp's that I have available are also pretty poor. An alternative could be the CA3140E or the TLO71 (V offset is too great). All the op-amps that are at the store (where we have to get the parts) all have offset voltages around the 2 - 5 mV range.
 

Attachments

Ron H

Joined Apr 14, 2005
7,063
Why are you limited to the local store? Why can't you use mail order? You can't make a silk purse out of a sow's ear.
 

Thread Starter

Top-Dog

Joined Mar 1, 2013
36
Why can't you use mail order?
Again, it's down to being limited by the specifications we were given for the project. I can't do anything about it except design around the problem. For any other project I would order parts, but for this project we are forced to only retrieve parts from the one local store.
 

Ron H

Joined Apr 14, 2005
7,063
I'm too lazy to reread the thread. Are you stuck with +7V for power? With no negative supply? Higher voltage, and ±supplies might make it easier.
Can you use potentiometers?
What is the output voltage range of your sensor?
 

Thread Starter

Top-Dog

Joined Mar 1, 2013
36
We have a +7v supply and a +5v supply to GND (0V). The sensor readings vary from 0.8v to 4.5v. I can potentiometers if needed.

Really, it seems that the problem is that that the one BJT that only connects the sensor for t seconds isn't switching properly. If we skip this transistor (the one that has VM3 across its base) then the integrator performs well enough to be useful, but then the integration time isn't fixed. So, is there a way to better handle that one BJT switch?
 
Last edited:
Top