Show Posts
Pages: 1 2 [3] 4 5 ... 92
31  Using Arduino / General Electronics / Re: How do I calculate the values for an LC or PI filter? on: June 27, 2014, 12:01:41 pm
You misunderstand me. You don't want to put a lowpass filter on your speaker. You want a lowpass filter on the Vcc line providing power to your audio section.

The audio section of my original circuit contains a DAC and a 3W amplifier.  Sometimes the 3W amplifier is used, sometimes an external amplifier is connected to the line out.  The fact that the 3W amplifier is there though means that the supply for the analog circuit has to be sufficient to supply the speaker, unless I ran the on board amplifier off the unfiltered supply, which would likely wreak havoc. 

(I say 3W because that is how TI refers to the part, but since the speaker is 4 ohms, not 3 ohms the output should be more like 2.5W with this amplifier.)

So yes, I get that the lowpass filter should be on the Vcc line.  But the Vcc line has to supply 2.5W to the audio portion of the circuit to drive that small amp when it is in use.


Quote
Power should not be daisy-chained, either. If you run Vcc to the LEDs and then to the audio amp, all the voltage noise on the LED's power wire appears on the audio section's Vcc line. If you run Vcc to the audio amp and then to the LEDs, some of the voltage noise and all of the current noise appear on the audio section's Vcc line.

My original post linked at the top of this thread has my board's schematic.  The power is not daisy-chained, if by daisy chained you mean wired in series.
32  Using Arduino / General Electronics / Re: How do I calculate the values for an LC or PI filter? on: June 27, 2014, 02:34:14 am
I didn't fully explain, however I did post the transfer function, do you know how to derive the transfer function I posted?

I'm afraid not.  My math skills are extremely rusty.

Quote
I can show you how I worked out the transfer function, how we solve the equations and just how complicated this can be

If it's that complicated, I probably won't understand the math.  That page on maxim however made it seem fairly easy to calculate the capacitor needed for a Pi filter though, so I'm curious why you're indicating the math is very complex.


Quote
I I were you I would use an RC filter, very easy to design, very easy to work with, no resonance but it will still filter good enough for you, we can even do the same thing to get the equations for that and its a nice learning curve

That sounds good, but if it's that simple why didn't Maxim do that?  And why would anyone ever use an expensive inductor that would be prone to resonance?

I have used this calculator in the past for RC filters:
http://sim.okawa-denshi.jp/en/CRtool.php

For 1000hz and a 47uF capacitor, it says my resistor should be 3.3 ohms.  That seems high.  I don't know for certain, but given my speaker is 4 ohms, I think if I stuck a 3.3 ohm resistor in series with it not only would the resistor have to dissipate half the power which  think would be something like 1.25W, but my volume would also be halved.  Neither of those is desirable.  I'd have to use a huge 4700uF cap to get the resistor value down to where it wouldn't affect my volume much and where it wouldn't dissipate too much power for a large surface mount resistor to handle.

Of course I could be way off here.  But I think I've got the numbers right.
33  Using Arduino / General Electronics / Re: How do I calculate the values for an LC or PI filter? on: June 27, 2014, 12:09:33 am
That article seems to cover exactly what I need.  It's even calculated the values for the 1khz noise that DC42 said I likely had in my circuit, and the capacitors are fairly small.  I also don't think that diode there is actually necessary for the filtering, it's probably just a reverse voltage protection diode.

I should probably still increase the capacitance on my LED modules and at the power input on my board because they are probably woefully inadequate.  I assume that shouldn't affect the design of this filter.
34  Using Arduino / General Electronics / Re: How do I calculate the values for an LC or PI filter? on: June 27, 2014, 12:02:59 am
I found this interesting article just now:
http://www.maximintegrated.com/en/app-notes/index.mvp/id/4713

It's talking about essentially the same issue I'm having with an audio circuit and LED driver running off the same supply, and shows the use of a Pi filter between the analog supply and the digital signals.  I was going to put the filter on my LED drivers, but if I can just put a single filter before the audio circuity, that would be much less expensive and allow my boards to be as small as possible, which is important for my applications. 

Is that a schottky, or a zener diode between the analog supply and the digital circuit?  And is that necessary?

