sample and hold not holding

Thread Starter

cgama

Joined Dec 23, 2011
19
Hi everyone!
i'm having a bit of a problem with the LF398, it isn't holding the voltage as (i think) it should.

signal.jpg

when the same SH is applied to the other signal it works fine.
I'm using a capacitor of 100nF, my supply voltage to the SH is +-12V, and the clock is at 5V.
I've tried to increase the capacitor value up to 330nF, which helps but doesn't get rid of the problem.
any ideas on what could be happening?
thank you very much for all your help!
tc!
 

t06afre

Joined May 11, 2009
5,934
Schematics my friend. Posting such questions without schematics will not result in anything. Besides others asking for the schematics. So then posting in this forum. Please include ALL relevant information in the first posting.
 

Thread Starter

cgama

Joined Dec 23, 2011
19
Thank you for your reply. here goes a schematic of the LF398 from the datasheet:

lf398ds.png

a schematics of the connections I made:

lf398connect.png

and a full schematics of the circuit:

View attachment Schematic Prints2.pdf

LEDs are being driven by current sources and the light back to a photodetector is being convert to a voltage and amplified by a transimpedance amplifer. the output is being fed into the sample and hold circuit.
the 2 "humps" on the out signal represent 2 different LEDs that I'm trying to separate. But the sample and hold is giving me a weird signal out (posted previously).

Thank you for all your help and time.
tc
 

t06afre

Joined May 11, 2009
5,934
Can you take the sample and hold IC and test with with some well know signal in a breadboard. Like a 1 Hz sine wave. In sample mode the signal should be the same as the input. This way you can verify that your understanding of the circuit is correct. I did look at the your schematic. And the arrangement of S&H circuit looks corect.
A tip. It was very hard to find the source of the clk signals. If you use a port in Altium designer it is more easy for others to read your schematic. Se how it is done in this schematic
http://forum.allaboutcircuits.com/attachment.php?attachmentid=38381&d=1325525294
 

Thread Starter

cgama

Joined Dec 23, 2011
19
Hi
Thank you for your help!
Here are the signals.

pink: signal out of SH
dark blue: clock
light blue: signal into the SH, from photodetector

for the red LED (which seems fine):

SHred.jpg

and for the infrared LED (which is the problem):

SHir.jpg

It doesn't hold the value... it always has that drop. Any ideas? I've trying playing with the gains (because with same gain infrared has a stronger signal than red), changing the hold capacitor... nothing...:(

TC
 

Ron H

Joined Apr 14, 2005
7,063
How are you deriving your sample (clock) signal?
You need to make sure that it is a pulse that is well within the portion of the signal that you are sampling. This can require a delay to get the leading edge within the interval that you are sampling, and a monostable, or differentiator, to shorten the pulse so that it falls before the sampled signal does.
 

Thread Starter

cgama

Joined Dec 23, 2011
19
Hi
I had thought of that, but the other LED is working perfectly with the same conditions. I will try today to test that possibility.
In the meantime, any other ideas are welcomed.
Thank you!!
tc
 

Thread Starter

cgama

Joined Dec 23, 2011
19
Oh sorry, I've rewritten the reply and didnt answer your question.
I'm using an Atmel microcontroller. Both clocks have the same amplitude, duty cycle and frequency. They were programmed with a delay function, so there shouldn't be a difference between them.
The clocks are being used to lighten the LEDs and fed into the sample and hold circuit. Same configuration and characteristics for both LEDs.
tc
 

PaulEE

Joined Dec 23, 2011
474
cgama,

The second scope screenshot is on AC coupling (it looks like it is, anyway) because the edges are rounded on the falling edge of the scope trace for all signals. (or, you have extra capacitance somewhere that the first circuit doesn't have?)

Though I've not used sample/hold amps before, I would design the circuit such that the clock pulse is WITHIN the edges of the LED input pulse. If the clock pulse exceeds either boundary, you'll get mixed results because the sample/hold trigger will see a sliver of trace = 0v as well as most of a trace with the LED amplitude. Also, ensure that your pulse meets the minimum pulse-width duration so the cap. has time to charge up correctly.

One way to do this is to sense the rising edge of the LED pulse with an interrupt, wait a minute, and then trigger the sample/hold pin. Your circuit and parameters may or may not allow this, though..?

Introducing a blanking signal when the LED input signal is known to be zero might also be a good idea; at the very least, you'll know your sample/hold cap. starts from zero and not some random value; I don't think this is your issue though.

I'm interested to see how this turns out. Let us know!
 

Ron H

Joined Apr 14, 2005
7,063
Well, cgama, you've gotten the same advice from two people. I hope you try it. It should be simple if you have an available output pin on your Atmel.
 
Top