# Diode in parallel with resistor

SE,

I've used the SE:EE forum search and several search engines internet and haven't found a single question similar to mine. But I don't think that it's that complicated, I'm just having a hard time grasping what's going on.

The output from pin 1 is a square wave signal with a peak of 14V. The Scope picture shows the reading at pin 5.

Why is there a diode parallel to the resistor? What does it do? If I'm putting a square wave through this circuit, why is it coming back as saw tooth?

I'm having a hard time visualizing when the diode opens, what happens to the rest of the circuit and why I'm getting the output at pin 5.

• Charge time through resistor (long) - discharge time through diode (short) - see also 555 PWM May 15, 2015 at 13:18
• BattleHamster - I tried to include the pictures but they said they were too big. That's why I used the links.
– Luke
May 15, 2015 at 13:25
• @Luke: Yes, they're way too big. Next time please scale them down before posting. On SE images are only shown at most 630 pixels wide. May 15, 2015 at 13:37

The diode is there to discharge the capacitor quickly.

If the output of U3A is high the diode is reversed polarized, so you can ignore it then. Then C7 gets charged via R22 with a time constant of 4 ms. That means it takes about 20 ms to charge completely.

If the output of U3A is low the diode conducts and discharges C7 very quickly, which you can see as the sharp falling edge on the scope.

• I can't get my head wrapped around why doesn't the diode conduct when the output is high? Shouldn't voltage flow to the anode of the diode and then open it?
– Luke
May 15, 2015 at 13:29
• When the output is low the capacitor discharges to nearly 0 V (or negative if the comparator has a dual supply). When the output then gets high again the cathode voltage will be higher than the anode, for instance +5 V versus 0.7 V. In that case a diode doesn't conduct. To conduct the anode has to be at least 0.7 V higher than the cathode. May 15, 2015 at 13:34
• AHHHH!!! That makes perfect sense! I was always puzzled by that. If there's no diode, the cap just discharges much slower because there's a resistance compared to a short. Correct?
– Luke
May 15, 2015 at 13:38
• One last question about diodes. Is the maximum voltage a diode provides is 0.7V (I know it depends on the spec but for the sake of example lets say 0.7V)? Or if we're putting 5V across the diode, it drops the 0.7V and now only allows 4.3V to pass?
– Luke
May 15, 2015 at 13:41
• No, when the output is +5 V you can ignore the diode: there's no current through it, so it doesn't play a role. When the output would be -5 V (with a symmetrical power supply) the capacitor's voltage will indeed not go below -4.3 V. May 15, 2015 at 13:46