Problem with switching capacitors in Proteus

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all

My problem is connected with Spice I believe. Why I cannot simulate switching capacitors. I have the simplest design with one capacitor which is chared trough one switch and then when cpacitor is charged it discharges its capacity trough resistor. This situation is almost impossible to simulate(time step too small). In user manual there was mentioned when switching capacitors such problems may occur. But what is the solution to the problem. Maiking initial states ?

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hsve you tried Proteus support?

Leon

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try a very large resistor, say 10GOhms, or so, across the cap.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This doesn`t help too Jim. Maybe it is time to try another software.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A series resistor to the cap may also help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try LTSpice. Its free. Has a variety of "solvers" to get around various mathematical anomalies.

Do you make your clock or impulse with very fast rise time. That can also cause this sort of problem.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you considered what happens if you close
the switch between the voltage source and the
capacitor, when the capacitor has a voltage
less than the source. Max be spice does not
like the large transient in current. Probably
you also will not like it, so the "problem" of spice
tells you something about a real problem.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Agree, though a proper model for 4066 has series resistance.

Is there any time that both switches are both on, together?

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

With some of those analogue switches they can be make-before-break, which can cause problems in some situations. Break-before-make switches are available.

Leon

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Do you make your clock or impulse with very fast rise time. That can also cause this sort of problem.

I tried few times with clock with adjusted rising and falling edges. I set 1 sec for rising and for falling. Even this didn`t help. Even sine wave won`t work ;)

Quote:
Have you considered what happens if you close
the switch between the voltage source and the
capacitor

Ok I should think about it earlier but lack of resistor during the first charge doesn`t make any difference and errors still exist even if I put in series resistor to reduce current.

Quote:
Is there any time that both switches are both on, together?

No, first impulse switch on first switch and capacitor is charged. Then second switch operates. But switching actions of these two switches are independent and they are not in the same time.

I also tried to adjust ABSTOL and RELTOL etc. in Spice but this also doesn`t help.

Maybe I will try to use PSpice or like Jim said LTSpice. What do you think about Orcad? Recently my Uni bought Orcad for one lab class.

Anyway thanks guys for supporting me with this matter.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I could help a bit more if it is LTSpice. Not so familiar with the others. There is also a great Yahoo LTSpice help list that does an excellent job of solving problems like this.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would try to remove devices from the circuit
until you can simulate it. Then add devices again to
see what really leads to the problem.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I could help a bit more if it is LTSpice. Not so familiar with the others. There is also a great Yahoo LTSpice help list that does an excellent job of solving problems like this.

Jim

Thanks Jim I appreciate your help. Your posts are always helpful and they are high tech. :) I am really glad there are people like you on this forum!

Thank you guys !

Adam