1
\$\begingroup\$

I am a bit confused on how this schematic works. It looks as if when we do not have any data coming in (i.e. 0V constant) from pin 3 on the DB-9 then the transistor will be off and the RESET will be pulled high as a consequence.

Now, say that the line 3 from the DB-9 goes HIGH, what happens then? Assuming the supply voltage from the connector is 5V, you can solve for the voltage at the base of the transistor, where you get ~2.57V.

Now that the transistor is on, how is the RESET driven low? Isn't it that the collector of a transistor is reverse biased in saturation mode? With that, we can approximate the collector voltage (and consequentially the RESET pin voltage) to be (2.57+0.7)V = 3.27V.

What is the threshold voltage for a RESET event generally?

Also, what are the purposes of each of the diodes in this schematic? Why is it needed to have a diode inline with the resistors off pin 3? Why are there diodes on pins 7 and 4?

enter image description here

\$\endgroup\$

4 Answers 4

3
\$\begingroup\$

If the voltage on the transistor's base is greater than 0.7V it will conduct, and pull the reset line low. Otherwise the line is kept high by the 10k resistor on the right. To get 0.7 V to the transistor you actually need another 0.7V to overcome the diode, so a voltage higher than 1.4V on pin 3 of the connector will create a reset. The diode 1N4148 is there to prevent that the base voltage goes too low when the signal is -12V. Such a low voltage might damage the transistor.

The two zener diodes will clip the input voltages to 5.1V (when the inputs are +12V), or to -0.7V (when the inputs are -12V). voltages higher than 5.1V or lower than -0.7V would damage your microcontroller.

\$\endgroup\$
2
  • \$\begingroup\$ The application of the zener diodes make good sense in this context; they are essentially providing a basic design for voltage level shifting. However, consulting the datasheet for one of the transistor models given in the schematic informs that a maximum collector-base voltage upwards of 80V is allowed, so I am not too sure a diode would be required to protect against dangerous voltage levels. \$\endgroup\$
    – sherrellbc
    Commented Dec 18, 2013 at 16:28
  • 1
    \$\begingroup\$ @sherrellbc: transistors only allow that the base goes a few volts (about 5V) below the emitter, which is at ground level (0V). If the input levels are RS-232, then that's either +12V or -12V. The 12V on the base will destroy the transistor, no matter how high the collector voltage can be. \$\endgroup\$
    – amadeus
    Commented Dec 18, 2013 at 16:57
2
\$\begingroup\$

If the transistor is conducting, you basically have a short to ground on the reset line. The 15k resistor is a pulldown (to shut the transistor by default), the 10k resistor is a pull-up on the reset line.

The threshold is given in the datasheet for the part you intend to use. I'd say everything lower than 0.2V qualifies as low.

Diodes on 4 and 7 limit the voltage to 5V1 (those are zener diodes); the 1N4148 makes sure that no current runs to the RS232 device (which could make the transistor non-working)

\$\endgroup\$
5
  • \$\begingroup\$ I had forgotten about the zener diodes and their regulation applications. Thank you. However, if it were true that the 1N4148 was placed to ensure no current would flow into the RS232 device, why are there not diodes on all other pins as well? \$\endgroup\$
    – sherrellbc
    Commented Dec 18, 2013 at 16:22
  • \$\begingroup\$ I suspect that the diode may be a precaution because this is an RS-232 line that is doing the driving. It has positive and negative voltages on it. Without the diode, the transistor base could be pulled more negative than the emitter. \$\endgroup\$
    – Kaz
    Commented Dec 18, 2013 at 16:22
  • \$\begingroup\$ Also, for current to flow back into the RS232 device it would be required that the base voltage of the transistor be less than 0V, and even further that the RS232 supply voltage be even lower yet. I am not entirely sure but I am going to go out on a limb here and say that the PC does not have the capacity for negative voltages. That being said, we would never have the case where current would flow back into the device anyway .. so why have the diode? \$\endgroup\$
    – sherrellbc
    Commented Dec 18, 2013 at 16:23
  • \$\begingroup\$ Real RS232 is +-12V, so the voltage can be negative. \$\endgroup\$
    – pjc50
    Commented Dec 18, 2013 at 16:25
  • \$\begingroup\$ I see. Well in that case it would make sense then that the diode could be there to protect the PC from current sinking. \$\endgroup\$
    – sherrellbc
    Commented Dec 18, 2013 at 16:26
1
\$\begingroup\$

Isn't it that the collector of a transistor is reverse biased in saturation mode?

I can't make sense of this statement, but what you derive from it is not correct: the collector voltage will be approximately that of the emitter because there is a base-emitter current flowing that will pull current out of the reset.

Pin 3 is DTR or similar, which can be controlled separately from the data lines. If I remember rightly, +12V corresponds to a logic 0 (yes, it's upside down). That will turn the transistor on, pulling the reset line down.

So the normal action of open serial port / write data / close serial port will hold the processor in reset while programming it (this looks like an ISP emulator?)

\$\endgroup\$
3
  • \$\begingroup\$ That statement is referring to this: en.wikipedia.org/wiki/… \$\endgroup\$
    – sherrellbc
    Commented Dec 18, 2013 at 17:02
  • \$\begingroup\$ Also, I realized that the voltage levels derived in the original post are incorrect, but there is not much sense in updating it now. \$\endgroup\$
    – sherrellbc
    Commented Dec 18, 2013 at 17:10
  • \$\begingroup\$ That web page states, "With both junctions forward-biased, a BJT is in saturation mode". In this state, the voltage of the base is higher than that of the collector. \$\endgroup\$
    – pjc50
    Commented Dec 19, 2013 at 10:18
0
\$\begingroup\$

When in saturation, the base-collector junction is forward biased. Typically for a saturated transistor, Vbe is ~0.7 volt and Vce is ~0.2 volt. Contrary to the first answer, my rough calculation indicates you would need more than +2.33 volts at pin 3 of the RS-232 connector to switch on the transistor.

When the transistor is off, Vb = 0.6V3 - 0.7, so with V3 = +1.4 volt, Vb = +0.14 volt.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.