Simulate Pump-Charge Circuit

Hello, I try to simulate under Kicad V8.0.6 a Cockcroft-Walton Generator. To not start from scratch I try to use a circuit with CD40106 (already answered in this forum) and I get an error when interconnecting pins to this device for Spice simulation. Here spice result :


Schematic :

Any idea are welcome :thinking:
Osc.zip (12.7 KB)

You are using a model for a single inverter, you need to make a model for the whole package and then assign the model, see example below.

You are also missing the simulator gnd 0 (zero) in the library.

* hex inverters according to CD4049UB (unbuffered with simple inverter)
 
.SUBCKT CD4049UB_hex VCC 2 3 4 5 6 7 VSS 9 10 11 12 13 14 15 16

xinv1 3 2 VCC VSS CD4049UB
xinv2 5 4 VCC VSS CD4049UB
xinv3 7 6 VCC VSS CD4049UB
xinv4 9 10 VCC VSS CD4049UB
xinv5 11 12 VCC VSS CD4049UB
xinv6 14 15 VCC VSS CD4049UB

R1 13 0 1k
R2 16 0 1k



.SUBCKT CD4049UB vin vout vcc vss
* simple model

M1 vout vin vss vss CD4049N
M2 vout vin vcc vcc CD4049P

.MODEL CD4049P PMOS (LEVEL=3 VTO=-2.9 KP=2M GAMMA=3.97U
+ PHI=.75 RD=28.2 RS=45.2 IS=31.2F PB=.8 MJ=.46
+ CBD=148P CBS=177P CGSO=218N CGDO=182N CGBO=299N W=80U L=10U)
.MODEL CD4049N NMOS (LEVEL=3 VTO=2.1 KP=5M GAMMA=3.97U
+ PHI=.75 RD=4.2 RS=4.2 IS=31.2F PB=.8 MJ=.46
+ CBD=105P CBS=127P CGSO=156N CGDO=130N CGBO=214N W=40U L=10U)


.ENDS

.ENDS

Ok thank @janharm I download the spice model from TI website, I use (or want to use) 40106 not 4049, not understand “gnd 0” ?!!? sorry.
Following your suggestion, I duplicate the first cell like this :


Now simulation works :

So, after modification to complete Cockcroft-Walton Generator :


and sim :

Not really competitive, probably I miss something …

Nice the simulation works, I would expect that the generator should generate a high voltage. Note the inverters connect the output to 9V (when high) or 0V (when low) so the voltage vout will not rise above 9 Volts. In this sense the simulation is correct.

The simulation is correct, but your circuit is not a CW multiplier.

Thanks @RobK you’re right, in my mind it’s based on CW but it is close too a charge-pump, I don’t know how to name it?
The simulation fail probably due CD40106 simulation file not including good AC performance (which I don’t know how to add it). A classic CW uses an sinusoidal AC source, here the first door is used as an oscillator, others are used to “phase shift” the signal (Each cell invert previous) these out-of-phase signals are then used to control the different sections of diodes and capacitors. It is not the “classic” topology where only one AC signal fuels the entire waterfall. In other words, it is an implementation of load pump that uses serial inverters to provide clock signals (with phase alternation) to each “floor” of diodes/capacitors, rather than a single AC source as in the traditional CW. It is a clever method for generating load pump tensions without the need for multiple transformers or complex external clock sources. Probably we need to use a better diode model and Capacitor too? No idea …

I think what you are trying for is a Dickson charge pump:
image

I quickly simulated this in LTSpice (haven’t used KiCad for simulation yet, sorry) and this is what I get:

Excellent! I discover this circuit thanks to you! I’ll try to simulate this on Kicad (that use ngpice) to observe the same signal reaching 50V at the end! thanks to you :+1:

So, I try to simulate :


Not really the same, the voltage decrease :thinking:

Voltage does go up! After 4 pulses he has gained almost an extra volt.


The picture above is from:

And whenever I hear that name mentioned, I always wonder whether Crotchcraft Wally has an STD.

For further experiments, This forum has quite a lot of working simulations spread over different threads. Click on the link below for a search.

https://forum.kicad.info/search?q=simulation%20examples

Thank you @paulvdh for the link. It seems that Ngspice is more limited than LTspice at least for this type of representation. Even with simplified models of inverter and diodes it seems that the resolution with Ngspice confronts concerns of convergence and singular matrix. @RobK On your diagram I see a 10nS TD and a VHIGH = 9V Can you give the models you use for the inverter and the diodes? Perhaps they will work with Ngspice?
Here my new schematic :


Here sim-files for Inverter & Diode :
Invert-Std.lib (869 Bytes)
Simple-D.lib (36 Bytes)

I try to fix some values with the .options (It is not more conclusive)!
I get this message :

I’ve changed the Post Name to be more in phase with this subject.