PWM and audio noise


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: PWM and audio noise

    What are you using to connect to the jacks, how far apart are they, what does the board layout looks like, is there a ground plane, is there a decoupling cap on the PIC, how does the 9V ground relate to whatever you have connected, and probably a few more questions once you answer these. There are pretty sharp edges on the steps, so you may be generating RF that is rectified by whatever you are using to listen to audio.

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: PWM and audio noise

    Where is the .1Uf decoupling cap directly at the PIC power pins?
    Dave Purola,
    N8NTA
    EN82fn

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: PWM and audio noise

    Quote Originally Posted by Dave View Post
    Where is the .1Uf decoupling cap directly at the PIC power pins?
    I added at .1uF to the 5v and that did seem to reduce the noise a bit. Not to an acceptable level, but it did help.

  4. #4
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: PWM and audio noise

    Add capacitors close to noise source(right across pin of PIC). 1,10 and 100nF in parallel.
    Also Breadboard have large capacitance between 2 rows of pin. Try to put ground next to PWM pin.
    Use short leads, as stray inductance plays large role. Also try to create star ground point.

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: PWM and audio noise

    I agree, Where did you place the .1Uf cap? At the supply? If it work's at all in reducing the noise, then you are on the right track.
    Dave Purola,
    N8NTA
    EN82fn

  6. #6
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: PWM and audio noise

    On larger projects I may use over a dozen 0.1 uF (and one or two 0.01 uF) caps to filter board noise. I also add 10 uF and 100 uF caps near the power supply. I filter both the input to the LM7805 and the output. I use a 47 or 100 ohm resistor between my power source and voltage regulator to further filter the power supply. Invariably, whenever I'm getting unexpected behavior, it's often due to insufficient capacitive filtering. In other words, wherever you think, then add another one or two.

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: PWM and audio noise

    Like someone suggested above. You should try to increase the frequency of your PWM. A 1khz square wave will have strong harmonics at 3khz, 5khz and 7khz. Thats right in the middle of the audio range. Then you start stepping thru the duty cycle, this will alternate between odd and even harmonics.

    Easy fix unless I'm missing something

    Change this
    Code:
    PWM 1, Duty, 1000
    to this
    Code:
    PWM 1, Duty, 20000

  8. #8


    Did you find this post helpful? Yes | No

    Default Re: PWM and audio noise

    Quote Originally Posted by Charlie View Post
    What are you using to connect to the jacks, how far apart are they, what does the board layout looks like, is there a ground plane, is there a decoupling cap on the PIC, how does the 9V ground relate to whatever you have connected, and probably a few more questions once you answer these. There are pretty sharp edges on the steps, so you may be generating RF that is rectified by whatever you are using to listen to audio.
    I'm using a small bread board. The PIC and power supply are on one side of the bread board. The jacks are on the other side. The jacks are your typical enclosed 1/4" stereo jack like a Switchcraft 112BX. I'm using some higher end shielded instrument cables to connect to a guitar and a little test amp on my bench.

Similar Threads

  1. Play & Record PWM audio?
    By Art in forum General
    Replies: 8
    Last Post: - 12th April 2015, 11:45
  2. Replies: 1
    Last Post: - 4th March 2013, 21:57
  3. Fan causing noise in audio circuit
    By The Master in forum Off Topic
    Replies: 11
    Last Post: - 28th August 2011, 11:47
  4. PWM - Mosfet/motor introducing noise
    By DynamoBen in forum Off Topic
    Replies: 11
    Last Post: - 18th October 2007, 15:37
  5. Input Noise
    By PJALM in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 28th February 2006, 19:26

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts