sample and hold not holding

Discussion in 'The Projects Forum' started by cgama, Jan 23, 2012.

  1. cgama

    Thread Starter New Member

    Dec 23, 2011
    19
    0
    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!
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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.
     
  3. cgama

    Thread Starter New Member

    Dec 23, 2011
    19
    0
    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
     
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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
     
  5. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    We need to see a timing diagram with input signal, sampling signal, and output.
     
  6. cgama

    Thread Starter New Member

    Dec 23, 2011
    19
    0
    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
     
  7. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    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.
     
  8. cgama

    Thread Starter New Member

    Dec 23, 2011
    19
    0
    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
     
  9. cgama

    Thread Starter New Member

    Dec 23, 2011
    19
    0
    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
     
  10. PaulEE

    Member

    Dec 23, 2011
    423
    32
    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!
     
  11. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    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.
     
    PaulEE likes this.
Loading...