35  Using Arduino / General Electronics / Re: How do I calculate the values for an LC or PI filter? on: June 26, 2014, 11:54:13 pm
Is the noise coming in on the power supply lines?
Or are the audio input lines picking up emissions from the LED switching?
2 different solutions. One is to filter the power supply better where it feeds the audio amp.

I don't know, nor do I know how to determine this. 

I assume the amplifier has sufficient filtering on its input.  It happens with both the Lepai2020A+ and the DTA-2, both available on Parts Express.  The issue does not seem to affect the 3W amplifier I have integrated into the board itself.  Well, it may, but it's so quiet that it doesn't matter.  The issue with the external amps is an extremely loud high pitched buzzing noise that increases in volume as more LEDs light up.  It's louder than the audio itself.

If I connect a servo to the board, or dim an automotive LED driven by a  12V boost converter using PWM I also get varying amounts of static.  If I recall correctly, this does affect the 3W amplifier on the board, but again, the effect is lessened.  By which I mean, on the 3W amplifier, the noise is much quieter than the audio, while on the 20W amplifiers, the noise ends up being much louder than the audio... unless they are powered from a wall adapter instead of the same battery (D cells or LiPo - should be plenty of juice).  Then they behave like the 3W amp where noise is minimal.
36  Using Arduino / General Electronics / Re: How do I calculate the values for an LC or PI filter? on: June 26, 2014, 11:08:07 pm
Resinator:
I appreciate the help, but I don't understand a thing you just said.  I don't know how to deal with imaginary numbers, and until today I'd never even heard of a quartic equation. (I had to check to make sure you didn't mean to write quadratic.)

Is a first order filter one with just a capacitor or just an inductor?  Wikipedia wasn't clear on that.   I have tried adding all sorts of capacitors to remove the noise, and had only moderate success by adding several caps of different values (up to 4700uF), and I've read using inductors alone is no more effective at reducing noise. 

Someone above linked this calculator:
http://www.siversima.com/rf-calculator/lowpass-filter-designer/

That only calculates PI filters, not LC, and I find the fact that it accepts frequencies only in the MHz or GHz range suspicious, but it does seem to allow me to enter .001MHz. 

I have no idea what I should set the impedance to, but setting it to 1466 ohms gives me 330mH for the inductor, and 153.5nF for the two capacitors.  That's way off from what DC42 suggested here:
http://forum.arduino.cc/index.php?topic=150336.msg1131664#msg1131664

So, I'm still completely lost.  I have no idea if the values I am getting are sane, and I don't know whose advice to trust. smiley-sad


Oh, and yes, this is for filtering power.  PWM noise from some LED drivers is getting into my audio system. 

