LTSpice doesn't seem to simulate when I use a current mirror??? - Page 1
Forum section: electronics / projects

author: ridgerunnersjw
author_rank: Contributor
timestamp: August 21, 2022, 06:04:37 pm
content: I have attached an ltspice simulation.....If I use the dc current source in spice library the simulator produces a Vout....If however I try to connect either of my current mirrors to it, it does not work....Can someone tell me what I am missing? All three sources produce about 2mA.Thanks

author: Ian.M
author_rank: Super Contributor
timestamp: August 21, 2022, 08:06:00 pm
content: What do you expect with 0V across the BJT current sinks? The long-tailed pair bases are DC grounded, and so are the current sink emitters, so they are *far* out of their compliance voltage range. Add up the Vbe drops (taken as 0.7V), the min. Vce drops (taken as 0.3V), and any IR drops to estimate the minimum compliance voltage.I've added a negative rail for the current sinks, and they now work as expected. I moved their Iset drive voltage down to Gnd to keep the same voltage across Rset as your version. I also added a bunch of .op data labels so you can see the DC operating point at a glance.I also had to add a very high value resistor across the current source so SPICE didn't error out due to the floating node when its not connected to 'tail'. You cant apply two different labels to the same net so 'DiffB2' on Q2 base was illegal (Gnd won the net), but you shouldn't *ever* do that as if one of the labels isn't Gnd, you don't know which label will 'win'.Also your long-tailed pair biassing sucked with the collectors 'squished' up against the supply rail. I've scaled the resistors (and load capacitor to preserve frequency response) to get their collector voltages midway between the rail and Gnd so it now amplifies without clipping. I also dropped the .tran run time an order of magnitude so the waveforms are clearer and more accurate - high zoom and LTspice's default waveform compression don't play well together. If you need very high zoom, you'll probably need to also do:Code:*** Handy .opt settings for accuracy at high zoom***.opt numdgt=12 ; double precision.opt nomarch ; no on-the-fly plot (for sim speed).opt plotwinsize=0 ; no waveform compressionHowever note that.opt plotwinsize=0can produce *VERY* *LARGE* .raw files so make sure you have enough disk space!

author: ridgerunnersjw
author_rank: Contributor
timestamp: August 21, 2022, 10:18:45 pm
content: Thanks for the response....I didn't say in the original post BUT I don't want to use a negative supply (single ended only). I want to bias the diff amp at 1/2 VCC....I am not sure the best way to do this in the simulator without stepping on the source.....I experimented with a DC source and some resistors to the bases but I could never get a good CM at 1/2 the VCC?

author: ridgerunnersjw
author_rank: Contributor
timestamp: August 21, 2022, 11:26:44 pm
content: Solved with single supply and common mode.

author: Ian.M
author_rank: Super Contributor
timestamp: August 21, 2022, 11:47:41 pm
content: Do show us your solved sim to close out the topic.Meanwhile, here's my version, assuming the signal source is a low impedance DC path to ground. I've fiddled with the emitter resistors to get the same AC gain (fractionally over 20dB) as your original sim.