Audio: BoomBox Suitecase Project

Discussion in 'The Projects Forum' started by SgtOneill, Jul 10, 2012.

  1. SgtOneill

    Thread Starter New Member

    Jul 10, 2012
    16
    0
    Hi everyone,

    Im pretty new to electronics and I'm starting a new project that should resemble this:

    [​IMG]


    I'm going to use 2 Bass speakers and 2 Tweeters.

    So far my schematics have 1 Bass and 1 Tweeter. However yesterday I tried to prototype a simple LM386 with a low pass filter and I was getting alot of noise, and the low pass filter just wasn't working...


    Here what I've got so far (this schematic was reviewed today and changed a bit).

    What do you guys think?

    [​IMG]
     
  2. mcasale

    Member

    Jul 18, 2011
    210
    12
    Okay, I haven't done much with audio frequencies, so I looked up the data sheets. They are attached in case you don't have them.

    First off, your amplifier inputs are floating unless you have a microphone plugged in. You will probably pick up a lot of 60Hz noise. Can you tell if that's what you're hearing.

    Also, you need to shield these circuits - like in a grounded aluminum box, or you will get 60Hz hum.

    Very rarely will application circuits from a data sheet work as presented. They are just a starting point.
     
  3. SgtOneill

    Thread Starter New Member

    Jul 10, 2012
    16
    0
    They are floating? how come?

    The inputs are pin 2 and 3, if im not mistaken, and they will be connected to a Audio Jack that will be connected to a mp3 player or whatever.
    You mean, when nothing is connected to the audio jack? Hmmm...
    I'll look that up and double check it.

    also, how would you shield this? I don't really know what that is :confused:


    Thank you! :D
     
  4. mcasale

    Member

    Jul 18, 2011
    210
    12
    "Floating" means the inputs are not tied to anything. So, they are antennas.

    You should pull the inputs to ground through resistors (like 10K or 100K), unless one side is supposed to be "common" or "ground". Your MP3 player has its own ground/common and it needs to be connected to the ground/common on your circuit.

    "Shielding" means to surround the circuit with a grounded, conductive box so EMI cannot get to your sensitive circuits. You can buy standard boxes at Radio Shack or online.
     
  5. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    Your low pass and high pass filters are wrong.

    In your low pass filter, with R8 = 1kΩ feeding an 8Ω speaker will give you no output.

    In our high pass filter, C5 makes C14 redundant.
    C5 = 564pF gives almost no signal into the tweeter.

    30kHz is way too high. Maybe you meant 3kHz.
     
  6. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The LM386 has very low output power. With a brand new 9V battery the output power is only 0.45W into one 8 ohm speaker at clipping. This low amount of power is reduced as the battery voltage runs down.

    A 9V battery is small. If it powers two LM386 amplifiers for stereo and they play "normal music" so that the average power per speaker is 0.045W then their total average power output is 0.09W and the battery current is an average of about 30mA. Then a 9V battery will last for only about 8 hours with the maximum power reducing all the time.

    Your photos show 8 ohm speakers but your schematic shows high impedance piezo speakers. I have seen very cheap piezo tweeters that sound bad but I have never seen a piezo woofer.

    A filter is supposed to be connected to the input of an amplifier, not at the output.

    You have a 30kHz highpass filter for the tweeter then you will hear almost NOTHING. It should be about 3kHz.

    Explain what is the noise. Hiss? Hum? Distortion?

    The Bass Boost circuit shown in the datasheet of the LM386 is actually Treble Cut, not bass boost. The gain at 20Hz will be 50 (but the value of C16 is much too small to pass bass frequencies), the gain at 350Hz will be 35 and the gain at 1.5kHz and higher will be 25.
     
  7. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    Now that ag is here time for me to bow out.
     
  8. SgtOneill

    Thread Starter New Member

    Jul 10, 2012
    16
    0
    @mcasale: So, if I got it right... so ill had 10k resistors pulldown resistors to the input to ground them. Something like :

    .........................................GND
    ..........................................|
    ......................................10KOhm
    ..........................................|
    Audio Jack Left Channel -------------- Lm386

    Same for the right channel. Im only using 1 channel so far and sending that signal to 2 diferent LM386 one for low frequencies and other for higher frequencies.

    Should I connect the Audio Jack Ground to the circuits ground?

    I didn't think about shield it with a proper case since it will be inside a wooden suitcase. Maybe i'll add that to the list ;)




    @MrChips Hmmm ok so my filters are all messed up, ill have to remake them with better frequencies.... Any suggestions?



    @AudioGuru I was prototyping the LM386 with Bass Boost and Low Pass Filter yesterday and I was using the 9V Battery. However, the final project should be using 2 12V 7.4Ah SLA Batteries.

    About the speakers, the ones I am using are salvages from a Sony Hifi and I have a small one (should be mid-range) and a bigger one (10cm probably) that was the Bass. Im not sure about the impedance but im guessing they are 8Ohm regular speakers. The schematics arent accurate because i couldn't find the correct symbol :)

    About the filters, I was following a youtube tutorial and Im pretty sure they were connected before the speaker and not before the amp... Should I try to filter the input before amplifying it?

    And finnaly, about the bass boost, its basicly lowering the gain on higher frequencies? Well, I guess thats ok.

    The noise i was getting was a "Hummmm" when the input wasn't connected (i believe the noise was still there when music was playing, but the music would overlap the noise) and alot of distortion when playing music "loudly". The Mp3 volume was 3/4 and the speaker was LOUD but pretty much no Bass and alot of distortion.



    Thanks for the help!

    I'll change the filters as soon as im sure what values and where to put them.
    And i'll add the pulldown resistors to the input if my example is correct.
     
  9. mcasale

    Member

    Jul 18, 2011
    210
    12
    Yes! Definitely connect the two grounds together.

    Yes, the resistors should go directly from the inputs to ground. I didn't notice it before, but there is already a 50K internal resistor to ground.

    If an input is unused, connect it directly to ground.

    In the LM386 spec sheet:
    The schematic shows that both inputs are biased to ground
    with a 50 kW resistor. The base current of the input transistors
    is about 250 nA, so the inputs are at about 12.5 mV
    when left open. If the dc source resistance driving the LM386
    is higher than 250 kW it will contribute very little additional
    offset (about 2.5 mV at the input, 50 mV at the output). If the
    dc source resistance is less than 10 kW, then shorting the
    unused input to ground will keep the offset low (about 2.5 mV
    at the input, 50 mV at the output). For dc source resistances
    between these values we can eliminate excess offset by putting
    a resistor from the unused input to ground, equal in
    value to the dc source resistance. Of course all offset problems
    are eliminated if the input is capacitively coupled.
     
  10. SgtOneill

    Thread Starter New Member

    Jul 10, 2012
    16
    0
    Updated:
    Pull-Down resistor on the input channel.
    Changed the frequencies on the filters (didn't change their location, not sure if they should be before or after the amp)
    Added the 12v batteries and transformer. (probably needs some caps to clean the current)


    Should I keep or remove the 220uF Caps on before the speakers? They are on the schematics of the LM386 but I'm not sure whats their function.


    [​IMG]
     
  11. mcasale

    Member

    Jul 18, 2011
    210
    12
    The 220uF capacitors are there to block any DC component from getting to the speakers. You need to keep them.

    NEVER connect batteries across an AC source like you have here. If you want to charge the batteries, you need to rectify and filter the transformer output. Probably, you'll need to current limit the charge, or the batteries could get hot. That depends on what sort of batteries you're using.
     
  12. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The 10k resistors to ground at the inputs of the LM386 amplifiers are not needed because as you were told (and look at its schematic in its datasheet) the LM386 already has 50k resistors to ground.

    I told you that filters should be connected at the input of an amplifier.
    Look at your lowpass filter. It has 1k ohms in series with the 8 ohm speaker so it attenuates (reduces) the amplifier signal 126 times. The maximum output of 0.45W (with a 9V battery) is reduced to only 0.0002W!
    With the filter at the input of the amplifier then the output is full power.

    Look at your highpass filter. It is calculated with a 62k output resistor but it is shorted by the 8 ohm speaker so it passes no sounds.

    Why did you select a lowpass filter at 442Hz and a highpass filter at 4.5kHz? Then you will not hear most sounds because nothing will play the sounds from 442Hz to 4.5kHz.
    Use a 3kHz lowpass for the woofer and a 3kHz highpass for the tweeter so you can hear all the sounds.

    The datasheet for the LM386 shows that if its supply voltage is higher than 9V then its additional power simply makes it hotter. Its max speaker output will be slightly higher at 0.53W but its heating dissipation is much higher at 0.8W.

    Use six AA Ni-MH cells to make a little rechargeable 7.5V battery that will power two LM386 amplifiers for a long time with low output power.
    Or use a car radio amplifier IC like a TDA2005 that produces 6.5W into 8 ohms or 14W into 4 ohms when its supply is 13.2V.

    Oh My Goodness! You have two 12V DC batteries shorting the output of an AC transformer. Instead you should use a bridge rectifier to convert the AC from the transformer to DC and a big filter capacitor then you need a battery charger circuit to limit the charging current and turn off when it detects that the battery is fully charged.

    The 220uF capacitors at the output of the LM386 amplifiers block the DC at the outputs but pass AC signals. You do not want DC in a speaker. You can calculate that their value is too small because they produce a low frequency cutoff at 91Hz which is not a deep bass frequency. Use 680uf for a cutoff at 29Hz.

    You did not hear me tell you that the "bass boost" is not bass boost but instead it is treble cut. Then your sound will have the midrange sounds reduced a little with no bass boost.
    Increase the gain of the bass amplifier to 100 so it can produce bass boost.

    Your schematic wrongly shows the second LM386 as an LM387.
     
  13. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    I'm guessing the OP is thinking of a Wall Wart, which is a DC power supply. If this is the case a black box instead of a transformer would be more appropriate.

    Do be aware though, connecting a DC power supply directly across batterys could result in a acid mess. Some regulation circuitry required.
     
  14. SgtOneill

    Thread Starter New Member

    Jul 10, 2012
    16
    0
    Oh my.... I tottaly forgot the Bridge Rectifier. Thankfully I'm not building anything until I get the schematics just right! Uff, that would be a painfull situation...

    I'll be adding a Bridge Rectifier to turn AC to DC and charge the batteries.

    Also, changing the filters to the input (before the Amp).

    Hmmm the Lm386 doesn't need 12V and thats actually the max Voltage it can get, maybe I could add a LM317 and regulate the 12V to 9v.
    I can probably remove one of the batteries since 7.4Ah is alot for such a tiny audio amp.

    I want to use the 12v 7.4Ah SLA batteries because they are brand new salvaged from a faulty UPS, and I have 3 of them :)

    So the 15v would be useful to recharge the batteries, but to feed the Lm386's I could regulate it to 9V. I'll be using a total of 4 LM386 (the second channel will be a twin of the current schematics).


    Time to update the schematics!

    Once again thank you for the help! I tried to get some guidance before but no one really cared this much. Thanks! I've learned alot.
     
  15. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    When a 15VAC transformer is rectified by a bridge rectifier and big filter capacitor the peak of 15V AC is 21.2VDC and the diodes in the bridge rectifier reduce the output to about 19VDC which is too high to charge a 12V lead-acid battery.

    If the transformer is 12V then the DC voltage will be about 15VDC which is good. A current-limiting resistor or circuit is needed in the charger circuit.
     
    SgtOneill likes this.
  16. SgtOneill

    Thread Starter New Member

    Jul 10, 2012
    16
    0
    Updated!
    - Larger output caps (680 uF)
    - Filters are now before the amp
    - 4 Diode Bridge Rectifier with 2 filter caps
    - Only 1 12v SLA battery
    - Added a LM317 regulator to 9v to feed the LM386
    - Removed the 10k REsistors at the input

    [​IMG]


    @AudioGuru:
    About the Bass Boost, I dont really know how to amplify the Bass Boost gain to 100.


    Reading this from the datasheet:

    For example, we can compensate poor speaker bass response by frequency
    shaping the feedback path. This is done with a series
    RC from pin 1 to 5 (paralleling the internal 15 kW resistor).
    For 6 dB effective bass boost: R . 15 kW, the lowest value
    for good stable operation is R = 10 kW if pin 8 is open. If pins
    1 and 8 are bypassed then R as low as 2 kW can be used.
    This restriction is because the amplifier is only compensated
    for closed-loop gains greater than 9.

    on the LM386 that feeds the bass speaker I have 50gain that means that pin 1-8 is bypassed with a RC series. So, lowering the Resistor on the bass boost will give me more gain?

    At the moment the resistor on the bass boost is 10K Ohm.
     
  17. SgtOneill

    Thread Starter New Member

    Jul 10, 2012
    16
    0
    I can get a 220v - 12v transformer easily.

    Next i'll do some research for the charging circuit. Hopefully it wont be too messy.
     
  18. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    C14 does not have to be 680μF. Perhaps 47uF should work.
     
    SgtOneill likes this.
  19. SgtOneill

    Thread Starter New Member

    Jul 10, 2012
    16
    0
    found this:

    [​IMG]


    should I add this after the Diodes and before the battery?
    seems simple enough.
     
  20. SgtOneill

    Thread Starter New Member

    Jul 10, 2012
    16
    0
    Updated.
    The image is getting huge, i'll just leave the link:

    Schematics V4
     
Loading...