1
\$\begingroup\$

I'm new to simulating circuits in spice (in this case, in the ngspice implementation in KiCad's nightly builds) and trying to build a simple Colpitts oscillator:

Colpitts in KiCad

I'd simply like to "power" the thing using V1 and get a plot over time of the voltage at Vout -- seems like this should be pretty simple, but I can't seem to get it to work.

First of all, what type of analysis should I use? I had assumed an AC analysis but maybe I'm wrong. I've been using 1,000,000 points between 750Hz and 1250Hz (the given cap and inductor values should produce a frequency of 1MHz.) Trying to probe Vout, the simulator tells me "Error: vector frequency not found!"

Second, no matter the analysis I run I get a message, "Warning: singular matrix: check nodes net-_c2-pad2_ and net-_c2-pad2_". As far as I can tell C2 is connected correctly and it certainly isn't connected to itself. I suspect this is some quirk of how spice reports errors but searching the web has got me nowhere.

Can someone provide a hint?

\$\endgroup\$
  • 1
    \$\begingroup\$ Do a transient analysis and make sure you wait enough time to allow the oscillator to begin producing a waveform. Try putting a 1 Meg bleed resistor across C2. \$\endgroup\$ – Andy aka Jul 22 '18 at 17:45
  • \$\begingroup\$ Andy is putting his finger on it. You have a node where three capacitors "arrive." But there is NO galvanic path to that node. That's not good. Without even looking at your circuit for function (I don't care right now), I'd snap a \$10\:\text{M}\Omega\$ from that node to ground. Just to provide some galvanic path. \$\endgroup\$ – jonk Jul 22 '18 at 18:25
  • \$\begingroup\$ Well, this is why I like StackExchange :) Thanks for the hint. I'll do some research (these are new ideas to me -- I'm new to this) and will comment here when I figure it out. \$\endgroup\$ – joemadeus Jul 22 '18 at 18:54
  • \$\begingroup\$ By the way, to have this oscillator be accurate and low jitter when built, you need a quality VDD bypass capacitor from VDD to bottom of the 1UF on the base. \$\endgroup\$ – analogsystemsrf Jul 22 '18 at 22:24
  • \$\begingroup\$ @Andyaka If you'd like to take your comments and add them as a solution I'd be happy to accept that as the answer. \$\endgroup\$ – joemadeus Jul 22 '18 at 22:30
2
\$\begingroup\$

If you'd like to take your comments and add them as a solution I'd be happy to accept that as the answer.

Run a transient analysis but make sure you run it for long enough time to allow the oscillator to properly start. As for the error message try putting a 1 Mohm resistor across C2 so that the simulator doesn’t get into a muddle trying to resolve DC conditions.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.