Electronics > Projects, Designs, and Technical Stuff
EMF pickup from amplifier in I2C line causing glitches. (Now with scope trace!)
<< < (12/31) > >>
Starlord:

--- Quote from: dmills on July 05, 2016, 03:09:29 pm ---Better, but you are still not, I think doing it quite right, far better to use something like ltspice (Free download, and pretty standard for this sort of thing) and remember to include the speaker as a load resistor.

With 10u you are going to get a lot of peaking at ~35KHz (~10dB) and the impedance seen by the amp falls off a cliff at the top of the audio band which may put the amp into current limit, I would be thinking less then 1u, maybe an order of magnitude less.

(1u + 100n) in each leg into 4 ohms comes out to -23dB @ 1MHz, -65dB @ 10MHz and more or less flat below 400k, your switcher is running at 1MHz, so there is no real need to put the filter too close to the audio band, especially if it puts a deep low impedance point where it can be expected to trip the power amp overcurrent protection.

Filters have two ends and you need to remember to keep an eye on the admittance at the input side or you can get into trouble, you essentially have to design the filter for a specific load impedance which means that you cannot just trade L for C (Keeping the corner frequency constant) without changing Q.

Regards, Dan.

--- End quote ---

1u + 100n?  You mean, two capacitors to ground, plus a 1uH inductor in series?  Why two, so close in value?

Also, it's a 2 ohm load, sometimes.  Two 4 ohm speakers, in parallel, configured as a mono bridge tied load. 


--- Quote ---and more or less flat below 400k, your switcher is running at 1MHz

--- End quote ---

I know I've been talking about filtering a 1MHz signal, but I'm not even sure where that 1MHz signal is coming from.  From what I can tell in the datasheet, the amp should be switching at 400KHz.
dmills:
Ok, so re do the sim for a two ohm load, and fiddle to taste, no biggie.

What I meant was a 1uH inductor in series with each (Tied) output from the amp and a 100nF cap to ground from the speaker end of each inductor, very routine for class D (two inductors and caps per combined output channel).

Now you are going for 2 ohms, so maybe a little more cap would not hurt, possibly 220n instead of 100n, whatever, basically you have fixed L & R, so you need to set C to avoid excessive current draw or excessive peaking (tends to be the same thing), and take the corner being what it is.

IIRC that chip will go at up to 1.2Mhz, and you might be seeing spikes from both outputs, check the datasheet for the output timing diagrams.

Regards, Dan.
Starlord:
Ive never used LTSpice before, but I installed it and it looked old and shitty, so I tried setting up a circuit in Digikey's PartSim which I had working in five minutes and graphed the output, but I'm not sure the output I'm seeing is accurate and their parts don't provide many parameters to adjust, so I guess both tools have their serious flaws.  I went back to LTSpice and am now trying to set up a simulation, hoping it actually has a graph and noise function like Partsim so I can see a graph of the falloff, but god this software sucks.   I mean they got nothing at all right about the interface.  Mouse zoom is reversed, and if you point somewhere and zoom in it doesn't zoom into that point, it also works in a mirrored fashion from how it works in Eagle and every other cad package out there.  And when I move a component, the wires become detached, or maybe they were never attached in the first place.  It's a mystery!  How exciting. :(  Oh, and how could I forget that you have to cut to delete, you can't just point and press delete, and for some reason to rotate you have to press CTRL-R instead of just R or simply right clicking while you're dragging the object.  Ugh.  Annnd, I can't find any noise function on the voltage source.  I'm betting this software has no ability to graph the output either.

Tell me again why people recommend this tool so much?  There's gotta be something more modern out there.  This looks like a Windows 3.1 application.  I have literally used simulators written in Javascript that function better than this.  And that even showed the flow of electrons in the circuit in real time.

[edit]

Okay I found a noise function on the simulation menu.  I have no idea where it's planning to inject this noise into the circuit.  And I don't see any probe function so I can actually pick the point in the circuit I want to measure.  But it's giving me an error about an unknown parameter V so it doesn't matter anyway. :/  My earlier question about why anyone uses this piece of crap still stands.

Monkeh:

--- Quote from: Starlord on July 06, 2016, 12:15:19 am ---Tell me again why people recommend this tool so much?
--- End quote ---

Because it's free and it works. You want better, break out the wallet.

It's really not that hard to work with, you just have to learn not to assume everything works the same way.


--- Quote from: Starlord on July 06, 2016, 12:15:19 am ---Okay I found a noise function on the simulation menu.  I have no idea where it's planning to inject this noise into the circuit.  And I don't see any probe function so I can actually pick the point in the circuit I want to measure.  But it's giving me an error about an unknown parameter V so it doesn't matter anyway. :/  My earlier question about why anyone uses this piece of crap still stands.
--- End quote ---

If you were to spend your rant time reading the documentation, you might get further..
Starlord:

--- Quote from: Monkeh on July 06, 2016, 12:23:35 am ---Because it's free and it works. You want better, break out the wallet.

--- End quote ---

Well PartSim is free, and I'd say it's better.  I may simply have not delved deep enough into it.  I recall now that it has actual part numbers you can select to create a BOM of parts to source from Digikey.  That's where they're making their money.  So even though the base inductor type doesn't seem to let you set its DC resistance it does have the ability to set a spice model, and I'll bet if I choose a real part it will work out better. 

Also a quick google search turns up a number of free options.  Multisim for example looks much more advanced and there's a free edition:
http://www.ni.com/multisim/

I suspect people just recommend LTSpice because it was the first and it's what they're used to and learned in school, because I refuse to believe it's the best of the available free options in this era of open source software.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod