Remove input noise from Electret Condenser Microphone

Hi,
I am trying to modify a circuit for better results. It uses electret condenser microphone for input and is preamplified by general purpose lm381-1 amplifier. The problem is that the circuit is powered by rectified ac mains voltage which produces a small in uV, a ripple of 120Hz frequency, which is destroying the output which is fed to another amplifier. I have tried bypassing capacitors to no success. Then I've tried feeding the inverting input of the lm381-1 amplifier which was previously ground, with the power supply, which is also feeding the electret condenser microphone via a similar capacitor rating from which the dc input from mic is isolated and fed into the non inverting input of lm381-1. The idea is to cancel the noise 120hz signal. It is working in theory in that required noise cancellation is taking place, but unfortunately the two signals are not in phase reducing the efficiency.
Any idea how I can improve the result. I think the resistor and capacitor and mic are producing a phase change, and my one capacitor for inverting input is not matching it. Any help how to improve the result?

A voltage regulator may well solve your problem, but so may better filtering. More than one moderate value capacitor to common, separated by series resistors, will be more effective than simply using one massive reservoir capacitor.

Edit: If you want to use the ripple rejection idea, you need to balance the impedances and gains better on the two sides. The input impedance will normally be much bigger into the non-inverting input, and the gain will be higher. Adding a 4.7KΩ resistor in series from the capacitor on the non-inverting side to +V, may help, but you may need to put resistance from the other side of that capacitor to somewhere else (possibly not ground - unless your circuit uses separate positive and negative supplies a potential divider may be required).

So you are saying that a regulator like lm7805 might help cut out the 120hz ripple?Capacitor values are of 100nF. I am using single powersupply, with a step down transformer, kind of like an adaptor (dc).
This is the effective and complete diagram of the portion of circuit I am trying to clean up.

In the diagram I've pointed as I've understood what u are trying to say.

Here is an electret mic amplifier that another member, AudioGuru, designed and posted awhile back, but with a couple of minor changes;
1) R2 has been decreased to compensate for the TL071's input/output range.
2) R6 has been added to greatly reduce any power supply ripple.

The schematic you have uploaded is missing many parts required for proper operation, the opamp you have chosen to use is obsolete, and your power supply voltage is too low. The LM381 requires at least 9v for proper operation.

Here is an electret mic amplifier that another member, AudioGuru, designed and posted awhile back, but with a couple of minor changes;
1) R2 has been decreased to compensate for the TL071's input/output range.
2) R6 has been added to greatly reduce any power supply ripple.

The schematic you have uploaded is missing many parts required for proper operation, the opamp you have chosen to use is obsolete, and your power supply voltage is too low. The LM381 requires at least 9v for proper operation.

Gosh, that was years ago. If you search for "AudioGuru electret" you will wind up with many pages of posts to look through, and I really don't have that kind of time. You will find some interesting threads, though.

Sorry, It was lm386n-1 not lm381-1, my bad. Here's an image of datasheet of lm386 showing its operating range. I cannot use tlo71 as I am not trying to design a new preamp circuit but trying to clean up an existing one in an equipment. Any idea how to get the two signals in phase for cancellation?

I typed a reply and added a schematic then this website went dead when I pressed POST.

The LM386 is a power amplifier to drive an 8 ohm speaker with up mto 0.4W, not a preamp for a microphone. It is too noisy (hiss) to be a preamp.

Hum from your circuit might be from the power supply that does not have a big enough filter capacitor or might be from using unshielded cable from the mic. Shielded audio cable should be used to avoid hum pickup from the air.

The lm386 is working fine, just need to cancel out 120hz powersupply ripple, the output is going to another amplifier not speaker. I am trying to cancel out the ripple by feeding the inverting input with the power supply transient via capacitor. Plz see the original figure. What I cannot do is get the two inputs at inverting and non inverting pins to come in phase for complete cancellation of signal.

The hum levels at the inputs of the amplifier are not the same and also their phases are not the same so they do not cancel.Why not filter the power to the mic and improve the power supply filter instead like everybody else?

Since I am modifying a given circuit, my hands are tied and options limited. The inverting input is grounded, so I can take out the grounded pin and attach a cap or resister to it for phase matching, leaving the other circuit untouched. Plus on the varoboard I've tried using filtering caps of 100uF values to no avail.

Looking at the diagram; I have checked via oscilloscope, the voltage levels are constant and identical 120hz ripple levels are generated except phase shift is present, I think 180*. When checking, the circled 4.7K resister was not employed. So how can I match the phases?

Why don't you add a bigger filter capacitor to the power supply and add a resistor and capacitor to filter the power to the mic? Maybe adding a filter capacitor to pin 7 will also reduce the hum a lot.

Well then, post your complete circuit, from the power supply through the 386 amp up to the input of the next stage.

Don't leave anything out.

The first circuit you posted was either very incomplete, or the circuit design was extremely poor. If the existing circuit is indeed what you posted, then best to disconnect everything in that circuit, and build a daughterboard based on the schematics that have been posted already.

One can only put so much lipstick on a pig before the pig gets annoyed.