MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

2n3904 White Noise with LM386 AMP help
MUFF WIGGLER Forum Index -> Music Tech DIY  
Author 2n3904 White Noise with LM386 AMP help
ronski
Hi there,

I'm trying to build a white noise generator that powers a 0.5 Watt 8ohm speaker. I want the circuit to be battery powered, I've have managed to build the two circuits I need for this separately but I'm running in to problem when I'm trying to combine the two.

At first I powered both of them separately, white noise with 18 volts, and the amp circuit with 9 volt. I have the output signal from the white noise gping straight into pin number 3 of LM386. Ideally I want to use a photo resistor to control the volume of the white noise but this didn't work so far. I've had occasions that I didn't get any signal from the speaker, but did get a white nise signal when I would disconnect the input to the LM386. As if the signal was some how bleeding in somewhere else.

My next step was to try and power everything from one source, this I did with a L7812. I connected two 470 uF electrolytes to GND on both the in and output pins of the L7812. With the output of l7812 I powered the LM386 circuit. This seemed to work, but was super loud. Putting a pod, a photo resistor or a regular resistor in for volume control didn't seem to work.

I feel like I'm making an essential mistake here when combining these two circuits. I lack the knowledge, I never have any issues building circuits on a bread board but when I start combining things I usually get in trouble. I hope this makes sense and someone can give me some advice



Synthiq
The dc voltage at the output of the noise circuit is many volts while the LM386 input expects a signal centered around ground so you need a dc blocking capacitor between the output and the input. A 2.2uF capacitor or larger should work. If you use an electrolytic capacitor, connect the positive side to the noise source.
ronski
Thanks that has helped a lot. Still having trouble incorporating a photo resistor.
I'm trying to install that instead of the potentiometer in the schematic. I tried adding a electrolytic cap to the output of the photo resistor but that didn't really do the trick. The photocell seems to introduce some kind of hiss. En when it gets either very dark or very light the LM386 seems to pop on and off. Or occasionally I get this repetitive cracking sound. (a bit like a slow unstable lfo)

Another issue I have is that the LM386 circuit only works properly when I remove C1 and R1. If their in place I get a high pitched tone into the white noise.

I'm using 2x 470uF on the speaker output, not 1000 like in the schematic.

Hope I can get some more help



Synthiq wrote:
The dc voltage at the output of the noise circuit is many volts while the LM386 input expects a signal centered around ground so you need a dc blocking capacitor between the output and the input. A 2.2uF capacitor or larger should work. If you use an electrolytic capacitor, connect the positive side to the noise source.
ronski
I'm also wondering if I can go down with the caps I'm using for the L7812 regulator. At the moment it's two 470uF caps, but I feel this is way to much for what I'm doing. How does such a thing effect the circuit, does it just draw more current?
Synthiq
ronski wrote:
I'm also wondering if I can go down with the caps I'm using for the L7812 regulator. At the moment it's two 470uF caps, but I feel this is way to much for what I'm doing. How does such a thing effect the circuit, does it just draw more current?

Most datasheets for 7812 type regulators use 0.33uF at the input and 0.1uF at the output. I think the function is mostly for stability so it doesn't oscillate at a high frequency. Large electrolytic capacitors normally have a high inductance at higher frequencies and are poor decoupling capacitors and are better at supplying energy to the regulator and load than providing stability. In general, it is recommended to have a small capacitor in parallel with the large one if you have one as an energy reservoir.
Synthiq
ronski wrote:
I'm trying to install that instead of the potentiometer in the schematic. I tried adding a electrolytic cap to the output of the photo resistor but that didn't really do the trick. The photocell seems to introduce some kind of hiss. En when it gets either very dark or very light the LM386 seems to pop on and off. Or occasionally I get this repetitive cracking sound. (a bit like a slow unstable lfo)

Is it correct that you want to use the photoresistor to increase the noise level when the light becomes brighter? If so, I would try to connect one side of the photoresistor to the negative side of the dc blocking capacitor and the other side to the LM386 input and a resistor to ground. The photoresistor and fixed resistor will form a variable attenuator just like the potentiometer and the dc voltage at the input should be centered at 0V no matter the resistance in the photoresistor. The dc output voltage should also be centered at Vdd/2 independent on the light level so check that as well.
ronski
Synthiq wrote:

