Constant-Voltage/Constant-current (CVCC) supply in SPICE - Page 1
Forum section: electronics / general

author: Warhawk
author_rank: Frequent Contributor
timestamp: August 29, 2019, 01:23:13 pm
content: Guys, I completely failed.Could somebody share his know-how on how to simulate a CV/CC source in SPICE?I know only the trick with an ideal diodeCode:.model mylimit D(Ron=0, Ilim=xxx)in LTspice. However, I can't use LTspice (I am excluded from the license).This solution does not work in ngspice.Thanks for any tips.

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 31, 2019, 04:18:14 pm
content: What kind of license do you need to use LTSpice?

author: Warhawk
author_rank: Frequent Contributor
timestamp: September 01, 2019, 06:32:46 pm
content: Quote from: SiliconWizard on August 31, 2019, 04:18:14 pm"This program is specifically not licensed for use by semiconductor manufacturers in the promotion, demonstration or sale of their products. Specific permission must be obtained from Linear Technology for the use of LTspice for these applications."

author: 2N3055
author_rank: Super Contributor
timestamp: September 01, 2019, 06:51:50 pm
content: Quote from: Warhawk on September 01, 2019, 06:32:46 pmSo you are saying that you are working for a company that manufactures semiconductor chips, transistor or diodes, and you are planning to use Ltspice for making marketing materials...?

author: Warhawk
author_rank: Frequent Contributor
timestamp: September 01, 2019, 08:49:45 pm
content: Quote from: 2N3055 on September 01, 2019, 06:51:50 pmWhat the hell are you talking about? Did you even read the question?I clearly wrote that I can't use LTspice and trying to get this running in ngspice or in pSpice. I use LTspice only for hobby.I already found the solution which is awkwardly simple.

author: 2N3055
author_rank: Super Contributor
timestamp: September 01, 2019, 09:36:43 pm
content: Quote from: Warhawk on September 01, 2019, 08:49:45 pmI'm also wondering about "what the hell are you talking about" the license..Cause that license means what I wrote.. So I'm confused and would like for you, if you're willing to, to please explain..That is all.Sorry for confusion, best regards,SinisaP.S. Maybe something like this:https://www.edn.com/design/other/4351913/EDN-Access--03-03-94-Spice-model-mimics-realistic-current-sourchttps://www.spectrum-soft.com/news/spring2005/ilim.shtm

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 01, 2019, 10:56:09 pm
content: Quote from: Warhawk on September 01, 2019, 06:32:46 pmOh damn. I've used LTSpice quite a lot, but only for design purposes, so never found myself in that position really. So that didn't even cross my mind.Anyway, I guess you could do that with an arbitrary behavioral voltage source (B) or something...

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: September 10, 2019, 10:59:49 am
content: Hi,Here is a circuit that I use for cvcc power supplies in LTspice. It should be possible to implement in other versions of SPICE.And the modelling results:The.model IdealDiode D(Vfwd=0.1m)statement makes the diode with 100uV forward voltage.I have attached the model.Jay_Diddy_B

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: September 10, 2019, 11:26:15 am
content: Hi,If the version of SPICE you are using has trouble with .model statement.model IdealDiode D(Vfwd=0.1m)Try.model IdealDiode D( N=0.001)This should be understood by all versions of SPICE.Regards,Jay_Diddy_B

author: RoGeorge
author_rank: Super Contributor
timestamp: September 10, 2019, 11:43:31 am
content: Quote from: Warhawk on August 29, 2019, 01:23:13 pmUse QUCS instead, QUCS is GPL licensedhttps://en.wikipedia.org/wiki/Quite_Universal_Circuit_Simulator

author: Warhawk
author_rank: Frequent Contributor
timestamp: September 16, 2019, 02:30:55 pm
content: Hello Everyone, I am back from holiday. Refreshed and optimistic again.@2N3055- I was not sure if you were really asking a question or was just being mean. I apologize for my tone before. I can't use LTspice because I work for ADI's/LTC's competition in the verymentioned area.@SiliconWizard- Yeah, I used to use LTSpice a lot but now only for hobby. KiCad's implementation of ngspice is far from usable@Jay_Diddy_B- Sweet, I'll try this. I used a similar configuration but with a voltage controlled switch that acts as an ideal diode. It still has some limitations though.@RoGeorge- Thanks for the tip. I was able to get a floating pSpice license but I'll check your software too.Thanks everyone for your contribution.

author: 2N3055
author_rank: Super Contributor
timestamp: September 16, 2019, 02:57:43 pm
content: Quote from: Warhawk on September 16, 2019, 02:30:55 pmFair enough. You can't know people intentions over ASCII characters. No hard feelings. I just kindly ask for the benefit of the doubt if there is next time ... I'm not native English speaker, so it's hard to express both facts and tone...All the best,Sinisa

author: Zero999
author_rank: Super Contributor
timestamp: February 27, 2025, 10:07:11 pm
content: Old thread I know, but I feel the urge to respond.This should work with most SPICEs.