## Mad scientist: How to cancel out hum of known amplitude from signal of unknown amplitude?

2

I like investigating real-world phenomena through sound, and this time I am checking out lamps. I have following scheme:

I have noticed that each lamp type distorts 50hz mains tone in its own unique way. More like same string would produce variable tones on a different guitar hulls. Now I want to obtain that distortions. So channel 2 (right) passes mains noise undistorted, and channel 1 (left) records that signal distorted.

Signal2 (R) has quite fixed level, which changes a little (stable 50hz/230v mains voltage in my country, with change no more than 5%). But Signal1(L) can change alot, dependant on how far did i fixed lamp away from panel, and how powerful and efficient the particular lamp is.

Question is - how to substract original signal2, if i dont know signal1 level, or the level can vary?

PS. This would be done digitally on a PC, using C language. But before substrating second recording from first, I need to get a clue on how to "normalize" first signal levels to match those of a second, at 50hz main harmonic?

PPS. for those who was curious how samples could look like:

2

For there to be any chance of 'subtraction' to work, there must be a phase-relationship between the two signals, which there is not likely to be in any of the cases you suggest.

To understand why there is no phase relationship, consider the fact that with AC the voltage varies between a positive value (where the electrons travel in one direction) and a negative value (where the electrons travel in the opposite direction). In the example you have shown you are making the assumption that there is actually a concept such as "negative light" where photons travel in the opposite direction when interacting under an assumed "negative" potential. This simply does not exist.

The energy that is being generated by the light bulb will be constant and will depend on the RMS level of the AC current. There is no such thing as "negative" potential when considering light.

In any case, I would not suggest you use a voltage divider to capture the signal from the mains. I would suggest you use a small hand-wound transformer should this be a requirement for the project. This will isolate the mains circuit from the required audio input.

Additionally, you need to ensure that the signal being captured into channel 1 (From the solar panel) is not subject to any mains induction. Looking at your circuit I fear it it highly likely that there is a high probability that mains induction could occur, rendering it difficult to isolate the required signal from the mains induction.

That is a great remark about galvanic isolation, I could add a transformer. But as for phase-relationship, I cannot get the reason why should signals be off-phase? Same mains produce light, same mains was recorded - they should be either identical, either with fixed phase offset (if transformer or light emitter could shift phase apart) – xakepp35 – 2019-01-09T14:54:56.610

I updated my answer to better explain why there is no phase-relationship between the two signals. – Mark – 2019-01-10T00:36:49.010

probably, couple of band reject filters at 50hz and 100hz could work, or even i may train some frequency-based denoiser, recording first few seconds in absolute darkness (that would measure "idle" frequency response, and potentially could help to cancel out measurement stack noise: that is all kind of induction hum, light panel noise, preamp noise, adc noise,so on) – xakepp35 – 2019-01-10T02:40:00.083