Most datasheets for 7812 type regulators use 0.33uF at the input and 0.1uF at the output. I think the function is mostly for stability so it doesn't oscillate at a high frequency. Large electrolytic capacitors normally have a high inductance at higher frequencies and are poor decoupling capacitors and are better at supplying energy to the regulator and load than providing stability. In general, it is recommended to have a small capacitor in parallel with the large one if you have one as an energy reservoir.


Thanks that seems to work really well. I didn't have a ceramic cap of 0.33uF so I used a Film Cap but that seems fine, or is should I really be using a ceramic here.
ronski
Synthiq wrote:

Is it correct that you want to use the photoresistor to increase the noise level when the light becomes brighter? If so, I would try to connect one side of the photoresistor to the negative side of the dc blocking capacitor and the other side to the LM386 input and a resistor to ground. The photoresistor and fixed resistor will form a variable attenuator just like the potentiometer and the dc voltage at the input should be centered at 0V no matter the resistance in the photoresistor. The dc output voltage should also be centered at Vdd/2 independent on the light level so check that as well.


I've added the photoresistor as you proposed. I've measured the dc voltage at the input and that's 0.017 volt, the output has 0.012. I've used a 1K resistor and it kind of works but I get this oscillating effect at lower light conditions. I've uploaded a Video that shows this. Thanks so much for your help!
Synthiq
ronski wrote:
Synthiq wrote:

Most datasheets for 7812 type regulators use 0.33uF at the input and 0.1uF at the output. I think the function is mostly for stability so it doesn't oscillate at a high frequency. Large electrolytic capacitors normally have a high inductance at higher frequencies and are poor decoupling capacitors and are better at supplying energy to the regulator and load than providing stability. In general, it is recommended to have a small capacitor in parallel with the large one if you have one as an energy reservoir.


Thanks that seems to work really well. I didn't have a ceramic cap of 0.33uF so I used a Film Cap but that seems fine, or is should I really be using a ceramic here.


I think it will be fine, but if you are worried you can always place a 0.1uF ceramic capacitor in parallel. Maybe someone else knows more?
Synthiq
ronski wrote:
Synthiq wrote:

Is it correct that you want to use the photoresistor to increase the noise level when the light becomes brighter? If so, I would try to connect one side of the photoresistor to the negative side of the dc blocking capacitor and the other side to the LM386 input and a resistor to ground. The photoresistor and fixed resistor will form a variable attenuator just like the potentiometer and the dc voltage at the input should be centered at 0V no matter the resistance in the photoresistor. The dc output voltage should also be centered at Vdd/2 independent on the light level so check that as well.


I've added the photoresistor as you proposed. I've measured the dc voltage at the input and that's 0.017 volt, the output has 0.012. I've used a 1K resistor and it kind of works but I get this oscillating effect at lower light conditions. I've uploaded a Video that shows this. Thanks so much for your help!

If you have a 1kohm resistor between the input and ground and you see 17mV across it, you have way too much dc current flowing in that resistor. Maybe you have a lot of leakage current in your dc blocking capacitor?

If the output is only 12mV above ground, something is wrong. Are pin 1, 7 and 8 left floating and not connected to something? With the noise source disconnected from the LM386, measure the ac voltage after the 1000uF capacitor to see if you may have a high frequency oscillation that might be there but too high to hear. I think the RC network at the output that you removed might be there to prevent that, but now I'm starting to speculate.
ronski
Synthiq wrote:
ronski wrote:
Synthiq wrote:

Is it correct that you want to use the photoresistor to increase the noise level when the light becomes brighter? If so, I would try to connect one side of the photoresistor to the negative side of the dc blocking capacitor and the other side to the LM386 input and a resistor to ground. The photoresistor and fixed resistor will form a variable attenuator just like the potentiometer and the dc voltage at the input should be centered at 0V no matter the resistance in the photoresistor. The dc output voltage should also be centered at Vdd/2 independent on the light level so check that as well.


