+ Post New Thread
Results 1 to 9 of 9
  1. #1
    Advanced Member level 3
    Points: 5,220, Level: 17

    Join Date
    Jul 2012
    Location
    Epping, Victoria, Australia
    Posts
    984
    Helped
    5 / 5
    Points
    5,220
    Level
    17

    Implementing noise cancellation

    Can anyone tell me if this is a correct principal for noise cancellation.
    In this case it is not for listening to music or what ever, rather to reduce bank ground noise for sleeping purposes.
    So I am assuming I would not need a summing amplifier stage.

    1) Speaker over ear with electret microphone on the back

    2) AC coupled inverting amplifier to generate the inverted anti noise signal come in from the microphone.

    3) Adjustable delay circuit to get simultaneous noise and antinoise in the ear.

    4) Adjustable antinoise volume.

    I could possibly use an ESP32 microcontroller to implement an adjustable delay, because it has both ADC pins and DAC pins.

    But is there a simpler circuit of adjustable analog signal delay?

    •   AltAdvertisment

        
       

  2. #2
    Advanced Member level 5
    Points: 49,719, Level: 54
    Achievements:
    7 years registered
    Audioguru's Avatar
    Join Date
    Jan 2008
    Location
    Toronto area of Canada
    Posts
    8,647
    Helped
    2017 / 2017
    Points
    49,719
    Level
    54

    Re: Implementing noise cancellation

    Bank noise? Are people loudly counting money?

    With the speaker and earphone so close together then I think phase shifts in them will cause booming, howling or whistling feedback sound. They are so close together then a signal delay is not required.
    The phase shifts will require reducing low and high frequencies then you will not have noise cancellation at both ends of the hearing spectrum.

    Why are you re-inventing noise cancelling headphones? Simply buy them instead.



  3. #3
    Advanced Member level 3
    Points: 5,220, Level: 17

    Join Date
    Jul 2012
    Location
    Epping, Victoria, Australia
    Posts
    984
    Helped
    5 / 5
    Points
    5,220
    Level
    17

    Re: Implementing noise cancellation

    Quote Originally Posted by Audioguru View Post
    Bank noise? Are people loudly counting money?

    With the speaker and earphone so close together then I think phase shifts in them will cause booming, howling or whistling feedback sound. They are so close together then a signal delay is not required.
    The phase shifts will require reducing low and high frequencies then you will not have noise cancellation at both ends of the hearing spectrum.

    Why are you re-inventing noise cancelling headphones? Simply buy them instead.
    I thought I might try it out for my missus and see how well it works before committing to purchasing a set from ebay.

    I have been looking at this: https://www.instructables.com/id/Ana...ng-Headphones/

    Opinion?

    Noise: me watching star trek and mucking around with electronics after 10:30pm while my missus wants to sleep. Or car doors slamming or the dog scratching on the door to get out or the toilet flushing,......

    And counting notes noisily would probably wake her up also.




    She is a very light sleeper unfortunately.
    Last edited by boylesg; 5th February 2019 at 07:36.



    •   AltAdvertisment

        
       

  4. #4
    Super Moderator
    Points: 78,154, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,788
    Helped
    4272 / 4272
    Points
    78,154
    Level
    68

    Re: Implementing noise cancellation

    It is a little more complicated than just using a microphone and producing 'anti-noise' to cancel ambient noise. Your main problem as already mentioned is the frequency and phase response of a small microphone has to match that of the earphone. If you get significant phase difference it can go into oscillation, that would definitely wake you up!

    The added complication is that to get as similar sound pickup as your ears, the microphone has to be placed very close to them and have a similar polar response. That would be very difficult to achieve with your head on a pillow, especially if you lie on your side.

    An ESP32 might be capable of doing the job but check it's DAC capability carefully, I think it uses PWM so getting a suitable frequency response might be tricky. You can certainly use it to create an adjustable delay by using a long circular table of ADC measurements and using different write and read points.

    There is a cheap but reliable solution - earplugs!

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   AltAdvertisment

        
       

  5. #5
    Advanced Member level 3
    Points: 5,220, Level: 17

    Join Date
    Jul 2012
    Location
    Epping, Victoria, Australia
    Posts
    984
    Helped
    5 / 5
    Points
    5,220
    Level
    17

    Re: Implementing noise cancellation

    Quote Originally Posted by betwixt View Post
    It is a little more complicated than just using a microphone and producing 'anti-noise' to cancel ambient noise. Your main problem as already mentioned is the frequency and phase response of a small microphone has to match that of the earphone. If you get significant phase difference it can go into oscillation, that would definitely wake you up!

    The added complication is that to get as similar sound pickup as your ears, the microphone has to be placed very close to them and have a similar polar response. That would be very difficult to achieve with your head on a pillow, especially if you lie on your side.

    An ESP32 might be capable of doing the job but check it's DAC capability carefully, I think it uses PWM so getting a suitable frequency response might be tricky. You can certainly use it to create an adjustable delay by using a long circular table of ADC measurements and using different write and read points.

    There is a cheap but reliable solution - earplugs!

    Brian.
    So clearly not a project the average hacker could acheive. More of a projects for those with a degree in electrical engineering.



  6. #6
    Advanced Member level 5
    Points: 49,719, Level: 54
    Achievements:
    7 years registered
    Audioguru's Avatar
    Join Date
    Jan 2008
    Location
    Toronto area of Canada
    Posts
    8,647
    Helped
    2017 / 2017
    Points
    49,719
    Level
    54

    Re: Implementing noise cancellation

    It looks like the headphones block almost all noise frequencies and most feedback frequencies, like earplugs. Then the circuit is not needed!
    The allpass filter delays noise frequencies above 6kHz and the cheap microphone peaks at 5kHz then cuts higher noise frequencies. A better mic should be used.
    The 500k volume control on the student's Instructable is not connected properly so it cuts the anti-noise signal to almost nothing.

    Can you buy noise reduction headphones on ebay that actually work properly??



  7. #7
    Super Moderator
    Points: 78,154, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,788
    Helped
    4272 / 4272
    Points
    78,154
    Level
    68

    Re: Implementing noise cancellation

    The other difference in your idea and the 'instructables' and I would guess with products you could buy is they are designed to listen to music rather than eliminate all outside sounds. That means they only have to be partially effective and such things as self-created noise is less relevant when it would be drowned out anyway.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   AltAdvertisment

        
       

  8. #8
    Advanced Member level 3
    Points: 5,220, Level: 17

    Join Date
    Jul 2012
    Location
    Epping, Victoria, Australia
    Posts
    984
    Helped
    5 / 5
    Points
    5,220
    Level
    17

    Re: Implementing noise cancellation

    Quote Originally Posted by Audioguru View Post
    It looks like the headphones block almost all noise frequencies and most feedback frequencies, like earplugs. Then the circuit is not needed!
    The allpass filter delays noise frequencies above 6kHz and the cheap microphone peaks at 5kHz then cuts higher noise frequencies. A better mic should be used.
    The 500k volume control on the student's Instructable is not connected properly so it cuts the anti-noise signal to almost nothing.
    Yeah I did notice the incorrect connection of the POT - assumed it was an inadvertent mistake when he drew up his schematic.

    Quote Originally Posted by Audioguru View Post
    Can you buy noise reduction headphones on ebay that actually work properly??
    Exactly why I did not want to rush out and buy a set. Do they actually work reliably as stated?



  9. #9
    Advanced Member level 5
    Points: 49,719, Level: 54
    Achievements:
    7 years registered
    Audioguru's Avatar
    Join Date
    Jan 2008
    Location
    Toronto area of Canada
    Posts
    8,647
    Helped
    2017 / 2017
    Points
    49,719
    Level
    54

    Re: Implementing noise cancellation

    Use the headphones without the circuit. The headphones will block most noise.
    Very expensive noise reducing headphones work well.



--[[ ]]--