Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Sample & Hold in SPICE not holding charge using real elements

  1. Oct 1, 2013 #1
    Hi guys,

    I'm having problem in HSPICE. I designed a Sample & Hold circuit using MOSFET switches (transmission gate). The problem is that when I activate the MOSFET switches, the capacitor doesn't hold the charge as expected (I did the simulation using ideal components, and the charge holds just fine).

    I'm using PTM 130nm transistor models.

    The simulation results are:
    Ideal switches:
    http://imageshack.us/photo/my-images/834/38cg.png/

    MOS switches:

    http://imageshack.us/photo/my-images/407/m385.png/

    A drew the schematic to help the understanding of the circuit, and attached the spice file in this post.
    http://imageshack.us/photo/my-images/801/uyg6.png/

    Did anyone here have a problem like this one? My main purpose is to design a data converter, but I won't get the correct answer if I lose 300mV in this process.
    What do you guys think?

    Thank you in advance.
     

    Attached Files:

    • sh.txt
      sh.txt
      File size:
      1 KB
      Views:
      83
  2. jcsd
  3. Oct 1, 2013 #2

    UltrafastPED

    User Avatar
    Science Advisor
    Gold Member

  4. Oct 1, 2013 #3

    analogdesign

    User Avatar
    Science Advisor

    Why are you sampling in series? In a data converter the sampling capacitor is typically shunt relative to the input source. Look at the first slide in the pdf file UltrafastPED put up.
     
  5. Oct 1, 2013 #4
    That's because I'm planning to design a charge redistribution ADC, like SAR for example.
     
  6. Oct 1, 2013 #5

    analogdesign

    User Avatar
    Science Advisor

    OK. It could be lots of stuff. 12.8 pF is a pretty beefy sampling cap so you'll need a big switch to drive it. How did you dimension your sampling switch? What order are you activating the switches. As UltrafastPFD said, what are your time constants? Have you tried running really slow?

    You could be getting charge injection because when you turn off the sampling switch you have a capacitive voltage divider.
     
  7. Oct 1, 2013 #6
    The same effect happens if a replace the 12.8pF to 12.8nF or to 12.8fF. What dimensions do you recommend? I'm using the NMOS W/L ratio as 10/1 and PMOS 20/1, both using the minimum channel length.
     
  8. Oct 1, 2013 #7

    analogdesign

    User Avatar
    Science Advisor

    Could you post a simulation of all your signals, including clock signals for the NMOS and PMOS switches?
     
  9. Oct 1, 2013 #8
    Of course:

    http://img842.imageshack.us/img842/6696/477m.png [Broken]
     
    Last edited by a moderator: May 6, 2017
  10. Oct 1, 2013 #9

    analogdesign

    User Avatar
    Science Advisor

    Thanks. I can't really understand which signals are which, but it bugs me that the voltage across the capacitor doesn't track the input. When the top plate of the capacitor is connected to the signal, the bottom plate should be grounded. You must have a misconnection if that is what you are trying to do.
     
  11. Oct 1, 2013 #10
    It's really easy to understand. I attached the spice file on the first post.
    s7 and sa are the control signals for the nmos from the first two TG, s7n and san are the control signals for the pmos. sb is the control signal for the TG from the lower plate of the capacitor.
    I use the model from: http://ptm.asu.edu/modelcard/130nm_bulk.txt (just renamed it)
    Thank you.
     
  12. Oct 1, 2013 #11

    analogdesign

    User Avatar
    Science Advisor

    Hey Lanot,

    I think I figured out your issue. I hadn't looked at the SPICE deck prior. You're referring the sampled signal to ground when you should refer it to the reference voltage. The voltage at the bottom plate of the capacitor during hold mode is V(pre) - V(in). In your schematic you precharge that node to ground, so the desired output voltage is -vin. Your switch models are probably not operating correctly if you are trying to have a node at -1 volt!

    What you can do is sample with respect to the reference. So charge the bottom plate of the cap to Vref=1.2V. In that case, you will have the output voltage is Vref-Vin = 1.2-1 = 0.2 which is in range.

    I think the confusion is between true ground and small signal ground.

    Good luck!
     
  13. Oct 2, 2013 #12
    Sorry, I don't think I understand completely your answer yet. I tested the switches, and I think they are correct, it charges and discharges a capacitor just fine. I think that charging the bottom plate with an additional source isn't a good idea, since I will need that value from Vin to perform a charge redistribution with the additional capacitors later.
     
  14. Oct 2, 2013 #13

    analogdesign

    User Avatar
    Science Advisor

    Lanot,

    The issue is your signal is below ground, and since you have 1.2 and 0 volt supplies that's not going to work. The signal is defined as the voltage across the cap. If you refer it to Vref then it moves in the right direction.

    How is your comparator going to work if the input signal is below ground?
     
  15. Oct 2, 2013 #14
    I need this voltage to be negative to add it to the voltage across the equivalent capacitance on the next step of conversion (redistribution), like the way it's described in this document: http://www.ti.com/lit/an/slyt176/slyt176.pdf
     
  16. Oct 2, 2013 #15

    analogdesign

    User Avatar
    Science Advisor

    You need it to be negative compared to the small-signal ground, but you have it negative compared to true ground. If you want to set up your SAR like this you will have to run it off split rails. (positive and negative supplies).
     
  17. Oct 3, 2013 #16
    Hi analogdesign,
    Thank you for your help.
    I've designed a circuit with a differential input, but the positive output still give me the same error. The negative output is fine though. (look at the picture attached)

    I've tried using an NMOS switch too, but it doesn't give me better results.

    What do you think?
     

    Attached Files:

  18. Oct 3, 2013 #17

    analogdesign

    User Avatar
    Science Advisor

    Can you post a detailed schematic for me? I'll have a look.
     
  19. Oct 3, 2013 #18
  20. Oct 3, 2013 #19

    analogdesign

    User Avatar
    Science Advisor

    Hi Lanot,

    The spice deck is for a single-ended version of your circuit. I suspect you are making a conceptual error with differential signal processing and I wanted to see the schematic to confirm.

    The structure in slide 3 of that file is totally standard for bottom-plate sampling. I use it myself in every sampling circuit I design. Here is what I think you are doing wrong:

    In a differential system, obviously the variable of interest is the difference between the two outputs (e.g, vod = vop - von).

    In your simulation, comp_inn is going negative relative to ground. This a no-no. Both signals must remain between the rails (unless you REALLY know what you're doing.

    So, set your common-mode somewhere like mid scale. Then the positive input is higher than that, and the negative input is nominally lower. The differential input can be bipolar (positive or negative).

    For example. Your VDD=1.2V. So, set Vcm = 0.6 V. If you want a 1Vpp-diff signal, let vip range from 0.6V up to 0.85V or down to 0.35 V. Let vin range from 0.6 V down to 0.35 V and up to 0. 85 V. So, you will constrain both comp_in and comp_inn to between 0.85 V and 0.35 V. The signal will be between (0.85 - 0.35) and (0.35 - 0.85) or 0.5 - (-0.5) = 1 V. So you'll have 1 V differential swing.

    Bottom line, keep all your signals between the rails. You're almost there. While I can't see the actual circuit you're simulating I think the issue is with your input range, not your circuit.
     
  21. Oct 4, 2013 #20
    Hi,

    I'm actually not familiar with differential designs.

    I added a dc source before ground, and got the results attached. Is that correct?

    I'm worried that the charge redistribution scheme won't work with these output levels, though.
     

    Attached Files:

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Sample & Hold in SPICE not holding charge using real elements
Loading...