# Why does a classic envelope detector produce a negative voltage for some periods, when high frequencies are put in?

I'm playing around in ngspice & trying to understand envelope detectors for ham radio.

I'm pumping 150Mhz into the circuit described below - I'm expecting it to go positive in proportion to amplitude + frequency. After a bit, it goes negative. Whats happening here?

Consider this circuit:

• 150Mhz 2V sine wave input, 50ohms impedance
• D1N4148 diode
• 100pF smoother capacitor

Spice input I'm using / working on:

Detector CIRCUIT
.model D1N4148 D (IS=0.1pA, RS=16 CJO=2pF TT=12N BV=100 IBV=0.1pA)

v1 1 0 sin(0 2 150MEG)

rSOURCE 2 1 50

d1 2 3 D1N4148

c1 3 0 100p

.control
tran 5us 50ms
run
write kek.raw v(3)
quit
.endc
.end


Gives me this:

Note the negative sections.

How does a diode detector go negative like this? how do I stop it?

• The 1N4148 diode has a frequency limit of about 50 MHZ at 50% duty cycle. You need a UHF diode for this to work.
– user105652
Sep 7, 2018 at 1:56
• Yes but he was getting < 1nV output > Warning Will Rogers. Sep 7, 2018 at 3:48
• Don't forget to check the scale of the Y-axis: it's between 1e-9 and 8e-10. That should tell you something. Sep 7, 2018 at 7:19

v1 1 0 sin(0 2 150MEG)
...
tran 5us 50ms

=====

What's wrong with this picture?

==

The sampling time is violating Shannon's Law. Measurement error.

What is the diode spec?

• Rectification efficiency $V_{HF} = 2 V, f = 100 MHz ~~~ η_r = 45 \text{%}$

It won't work well because recovery time is 4ns with 100 Ohm load and yours is only 500k.

Although Cj=2pF is ok. ( even though max in the datasheet is 4pF )

As @Sparky256 said try a UHF diode.

These have faster recovery time than 8ns on a signal with a 6.7ns cycle time. This is why efficiency is poor at 100MHz and worse at 150MHz.

Try a Falstad simulator. Limited parameters no custom parts. You make the passive part models and LOGIC, OA's have 0 Ohms out. Same with Voltage sources.

Press Reset anytime.

• It was indeed Shannon's Law, thanks! I upped the resolution of the simulation and let it run for a few minutes and the waveform looks much better. Sep 7, 2018 at 9:16
• Falstad's sim is much faster real time , fast or slow motion > options> other options> sampling time or mouse wheel over scope trace Sep 7, 2018 at 12:54