I cannot answer your question…I have been using LTSpice but I am no expert with it. However a couple of years ago I made a similar oscillator on a test board using a (I think it was a SN74LVC1G14) schmitt inverter. It ran OK except that it was drawing 15 or 20 mA of current. At 5V that approaches 100 mW which is sort of high. I think that the oscillator keeps the input in a mid voltage crossover region, and the input transistors draw relatively high current in that condition.
My take on that is that it is OK for experimentation, but it might not be a good design to use in a product.
Also the frequency of this oscillator will not be so accurate because the hysteresis is not precise.
Based on your 100 nF timing capacitor, I think you might be better off to use a voltage comparator (such as something from this list) instead:
@holger Well that is embarrassing. You are most certainly correct and oddly my install of kiCAD () seems to only have the 0V reference symbol in the simulation_SPICE symbol library.
I’ve tried copying the Simulation_SPICE.kicad_symbol (223.1kB) and Simulation_SPICE.sp (350 bytes) down from the kiCAD gitlab repo, removing the old one, and then even re-adding the library to the library table as a new library named SPICE. Yet, all that I see in the power symbol picker is 0V (in both the new and old entry).
Both of the those libraries live in usr/share/kicad/symbols/ and If I open up Simulation_SPICE.kicad_symbol in a text editor I can see other symbols defined in there other than 0V, eg:
@BobZ I appreciate the heads-up. This is more of a personal project to get my feet wet with some synthesizer circuits. Imprecise frequency for noise box isn’t too big a concern.
That does sounds like an awful lot of current. This was just a single oscillator or all six in a package going? I’ve read a few app notes (such as this one from Fairchild) that specifically describe this style of RC relaxation oscillator as low power". This being said, those app notes weren’t terribly specific on what qualifies as “low power”.
I currently have three oscillators wired up and cascaded together on a breadboard. I will have to take a look at how much current is being drawn.
@BobZ Neat! I wouldn’t have thought to go looking for a transconductance graph in the datasheet.
My breadboard (three games oscillating and three with inputs to ground) at the moment draws between 0.84-6.9mA depending on how much I trim the feedback pots. That is of course unloaded on both the input and output
I will have to have a think about optimizing some RC values so that the power draw is a little more reasonable.
OK I was unfamiliar with “40106”; now I see that it is from the original CD4000 CMOS family. That is much slower than the IC I was discussing and it is reasonable that the supply current per gate input would be reduced. But if the current is varying significantly with potentiometer setting then that potentiometer must be conducting significant current as compared to the IC supply current draw. There should be no problem to increase the resistance by 10x and decrease C1 by 10x.
and this is HEF40106 at 5V, it will be lower again at 3v
You can also lower Icc more, if Icc is critical, by change of the oscillator design.
The simplest RC model operates between those two peaks, but you can use 2 gates and make a 2R-1C oscillator (see HEF4060 et al) and that can have lower Icc as the Vin sweeps a wider range.
Also, the frequency does not vary with the supply voltage, unlike the single Schmitt version.
If you use a gate, as @PCB_Wiz illustrates, you are also able to switch the oscillator on and off with (in the example) pins 2 or 5.
Edit: and the output is the full supply voltage swing, not just the upper and lower hysteresis as Bob mentioned and Holger demonstrated.
It is instructive to read the spice netlist. This netlist is generated by Eeschema from the circuit diagram and is sent to ngspice for simulation. It is all about devices, connections and values.
Take voltage source V1:
V1 Net-_U1G-VDD_ 0 5V
V1 is the device reference (V for voltage source). Two net connections (nodes) are following, Net-_U1G-VDD_ and 0, then the value 5 V. Unfortunately this source is not connected to anything. There is no second Net-_U1G-VDD_ anywhere in the netlist.
It should be connected to devices U1, whose instance in the spice netlist is
XU1 /Sync Net-_R3-Pad2_ NC-U1-0 NC-U1-1 CD40106B
which is a call to the subcircuit in the model file CD40106B.lib, which is included (thus loaded into ngspice by .include command). The model offers the subcircuit
.SUBCKT CD40106B Y A VCC AGND
without telling me what might be input or output (Y or A), but with VCC as power and AGND as ground. I have chosen Y as in, A as out. The XU1 instance line does have two nodes
again not appearing again anywhre in the netlist and thus again connected to nothing.
So something went wrong with your setting up the device U1, e.g. with the pin assigment.
B.t.w. running the simulation with my projects is as simple as this:
Download the *.7z and expand it into a place of your choice.
Start Eeschema (7.0.6)
Search for the *.kicad_sch in the previously expanded directory
Open the file in Eeschema, thus loading the project.
The simulation starts immediately and plots the result. (In my Windows 10 installation afterwards I need to right click into the plot window and then call ‘Fit on Screen’ to scale the plot correctly).