Measuring Frequency Response with an RTL-SDR Dongle and a Diode

[Hans] wanted to see the frequency response of a bandpass filter but didn’t have a lot of test equipment. Using an RTL-SDR dongle, some software and a quickly made noise generator, he still managed to get a rough idea of the filter’s characteristics.

How did he do it? He ‘simply’ measured his noise generator frequency characteristics with and without the bandpass filter connected to its output and then subtracted one curve with the other. As you can see in the diagram above, the noise generator is based around a zener diode operating at the reverse breakdown voltage. DC blocking is then done with a simple capacitor.

Given that a standard RTL-SDR dongle can only sample a 2-3MHz wide spectrum gap at a time, [Hans] used rtlsdr-scanner to sweep his region of interest. In his write-up, he also did a great job at describing the limitations of such an approach: for example, the dynamic range of the ADC is only 48dB.


  1. jp3141 says:

    That circuit isn’t complete — you need another R from the base of the PNP to ground. 10k-100k would do.

    • Phreaknik says:

      Are you sure? I dont see why it would need the resistor. The diodes should set the base voltage easy enough

      • Gezzor says:

        Yes a resister to ground is needed, where is the current through the biasing diodes and the transistor base current supposed to go without a resister from the base to ground? A properly biased pnp transistor, needs base current exiting the base. As said below, the base-collector leakage current could make this work, but that is not a good design.

        • phreaknik says:

          Isnt that the whole point of this design… It relies on the leakage current to operate, which as you said is not “good” for an amplifier, but as it happens, this is great for a random noise generator

          • hans says:

            You know what, I’ll just unsolder the resistor and see what happens.

          • hans says:

            Alright, the test results are in: I unsoldered the resistor going from the PNP base to ground (I had put it in the circuit, I just forgot to add it to the schematic – sorry guys!).
            Findings: it’s not generating noise. The leakage current theory is hereby busted.

          • Gezzor says:

            Nope. The transistor circuit is a standard (with the resistor from base to ground) current source (D1 Voltage drop / R1), controlling the current through a zener diode in reverse breakdown. According to the article, the noise source is the zener in avalanche mode. If you are looking for just noise from a transistor leaking, you can get rid of the diodes and R1and just connect the transistor base and emitter to the plus voltage and sense the voltage across a resister from the collector to ground.

          • mik says:

            Hans, thanks for clarifying the schem and testing assumptions. very good job :D

    • hans says:

      You are correct, nice catch.

  2. Phreaknik says:

    Now this is hacking! Great work!!

  3. mike says:

    I think there might be a missing resistor from the base to the minus lead to turn on the transistor? Or is it just the off-state leakage current of the PNP driving the zener? If that’s the case what is the purpose of the 2 diodes? Pretty sure it needs a resistor from the base to Batt – terminal.

  4. tekkieneet says:

    The missing resistor is needed to bias the two diodes which along with the PNP + R1 forms a constant current source.

  5. matthew venn says:

    great stuff! This is exactly why I visit hackaday.

  6. Mark A says:

    Why are there two diodes (D1 and D2) and not just 1 diode?

    • tomás zerolo says:

      What you are seeing there is basically a “constant current generator”: the current through R1 will be such that the voltage across R1 equals the voltage across the two diodes (this is an emitter follower).

      But I cheated: the base voltage will be one Veb lower than the emitter voltage (basically one diode voltage; in the silicon world 0.7V, take or give (sometimes generously)).

      So one diode is offsetting the Veb, the other is “defining the voltage across R1″. You could put three or four — but for this to work you’ll have to have always more than one.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,693 other followers