Choosing resistors for audio circuits


Closed Thread
Results 1 to 31 of 31

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    I've just had a quick read of an RC circuit wikipedia page. The only thing I have like that is the 1uF capacitor at Vi and the resistors that connect to it.

    It looks like I will need a series RC circuit. Do you know how I would start calculating the values for the resistor and capacitor? I found this RC calculator but I'm not really sure what kind of output I should be looking for.

    I will do a few tests on the output from my PC and see what happens.

  2. #2
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    What frequency range are you outputting from the PIC ?
    Keith

    www.diyha.co.uk
    www.kat5.tv

  3. #3
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    Adding caps will certainly make things worse, and a 1/4 watt resistor is way too small. The math can get a little hairy, but as a first order..

    The capacitor will have an impedance based on frequency Z=1/(2*PI*frequency*cap value). Rough calculation says about 339 ohms an 1KHz, and about 34 ohms at 10K. To find out how much power you need, draw a little circuit with a 2.2 ohm resistor in series with a 34 ohm resistor, and an 8 ohm resistor across all of that (if 10KHz is the highest frequency you need to worry about having a lot of energy at). Resistor series / parallel calculations will find you the total load impedance. You power supply value will tell you the biggest peak to peak signal you can put through by accident or on purpose since you could swing close to the rails. Now Ohms law (V/R) will tell you how much current is flowing in your total load. Now work out how much current is flowing in the leg with the 2.2 ohm resistor. The I*I*R will tell you how much power will be in that resistor.

    To really scare yourself, work out what happens if you disconnect the speaker while things are running.

    If at this point you are thinking of being super lazy and just buying a 10W resistor and forgetting about it, you might want to look up calculating the impedance of inductors, since power resistors are usually wire wound.

    Isn't analog design fun?
    Last edited by Charlie; - 4th June 2012 at 13:29.

  4. #4
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    I'm using the PIC's hardware PWM (output compare) module. It uses Timer2 as a reference running at Fosc/2. The PIC has a 16MHz crystal with 2x PLL enabled so I believe the PWM is running at 62,500Hz with a duty cycle of 0-100% depending on the sample. The sample rate is 44,100Hz.

  5. #5
    Join Date
    Apr 2011
    Posts
    53


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    Check your circuit construction to make sure the resistor is actually in the circuit properly. I reckon you've got the capacitor/resistor in parallel, not in series.

  6. #6
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    You must have some filter between pic and AMP. That filter should remove carrier frequency of pwm, so you get analog signal on output ... Then you feed that signal into AMP.
    AMP can't amplify PWM signal.

  7. #7
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    They are definately in series.

    Let me check that I'm calculating this right so far.
    Frequency = 62,500Hz
    Using 1/(2*PI*frequency*cap value) I get roughly 5.4Ohms for the cap.
    5.4 + 2.2 = 7.6Ohms total accross the resistor and capacitor.

    I'm not 100% sure how to calculate how much current goes through the resistor/cap and how much goes through the speaker but since the resistor/cap is almost 8Ohms I would assume it's just a little more than half.
    The supply is a 30VA 9-0-9 toroidal coil. If I understand transformers correctly then I think that would give me 3.3A max.
    3.3 / 2 = 1.65A (the half going through the resistor/cap)
    1.65 * 1.65 * 2.2 = 6W.

    6W seems really high so I must have gone wrong somewhere.

  8. #8
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    Without doing the calculations, that looks close the correct answer. Your logic is correct. The circuit you are using is for a DC powered audio amp. I think we need a whole schematic, not just the audio design reference. You certainly can not power a linear amp of that configuration from AC without rectification and filtering, which changes the max voltage.
    Are you really pushing 62.5 KHz? If so, that is NOT an audio circuit, not even if you are a dog!!! What the heck are you building?

    Note also that the power rating is for sustained power over time, not just instantaneous power. But an instantaneous power at a more reasonable worst case 20 KHz, max amplification (against the rails) is likely going to give you an answer expressed in Watts.
    Since a more realistic audio application will see bigger powers at lower frequencies, where the cap impedance is a lot higher, and hence more of the power is in the speaker, and the fact that max volume is never sustained more than a small portion of the total time or it would be clipping, should let you get away with smaller power rated resistors. Again, without building a spreadsheet and doing the analysis properly, if this is an audio circuit, I'd guess a 1 Watt resistor would not be unreasonable, and I might use a 2W if I had one handy.

    If it was for production though, I'd build that spreadsheet.
    Last edited by Charlie; - 4th June 2012 at 14:56.

  9. #9
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    For the RC filter. Would a low-pass filter in the configuration shown here be suitable with a 33Ohm resistor and a 100nF cap? I calculate that to allow 48,253.2Hz which is about as close as I can get to the 44,100Hz sampling frequency I'm using.

  10. #10
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    The 62.5KHz is only for the PWM. The actual sampling frequency is 44.1KHz. I assume that adding the low-pass filter will change those figures quite a lot.

  11. #11
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    This amplifier does NOT have to pass your sampling frequency - in fact you really don't want it to. Focus on the audio spectrum (20 Hz to 20 KHz).
    The values in the example are for stability of the amplifier, and I would not recommend changing them, or you are likely to have an oscillator rather than an amplifier.

  12. #12
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Choosing resistors for audio circuits

    The filter link does not work.
    Calculating the filter is also more complex than first meets the eye - you need to consider input and output impedance. As I said, a whole schematic would make it easier to help you. Feel free to send a private message if you don't want to post it publicly for some reason.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts