Announcement

Collapse
No announcement yet.

simulations in LTspice

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • simulations in LTspice

    Hi everyone
    this is my first post here, hopefully the first of many.
    im very new to electronics but i have been working hard learning what i can, so please forgive any dumb questions.

    I have been experimenting with some simulations in LTspice and something doesnt seem quite right when combining circuits.
    for example, i have made a simple oscillator and a simple mixer just to get an idea of how it all works, but when i put these circuits in LTspice together they dont seem to work properly.
    the oscillator works fine alone, and so does the mixer (when using an AC voltage source), but when i put two oscillators and a mixer in, then look at the output, i do not get the result i should.
    i have had this same problem when combining other circuits too.

    i am connecting the multiple circuits the same way you would if you had, for example, guitar pedals connected together using jack cables, by simply connecting the ground wire and the in/out wire.

    im sure im doing something wrong. any ideas?
    i think my problem might be because of a shared ground? but isnt that how an audio setup works anyway? e.g. if i was to connect an audio source to two guitar pedals and a speaker, wouldnt they all share the same ground in the same way they would if they were simulated in LTspice together?

    i can provide screen shots of my schematics if you want, or the LTspice files.

    thank you in advance for any help, and sorry for my newbness.

  • #2
    I think that it will be much better if you provide the LTSpice files. You can also ask the same questions on the LTSpice users group on yahoo. Shouldn't you run transient simulation in this case?

    Mark

    Comment


    • #3
      i will upload the files asap and ask on the group too.
      i am using the transient simulation for this test.

      thanks

      Comment


      • #4
        here is the LTspice project:

        https://dl.dropboxusercontent.com/s/...AtEcsN1Q_gwKQA


        in this example you have two oscillators, one on top and one on the bottom, separated by the dotted line.
        then in the dotted box is a very simple mixer, which should sum the two signals together with a little attenuation on each signal.
        at the moment the two oscillators are not connected. if you run the simulation and test the two nodes next to where it says switch you can get an idea of how it should sum, but when you connect the points (labelled "switch") and test the output you do not get this result. the oscillators match frequency instead.


        thanks for the help
        Last edited by Tun; 02-10-2014, 09:40 AM.

        Comment


        • #5
          I think that you should post the project to the TEMP folder of the yahoo group (this is the way the group works) and not to dropbox.
          I see several problems with your circuit:
          - the power supplies (voltage sources) are not referenced to the ground. One of their pins should be connected to the ground. Otherwise, the power supply it's "floating" and most probably the circuit does not work as expected.
          - the negative voltage source - DC value should be -9 and not 9.
          - there is not need to connect ground of two mixers. They are automatically connected by means of the ground symbol. And connecting grounds does not cause any problems - it's simply not needed.
          - the output signals are far from square.
          - the mixer output cannot "float". It has to be connected to the ground with some resistor.
          - the mixer cannot be called "simple" only because it consists of two resistors. Actually it's poor because low values of the resistors cause that one oscillator influences the other.
          Where did you get the schematic of the oscillator? It seems that either values used are incorrect, or the schematic is incorrect. Can you point to a source?

          Mark

          Comment


          • #6
            thanks for the great reply.

            i had a feeling the voltage should be referenced to ground, but i had the same problem with another oscillator i used where the voltage was referenced to ground (although the ground of the mixer did not go through a resistor in that one)

            isnt the negative pin of a voltage source a negative voltage? i have seen many schematics using op amps where they use two voltage sources, one for the + and one for the -, which is what i think you are saying to do. is there a way to power an op amp with a single power source?

            i thought the oscillators didnt need the ground connected, but i was so confused i was trying everything.

            i know the outputs are not square, i just named them that for easy recognition. funnily, i actually called them "square(ish)", but removed the "ish" for the sake of uploading the example

            for the mixer ground, would i connect another wire coming from the single wire (out) via the resistance, then to ground, so that i still have the same output wire, but with the extra wire coming from it?

            i called it a simple mixer myself, again, just for reference more than anything.
            this seems like it would be a huge factor as to why i am getting the same signal from both oscillators once they are connected. the mixer schematic i saw said to use anything from 1k to 5k resistors.

            why did this mixer schematic work perfectly for two AC voltage sources, even with the output floating and with the same resistance values, but not for these oscillators?

            here is the schematic for the oscillator:

            Simple Triangle Square Wave Oscillator Circuit Diagram | Circuits Diagram Digital Schematic


            thank you very much for all your help! i will keep learning

            Comment


            • #7
              Originally posted by Tun View Post
              ...i have seen many schematics using op amps where they use two voltage sources
              Yes, that's what you need to make a plus and minus supply. Duplicate V1 and place the duplicate in series with V1 then connect the junction of the two voltage generators to ground. That will make a +/-9V supply. If you run it now it won't oscillate! (I tried it). It's too perfect, everything just sits at zero volts. To make it run, right click on one of the voltage generators and give it a series resistance of 10 ohms. The 'square' output will now be square

              The voltage generator is a single floating power supply. The + and - on the symbol just mean that the + is positive with respect to the - (it isn't a separate negative power supply).
              Last edited by Dave H; 02-11-2014, 01:55 AM.

              Comment


              • #8
                thanks! i just tried this and it works beautifully!
                it also makes the mixer work!
                maybe powering things wrong is what was causing problems in my other schematics.

                what is this simulating when adding series resistance?

                i cant thank you both enough. you have really helped me out here!

                i did reply to this thread earlier, but the reply seems to have disappeared :/ maybe i did something wrong.
                i asked about powering op amps with a single power supply. how would you power op amps if you were using a power supply from the wall? i read a little about single supply op amps and also some work arounds. would you need to use one of these options?

                thank you again for all the help.

                Comment


                • #9
                  Your post probably got lost because the forum was down for a while.

                  I added the 10 ohm to make the power rails come up asymmetrically (as they would in a real circuit) so the oscillator would start.

                  It could be converted to single supply as in this link (the LTSpice file is in the zip file) Select 'File' then 'Download' to download it from Google.
                  Last edited by Dave H; 02-12-2014, 09:18 PM.

                  Comment


                  • #10
                    great! thanks!

                    i think i understand roughly whats going on here. you are using a voltage divider to get the 0V point, but it is 9V instead. and the +9V is 18V instead, and -9V is 0V instead, resulting in the same signal, but with a 9V DC offset.
                    is this correct? if so, what is the capacitor for?

                    also, i could just follow this signal with a high pass filter to get the signal to roughly -9V to +9V range correct?
                    i wont guess the values though, because that is something i only have an idea of.


                    as for the 10 ohm series resistance. would 10 ohms always be ok for this job? or would it depend on the circuit?

                    thank you very much

                    Comment


                    • #11
                      Originally posted by Tun View Post
                      great! thanks!

                      i think i understand roughly whats going on here. you are using a voltage divider to get the 0V point, but it is 9V instead. and the +9V is 18V instead, and -9V is 0V instead, resulting in the same signal, but with a 9V DC offset.
                      is this correct? if so, what is the capacitor for?

                      also, i could just follow this signal with a high pass filter to get the signal to roughly -9V to +9V range correct?
                      i wont guess the values though, because that is something i only have an idea of.


                      as for the 10 ohm series resistance. would 10 ohms always be ok for this job? or would it depend on the circuit?

                      thank you very much
                      It's as you say. The capacitor is to give a low impedance path to ground for the half supply ref. point.

                      Yes, you could AC couple the output to get +/-9V

                      The 10 ohm was to make sure the oscillator started in the simulation. I very much doubt it would be needed in a real circuit.

                      Comment


                      • #12
                        so i wouldnt need the 10 ohms if i was simulating an amplifier, for example? it is just to get that initial voltage in either of the directions first, to start the oscillation?

                        Comment


                        • #13
                          Originally posted by Tun View Post
                          so i wouldnt need the 10 ohms if i was simulating an amplifier, for example? it is just to get that initial voltage in either of the directions first, to start the oscillation?
                          Right, you wouldn't need 10 ohms for an amplifier simulation but you could put in a value for the real power supply output resistance to simulate say the sag in a tube output stage.

                          Comment


                          • #14
                            thank you so much! you have just taught me so much in the space of 13 posts!

                            i really appreciate your help and cant thank you enough. hopefully everybody around here is as helpful and patient as you
                            i will definitely be sticking around here, and hopefully it wont be too long before i can put a bit back in to the forum too.

                            i see the like button on your posts, do they have any meaning around here? theres another forum ive been a member of for several years where the "likes" count almost represents a virtual penis size, but certainly in my eyes is helpful to quickly identify the helpful and knowledgeable people.
                            im going to go like your posts anyway since its the closest i can get to an actual "thank you".

                            Comment

                            Working...
                            X