4 Replies Latest reply on Jan 27, 2020 4:58 PM by kmikemoo

    Question on Harmonics and Filters

    kmikemoo

      A discussion going on about filters at Episode 355: Raspberry Pi Pirate Radio has me wondering.  I have always thought about harmonics (and the need to filter them out) as things that happen above the base frequency; 3rd, 5th, 9th, etc.  Is there such a thing as sub-harmonics?

       

      If my primary issue is harmonics (bit banged Raspberry Pi RF output), why go for a bandpass filter over a lowpass filter?     Thanks in advance.

        • Re: Question on Harmonics and Filters
          shabaz

          Hi Mike,

           

          I may not have understood the use-case (I didn't follow it entirely). As I understood, the Pi was generating something at some low-ish frequency (e.g. 10 MHz) and a harmonic of that (i.e. an exact multiple) was what was desired to be listened to on the radio.

          In that case, all the harmonics below the desired one need to be removed as well as the ones above it.

          The OP however was trying to finely bandpass filter down to a few tens of kHz bandwidth, which was impossible with the topology he had, and I couldn't understand why.

           

          Is my understanding incorrect? From what you mention, it sounds like perhaps the Pi instead generates FM directly at the correct frequency, and therefore the harmonics are just exact multiples above this. That may be the case, I don't know.

          3 of 3 people found this helpful
          • Re: Question on Harmonics and Filters
            fmilburn

            Good question Mike.  I had the same thought to be honest but did not pursue it.  I found this post from the Imperial College Robotics Society (unrelated fact: I used to walk by Imperial College on my way to work when I lived in London)  which developed the method:  Turning the Raspberry Pi Into an FM Transmitter - Imperial College Robotics Society .  They have since made it stereo!  From their posting...

             

            it sets the clock generator module to enabled and sets it to output on GPIO4 (no other accessible pins can be used). It also sets the frequency to 100.0Mhz (provided from PLLD@500Mhz, divided by 5), which provides a carrier. At this point, radios will stop making a "fuzz" noise, and become silent.  Modulation is done by adjusting the frequency using the fractional divider between 100.025Mhz and 99.975Mhz, which makes the audio signal.

            There might be lower frequency noise from elsewhere picked up and present in the signal as well but I have no real idea.

            3 of 3 people found this helpful
              • Re: Question on Harmonics and Filters
                shabaz

                Ahh interesting! In that case Mike your're certainly right, a low-pass is all that's needed. Sorry, I should have looked into it before I assumed wrong that it was being generated at some lower freq : (

                Hehe that's really interesting Frank that you used to walk past IC. I was there doing EE, and Workshopshed studied there too!

                EDIT: I remember now.. seeing the bandpass attempt being mentioned on the video, I'd wrongly assumed that was required (i.e. that the signal was being generated at a lower-freq square-wave).

                3 of 3 people found this helpful
                • Re: Question on Harmonics and Filters
                  kmikemoo

                  fmilburn Thanks for the link.  It was extremely helpful.  It gives me hope that it will work on slightly higher frequencies - like 146MHz.  We'll see... once the new RPi3 comes in.  I managed to kill mine over the weekend.  Not sure how but all I get is the lightning bolt of death.