Hello,
I am currently using ltspice to try and build a sample and hold circuit. However, I have no idea how to start as I do not know whether I need to use the symbol from ltspice? when i do not use the symbol, they give me an error unknown subcircuit called in: xu1 etc etc. Can somebody help me? anw, is there a sample sample and hold circuit which i can refer to to design my sample and hold using ltspice?
Bipolar transistors cannot be used as a sample and hold switch because of their Vcesat and their base current. You can use J-Fets and MosFets without a body diode. Fets with a body diode are tricky to use; you need two in-series connected Drain-to-Drain or Source-to-Source.
The opamp should be wired as a voltage follower. Since the input swings positive and negative, the opamp must run on split power supplies, like +10V and -10V. A voltage follower's input is the non-inverting input. The output pin is tied to the inverting input.
What's driving A1?
U1 is a mess. You have connected Vout to the supply of the op-amp U1 which doesn't have any supply. Look up voltage followers. God only knows what the output looks like with +in grounded.