(You know, I'm still not clear on why this affects my amplifier when it is powered from the same battery, but not when the power source is separate.)
37  Using Arduino / General Electronics / Re: How do I calculate the values for an LC or PI filter? on: June 26, 2014, 09:48:20 pm
Quote
Oops, wait, I forget to square Pi:
No one said you should.

You did!  You gave me an equation with 2Pi on both sides.  I solved for C.  That required me to move  everything else over to the other side of the equation which left me with a bunch of variables multiplied together, and 2Pi was featured twice, so that's equivalent to squaring it.

If my math is wrong, show me where.
38  Using Arduino / General Electronics / Re: How do I calculate the values for an LC or PI filter? on: June 26, 2014, 03:49:23 am
Oops, wait, I forget to square Pi:

C = 1 / (2Pi^2 x F^2 x L)

C = 1 / (39.478 x 1000000 x L)
C = 1 / (39.478 x 1000000 x 0.00033)
C = 1 / 13027.74
C = 0.00007676
C = 77uH?

Now it's even further off of the suggested 1000uF. :/
39  Using Arduino / General Electronics / Re: How do I calculate the values for an LC or PI filter? on: June 26, 2014, 03:42:50 am
So:
2Pi x F x L = 1 / (2Pi x F x C)

And:

2Pi x F x L x 2Pi x F x C = 1
2Pi^2 x F^2 x L x C = 1

So:

C = 1 / (2Pi^2 x F^2 x L)

And if F = 1000:
C = 1 / (6.283 x 1000000 x L)

And we assume L = 330uH (0.00033H)
C = 1 / (6.283 x 1000000 x 0.00033)

C = 1 / 2073
C = 0.000482 Farads
C = 482uF

Hm... The value seems sane, so I think I did the math right, but it doesn't match up with the 1000uF that DC42 said I should use with a 330uH inductor.
40  Using Arduino / General Electronics / How do I calculate the values for an LC or PI filter? on: June 25, 2014, 11:32:40 pm
Hey guys,

So a while back I posted this thread about an issue I was having with noise from my LED drivers:
http://forum.arduino.cc/index.php?topic=150336.0

DC42 said that the noise was likely to be 1khz, and suggested some component values for an LC filter.  But he didn't explain how he arrived at those  particular values.

Since inductors are often expensive, especially ones which can handle high current, and I need one which is small as well, I want to be able to calculate the capacitors I would need for different values of inductor, so I can choose the least expensive and smallest inductor I can.

I'd also like to know how to do the same for a PI filter, as from what I've read these seem like they'd be twice as effective at the cost of one additional capacitor, which isn't too bad if I could get away with small caps.
41  Using Arduino / Audio / Re: Is it possible to interface with I2S devices? on: June 24, 2014, 03:43:33 pm
I know what the bit stream looks like.  My question was - Others have reported issues with meeting the requirements of this protocol and it sounds like it has some kind of strict timing issue.

I did some more searching and I found a bunch of discussions about it.  But I'm still not 100% clear on it.  One issue seems to be that with the standard I2S protocol you have to toggle the LR clock before you send the last bit so that causes problems if you want to use hardware SPI to do the transfer.  But there seems to be a left-justified format that might work.  But, if you were doing DMA like Paul does on his boards, then maybe again you would have a problem toggling that second clock line at the right times.  There is also the issue of timing and how tolerant the chips are of any transfer delays and whatnot.  That I'm completely uncertain about.

Anyway, it seems anything but straightforward. 
42  Using Arduino / Audio / Question about WaveHC on an 8mhz Arduino on: June 24, 2014, 03:37:09 pm
What sort of performance could I expect to see?  I don't suppose it will play 16bit 44khz mono files?  Would it play 22khz 16bit mono files?

I was thinking about using it with a 3.3V system, but I'll need a little time in between updates to update 4 RGB leds being driven by a TLC59711: 
http://www.ti.com/lit/ds/sbvs181/sbvs181.pdf

I was really hoping for 44khz audio though.
43  Using Arduino / Audio / Re: Is it possible to interface with I2S devices? on: June 23, 2014, 06:49:41 pm
Well, here's one for example:
http://www.ti.com/lit/ds/symlink/pcm1753.pdf

I2S is a standard means of talking to audio hardware.  There are variations on it, like "left justified" which are supposed to be easier to interface with.

I also found this very informative document on it:
http://www.ti.com/lit/an/slaa449a/slaa449a.pdf

That particular DAC above is 24 bit, which may be a bit much, but 16 bit per channel exists as well.
44  Using Arduino / Audio / Is it possible to interface with I2S devices? on: June 23, 2014, 11:52:04 am
I've been looking at some I2S DACs lately, but I'm concerned that I won't b able to interface with them.  I can't seem to find much about I2S here, just one bit about how the DUE has it built in, and I recall Paul Stoffregen mentioning that getting I2S to work with the Teensy 3.0 was a pain because of the clock signals or something.   

When I look at the datasheets though, the interface doesn't seem that complicated.  There appears to be three data lines, two of which are clock signals, and one clock signal is the bit clock and is 16, 32, or 64x that of the main clock.  So I guess the main clock signals the end of an integer or whatever.  Seems simple enough to bit bang if there were no other way of generating the signal.

So what's the issue?  What am I missing here?  Or am I worrying over nothing?
45  Using Arduino / Microcontrollers / Does the Micro come with the default Atmel 32U4 bootloader from the factory? on: June 22, 2014, 08:17:51 am
Does the Arduino Micro come with the default Atmel 32U4 bootloader from the factory?

I suspect not.  If not, why not?  It is incompatible with the Arduino IDE?  Or does it perhaps require the additional step of pressing a program button as with some of Atmel's other USB boards?

I ask because I was thinking about designing a 32U4 board without an ISP header on there by default, and just use the USB to program it, but that would be silly if I had to have the header there to put the bootloader on the chip in the first place.
Pages: 1 2 [3] 4 5 ... 92