I've added the photoresistor as you proposed. I've measured the dc voltage at the input and that's 0.017 volt, the output has 0.012. I've used a 1K resistor and it kind of works but I get this oscillating effect at lower light conditions. I've uploaded a Video that shows this. Thanks so much for your help!

If you have a 1kohm resistor between the input and ground and you see 17mV across it, you have way too much dc current flowing in that resistor. Maybe you have a lot of leakage current in your dc blocking capacitor?

If the output is only 12mV above ground, something is wrong. Are pin 1, 7 and 8 left floating and not connected to something? With the noise source disconnected from the LM386, measure the ac voltage after the 1000uF capacitor to see if you may have a high frequency oscillation that might be there but too high to hear. I think the RC network at the output that you removed might be there to prevent that, but now I'm starting to speculate.


I have disconnected the audio output going towards the LM386 and I can still hear white noise coming out from the speaker. Only when I disconnect the current powering the white noise circuit this stops. I feel somehow this white noise is making its way into the LM386, maybe over the 12 volt lines?

I've made a drawing of the circuit as it is now, I have the resistor at the photo resistor going to ground on the output. [/img]

Synthiq
ronski wrote:
I have disconnected the audio output going towards the LM386 and I can still hear white noise coming out from the speaker. Only when I disconnect the current powering the white noise circuit this stops. I feel somehow this white noise is making its way into the LM386, maybe over the 12 volt lines?

You can try to place a few uF between pin 7 (bypass) and ground to see if it helps to filter out any supply coupling. One circuit in the datasheet used a 10uF capacitor so that could be a start.
flagada
I once had a similar issue when i tried to power 2 circuits (one of which was a lm386 amp) off a single 9V battery. I solved it as follows:
Code:

                            ----  R1
         ------------------|    |-----------------------  +9V
        |               |   ----   |            |
 ----------------      ---        ---     ------------
|                |     ---        ---    |            |
| noise          |      | C1       | C2  | amplifier  |
|                |      |          |     |            |
 ----------------       |          |      ------------
        |               |          |            |
         ------------------------------------------------ 0V

The value of the resistor was 270 ohm, the value of the elco's was 100uF. You might try even higher values's e.g. 470 uF.
ronski
Thanks! [/img]I've tried that now and also the added the cap and elco from the image below (mfos webpage) Sadly no success.



Synthiq wrote:
ronski wrote:
I have disconnected the audio output going towards the LM386 and I can still hear white noise coming out from the speaker. Only when I disconnect the current powering the white noise circuit this stops. I feel somehow this white noise is making its way into the LM386, maybe over the 12 volt lines?

You can try to place a few uF between pin 7 (bypass) and ground to see if it helps to filter out any supply coupling. One circuit in the datasheet used a 10uF capacitor so that could be a start.
ronski
Cheers for that, also tried this but this stopped signal coming through towards the LM. Seemed so simple to combine these circuits but looks more and more complex....

flagada wrote:
I once had a similar issue when i tried to power 2 circuits (one of which was a lm386 amp) off a single 9V battery. I solved it as follows:
Code:

                            ----  R1
         ------------------|    |-----------------------  +9V
        |               |   ----   |            |
 ----------------      ---        ---     ------------
|                |     ---        ---    |            |
| noise          |      | C1       | C2  | amplifier  |
|                |      |          |     |            |
 ----------------       |          |      ------------
        |               |          |            |
         ------------------------------------------------ 0V

The value of the resistor was 270 ohm, the value of the elco's was 100uF. You might try even higher values's e.g. 470 uF.
Synthiq
So if I understand you right, noise reaches the LM386 only if there is no filter on the supplies between the noise source and amplifier as suggested by flagala but it doesn't matter if you connect the noise output to the amplifier input or not. Maybe there is something wrong with the LM386 chip itself. The dc voltages at the LM386 input and output you reported earlier still seems unreasonable to me and makes me suspect it might be faulty.
MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 1
Powered by phpBB © phpBB Group