Hi guys. I am using a voltage comparator to detect the peak voltage of a source.
And I want to realize a correct peak detection (see Fig. 4) with the schematic below (Fig. 1). But it works wrong (see Fig. 2).
However, if I drop the GND between D3 and D4 (see Fig. 3), it comes the right waveforms (Fig. 4).
The schematic in Fig. 1 is a part of a more complex circuit. I need the GND between D3 and D4. So is there something I can improve in the peak detector module to fix this problem? The attached is the simulation file of LTSpice. Thx!

Fig. 1. Schematic with the GND between D3 and D4

Fig. 2. Wrong waveforms

Fig. 3. Schematic without the GND between D3 and D4

Fig. 4. The right waveforms
And I want to realize a correct peak detection (see Fig. 4) with the schematic below (Fig. 1). But it works wrong (see Fig. 2).
However, if I drop the GND between D3 and D4 (see Fig. 3), it comes the right waveforms (Fig. 4).
The schematic in Fig. 1 is a part of a more complex circuit. I need the GND between D3 and D4. So is there something I can improve in the peak detector module to fix this problem? The attached is the simulation file of LTSpice. Thx!

Fig. 1. Schematic with the GND between D3 and D4

Fig. 2. Wrong waveforms

Fig. 3. Schematic without the GND between D3 and D4

Fig. 4. The right waveforms
Attachments
-
1.9 KB Views: 3

