LTspice help for newbie (capacitor charge)

Discussion in 'General Electronics Chat' started by mahela007, Aug 30, 2011.

  1. mahela007

    Thread Starter Active Member

    Jul 25, 2008
    45
    0
    Hi.. I tried to simulate a simple capacitor charging circuit in LTspice but the output values I get are just not right.

    Here's the netlist.

    Code ( (Unknown Language)):
    1. "ExpressPCB Netlist"
    2. "SwCAD III Version 4.12c"
    3. 1
    4. 0
    5. 0
    6. ""
    7. ""
    8. ""
    9. "Part IDs Table"
    10. "C1" "5.0µF" ""
    11. "R1" "2000000" ""
    12. "V1" "12V" ""
    13.  
    14. "Net Names Table"
    15. "N001" 1
    16. "0" 3
    17. "N002" 5
    18.  
    19. "Net Connections Table"
    20. 1 1 1 2
    21. 1 2 2 0
    22. 2 1 2 4
    23. 2 3 2 0
    24. 3 2 1 6
    25. 3 3 1 0
    I used the 'transient' option for simulation. The current I get are in the fA and pA range. This cannot be true, because the circuit is based on a question from a text book. I can't figure out what's wrong with the circuit.. or simulation options.
     
  2. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    Your circuit is not correct,you didn't connected the V1's negative terminal to GND and as a result the circuit can't be completed .And its very normal that it will show the current in fA range as its a capacitive circuit and you are applying DC .To notice the transient you need to switch the circuit from 0V to 12V at startup.

    In "Edit Simulation Command" window just turn on the option "Start external DC supply voltages at 0V".
    [​IMG]

    Good Luck
     
    tersakim likes this.
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Funny, I didn't see debjit625's reply before I simulated it - but our simulations are electrically identical with the startup option.

    [​IMG]

    I also included the voltage and current curves so you can see what you should be getting.

    The only real omission from your simulation is the startup clause on the .tran statement.

    Just a note about schematic conventions; inputs come from the left, outputs flow towards the right. More negative voltages towards the bottom, more positive voltages towards the top.
     
  4. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    And...

    Charging current flows from the capacitor towards the battery. :eek:
     
  5. mahela007

    Thread Starter Active Member

    Jul 25, 2008
    45
    0
    Why is it that one has to include the startup clause in this type of simulation?

    Thanks.. I'll try to use those in future schematics.
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Without "startup", SPICE assumes that you want the voltage/current settings to start at the values indicated, rather than start from 0v/0a. Without Startup, your cap would start off being completely charged, so current through the resistor & cap would be practically zero, as the voltage on the capacitor would match the source voltage.
     
  7. mahela007

    Thread Starter Active Member

    Jul 25, 2008
    45
    0
    Thanks for the help.. problem solved. :D
     
Loading...