STRANGE LTSPICE SIMULATION  - Page 1
Forum section: electronics / beginners

author: neko efecktz
author_rank: Regular Contributor
timestamp: November 06, 2016, 12:49:36 am
content: I'm back again.I have found a bit of a strange behavior in LTSPICE.I have included 2 screen snapshots to show my findings.Both snapshots are of 2 different circuits, a project circuit and test circuit.Both have 2 voltage sources both labeled V1 and V2When I run the simulator on my main circuit which is on the left, I got different results to what I was expecting.simulation... .dc V1 -15 -30 1 V2 15 30 1V1 is a negitive supply Ie. positive grounded.It simulated as I expected with a single diagonal line running from -30v to -15simulating V2 gave me multiple parallel lines with no noticeable voltage drop.This behavior occurs throughout the non-invertingmode circuit.I then created a new test drawing as seen on the right.simulation ... .dc V1 0 30 1 V2 0 30 1I tried running V1 as a negative supply and as a positive supply and the results were once again as I expected.But once again simulating V2 gave me multiple parallel lines with no noticeable voltage drop.I swapped the names of the two supplies and still had the same results.V1 as I expected, V2 not.The simulation shown has both voltage supplies as positive output.Does anyone have any idea why This should be happening?Thank you.BILL.

author: Ian.M
author_rank: Super Contributor
timestamp: November 06, 2016, 12:56:03 am
content: Please attach the simulations and saved plot settings so we can attempt to reproduce your results.Edit:Zip and attach the actual .asc and .plt files from your two simulations - its difficult to tell what's going on just from screenshots.

author: neko efecktz
author_rank: Regular Contributor
timestamp: November 06, 2016, 12:58:41 am
content: Sorry about thatBill

author: alsetalokin4017
author_rank: Super Contributor
timestamp: November 06, 2016, 01:19:18 am
content: Please post the .asc files.....

author: neko efecktz
author_rank: Regular Contributor
timestamp: November 06, 2016, 01:42:02 am
content: OkHere are all of the files in question.Hope this is able to help.BILL.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: November 06, 2016, 02:07:39 am
content: Quote from: neko efecktz on November 06, 2016, 12:49:36 amBill,I ran your simulation, I removed the Zener diodes D1 and D2. The Zener are not in my library of parts so they generate an error.When you have multiple sources in the DC sweep statement like this:.dc V1 -15 -30 1 V2 15 30 1The two voltage sources V1 and V2 are not changed simultaneously.The line is interpreted like this:With V2 values of 15 to 30 step 1V sweep the value of V1 from -15V to -30V in 1V steps.In the other words the simulation runs 16 times.SolutionI have labelled the voltage at V1 In1.I have replaced V2 with a behavioural voltage sourced and specified V=-V(In1)Now, I only need to sweep V1ModelResultsRegards,Jay_Diddy_B

author: neko efecktz
author_rank: Regular Contributor
timestamp: November 06, 2016, 03:28:19 am
content: Jay_Diddy_BThank you for your reply.I tried as you suggested but all that happened is the non inverting section has a straight line at 0 Volts.The inverted section works as normalHave I missed something from your reply.Is there a reason you renamed V2 to B1ThanksI have attached the file as it is now and also an error message I get while Simulating.The Zener diodes are there to limit the voltage when driving an analog input of a PIC.How do you change the Simulator output screen colour from black to white?Got to go now, have to start preparing pizza bases for dinner.I'm the cook on sundays.BILL.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: November 06, 2016, 03:34:39 am
content: Hi,Here is my model.I didn't just change the name, I changed the source V2 from a voltage source to behavioural voltage source.You can change the colors for the waveforms and the schematic from the menuTOOLS->Color Preferences.Regards,Jay_Diddy_B

author: neko efecktz
author_rank: Regular Contributor
timestamp: November 06, 2016, 03:56:15 am
content: Jay_Diddy_Bcould you tell me what is abehavioural voltage source.Is it a Voltage Source that behaves like another??How do I change avoltage sourceto abehavioural voltage source.Please forgive all of these silly questions, but I've only had LTSpice for less than a week.Thank You,BILL.

author: neko efecktz
author_rank: Regular Contributor
timestamp: November 06, 2016, 04:02:14 am
content: Jay_Diddy_BFound thebehavioural voltage sourceIt'sOKthankyou for your helpBILL.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: November 06, 2016, 04:08:09 am
content: Quote from: neko efecktz on November 06, 2016, 03:56:15 amA behavioural source is basically a source that is defined by at least one voltage and may be a mathematical equations.for exampleV=I(V1)* V(IN1)V is equal to the product of the voltage and current of source V1. That is the power coming out of V1. Assumes that you label the node IN1.The simple way is to delete the voltage source, vol, and insert a new component BV (or BI if you want current).GoHELP->HELP Topics, typeBVand thenclick list topics. SelectBand then display.Regards,Jay_Diddy_B

author: neko efecktz
author_rank: Regular Contributor
timestamp: November 06, 2016, 04:33:09 am
content: Thanks for that.BILL.