1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Very simple Audio compressor for FM transmitter

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by Willen, Dec 6, 2013.

  1. Willen

    Willen Well-Known Member

    Joined:
    May 22, 2012
    Messages:
    1,293
    Likes:
    115
    Location:
    Nepal (GMT +5:45)
    Ok I fixed input and used a capacitor at input and output live audio line to block DC.
    - Can you assume correct value of the capacitor? I have 100nF film, 0.33uF and 2.2uF polarized tantalum. Polarized is not good but I will measure voltage across the cap and will fixed polarity.
    - Another: PC has Mic in and has 3 pins- L, R and Gnd. Most of the time people record audio by shorting L and R. So PC gets same audio to L and same audio to R. Now the compressor has (+) out and (-) out. Is it better to use these (+) and (-) as L and R input to the PC? Or has no benefit? (If it improves nothing then I will use (+) audio for L and R (shorting L and R input of PC) as I said above.
     

    Attached Files:

  2. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,585
    Likes:
    950
    Location:
    Canada, of course!
    The + and - inputs and outputs are balanced mono inputs and outputs, not stereo. Balanced means differential. When the + input goes positive then the - input goes negative and if the + input goes negative then the + input goes positive. Because they are differential then they cancel common-mode interference like mains hum picked up by the cable. Common-mode interference is picked up by both wires and when fed to an amplifier that has balanced differential inputs then any signal that is the same at both inputs is cancelled.

    A telephone line is also balanced. When the signal on one wire goes positive then the same signal on the other wire goes negative and vice-versa. The telephone pairs of wires are not shielded and do not pickup mains hum or common-mode interference from other pairs of telephone wires.

    If you want to convert stereo to mono then shorting outputs might overload and destroy their output opamps. Use mixing resistors instead, a 1k resistor from the L source and another 1k resistor from the R source. Join together the free ends of the resistors to make the mono signal of L and R mixed together safely.
     
    • Like Like x 1
  3. Willen

    Willen Well-Known Member

    Joined:
    May 22, 2012
    Messages:
    1,293
    Likes:
    115
    Location:
    Nepal (GMT +5:45)
    And about value of coupling capacitors?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,585
    Likes:
    950
    Location:
    Canada, of course!

    The value of a coupling capacitor has the RC -3dB response at the frequency the reactance of the capacitor equals the resistance of the source plus load resistances. The -3dB frequency is called the cutoff frequency where the level is down to 0.707 times the level of higher frequencies and is heard as a small but noticeable drop in level.
    Calculate it as C= 1 divided by (pi x R x f). So the capacitance for a very low impedance source driving a 20k load at a cutoff frequency of 30Hz is 267nF. Use a 270nF or 330nF film capacitor.
    I cheat a little since 1/divided by pi is almost 0.16 so I do it as 0.16 divided by (20k x 30Hz).
     
  6. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi,

    I was talking to someone yesterday and another idea came up: using a digital pot and microcontroller for an audio compressor. The micro would measure the output (and maybe the input too) and change the gain of the amplifier stage by changing the pot setting.
    Just another way of doing it :)
     
  7. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,369
    Likes:
    974
    Location:
    Loveland, CO USA
    MrAl, Good idea.
    Your can here some thing very well and other things not at all.
    When I tried it, you hear a "zipper" sound in the background.
    Used separate PCB for micro to keep the micro noise out.
    Used opto isolators on the data lines so noise stays out.
    Tried "digital pots" and "digital gain amps" and "multiplying DAC". All had problems.
    Found a bad effect of any DC was in the audio. Had to trim out any input offset in the opamps.
    The "zipper" sound was still there.
    Can't remember how big a step I had in the POTs. I know some had only 64 steps and some had 256 steps. The zipper sound is related to step size.
    Tried multiplying DAC. Pretty good but only tried 8 bit and should have started with 12 bit or more.
    Most POTs are linear. There are some that are audio taper. There is a good one that is 1/2 db steps. Can't remember 7 or 8 bit.

    My conclusion: In a mixer where the gain is adjusted by "hand", the zipper noise is not bad. (If designed well) So I do like digital pots.
    In a limiter where the gain is adjusted 1000 time a second the noise to too much.

    When the gain jumps from 8db to 8.5db to 9db to 9.5db the steps get into the sound.

    My last try was to use an analog voltage controller gain amplifier. The "THAT corp." part.
    Use a 16 bit DAC. Update it very fast. Put a RC on its output to smooth out the steps.
    I did not get finished.
    What I did get finished is the peak detector/ RMS circuit with variable attack and release, and multi attack/release speeds/squelch detector, etc.
    I used a little 8 bit micro with a built in ADC. It is amassing how much analog functions can be put into software. It took two instruction to get the absolute value of the audio (same as full wave rectifying). An RC is only a small subroutine away. The time constant is a variable so it can be changed on the fly. The software for the VU meter is very similar to the audio processing software.

    I did not finish the project. When I saw it was working and cold be done in a very small micro, and no one was going to pay for the project I moved on to a paying project. Would love to finish but must stay on paying projects.
     
  8. Willen

    Willen Well-Known Member

    Joined:
    May 22, 2012
    Messages:
    1,293
    Likes:
    115
    Location:
    Nepal (GMT +5:45)
    Hi again all,
    Time to time I get hit by simpler compressor. Many of them known as very bad design. I just feel that the 'Elektor' magazines are good source of designs.

    I found a pretty accessible compressor made by two transistor and an OpAmp. Do anyone have experience about such circuitry?

    The ebook (pdf) 'Elektor 303 Circuits' has included the compressor with detailed description at 12th page.
     
  9. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi,

    Where is the circuit?
     
  10. Willen

    Willen Well-Known Member

    Joined:
    May 22, 2012
    Messages:
    1,293
    Likes:
    115
    Location:
    Nepal (GMT +5:45)
    Hi MrAl,
    From an hour I am trying to do it from my vintage cellphone! I am clicking on 'Upload a File' button but not getting upload window. I was talking about a compressor found in 12th page of the file: https://archive.org/details/Elektor_Electronics_303_Circuits
    I will try with other's cellphone soon, if it works I will be able to show schematic soon.

    EDIT: I guessed it's system error. I tried from Android phone's Operamini and from UC browser too. Not getting upload file picker window!
     
    Last edited: Apr 17, 2017
  11. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,585
    Likes:
    950
    Location:
    Canada, of course!
    The "file" has 338 pages and I will not download all of those pages to see only the 12th page.
    Please attach here only the compressor project.
     
  12. AnalogKid

    AnalogKid Well-Known Member

    Joined:
    Sep 22, 2011
    Messages:
    1,135
    Likes:
    161
    Location:
    Ohio - GMT-5
    That is a typical peak-detecting feedback compressor. Its main drawback is that it can cause background noise to "pump" up and down as it compresses and releases. Maxim has a single-chip microphone preamp with that circuit built-in. Ada Fruit has it as a module.

    ak
     
  13. Willen

    Willen Well-Known Member

    Joined:
    May 22, 2012
    Messages:
    1,293
    Likes:
    115
    Location:
    Nepal (GMT +5:45)
    Sorry that I am still not being able to upload files to the ETO. I must need to contact moderators.

    Hi AK,
    May I request with you to upload that one circuit here. In the case of single chip compressor, I have access limit. Someone from Canada have given got some THAT chips though. Being a hobbyist, always I get attraction on simple circuit to which I can understand. :)
     
  14. Tony Stewart

    Tony Stewart Well-Known Member Most Helpful Member

    Joined:
    Aug 31, 2012
    Messages:
    3,152
    Likes:
    282
    Location:
    Richmond Hill , ON Canada near Toronto
    if you want a good free compressor, look at audacity, it has many standard s curves or customizable compression variables and decompressors too. Then listen to an mp3 and compare THD to a very distorted poor design such as this.
     
  15. AnalogKid

    AnalogKid Well-Known Member

    Joined:
    Sep 22, 2011
    Messages:
    1,135
    Likes:
    161
    Location:
    Ohio - GMT-5
    What wattage soldering iron should I use with audacity?

    ak
     
  16. AnalogKid

    AnalogKid Well-Known Member

    Joined:
    Sep 22, 2011
    Messages:
    1,135
    Likes:
    161
    Location:
    Ohio - GMT-5
    THAT products are the gold standard for audio compression and expansion. They are more complicated to use, but THAT has excellent application notes. If I had them I wouldn't consider anything else.

    ak
     
  17. Tony Stewart

    Tony Stewart Well-Known Member Most Helpful Member

    Joined:
    Aug 31, 2012
    Messages:
    3,152
    Likes:
    282
    Location:
    Richmond Hill , ON Canada near Toronto
    0Watts just need cables
     
  18. Tony Stewart

    Tony Stewart Well-Known Member Most Helpful Member

    Joined:
    Aug 31, 2012
    Messages:
    3,152
    Likes:
    282
    Location:
    Richmond Hill , ON Canada near Toronto
  19. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi,

    It's worth the download if you like circuits, or you can view it online with their viewer.
    I downloaded the pdf and saw that there were a lot of circuits, although dated (circa 1988).
    If you like some of the older circuits, you'll like the download (303 circuits).
    Not sure if it violates the copyright to post the circuit here, but since it is only one page probably not.
     
  20. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,585
    Likes:
    950
    Location:
    Canada, of course!
    How do I see only the audio compressor project?
     
  21. Willen

    Willen Well-Known Member

    Joined:
    May 22, 2012
    Messages:
    1,293
    Likes:
    115
    Location:
    Nepal (GMT +5:45)
    Hi,
    Here I found exact link of the schematic I was asking about (already has been posted to next.gr): http://www.next.gr/uploads/135-11110.png
    Did you mean the software program can do all, same as hardware limits and compresses?
    I have got some of the THAT2252 (RMS detector) and THAT2155 (VCA). And yes these are little complicated, specially for beginner/hobbyist. So waiting to learn little more analog before using these. So trying to play with simple designs.
     

Share This Page