I have designed a program to count the frequency and time period of the pulse generated by a 555 timer IC using PC Parallel port. I’ve connected a base of BC547 (NPN) transistor to the output pin (no. 3) with a resistor of multiple values to the IC and its emitter to the common ground. Parallel port Input pin is connected to the Collector and its ground pin is also connected to the common ground. As shown:

enter image description here

R1 = 1440 Ohms; R2 = 3.3 M Ohms; C1 = 1 micro farad.

So the; time period of ON pulse = time period of OFF pulse = 2.2 sec.

When I connect LED to output pin it shows right value but when I connect transistor it displays wrong values. In this ratio:

Greator Resistor = Greator Time period; Lessor Resistor = Lessor Time period.

I don’t know how to connect right resistor to display the right values.

The circuit is powered by 6volt @ 250mA power supply.

If there is any equation for this purpose please provide here.


3 Answers 3


Use 10kΩ for R3.

I didn't look up a BC547, but if that's a typical small signal transistor as it should be, figure a gain of at least 50. 6V supply minus 700mV B-E drip leave 5.3V accross the resistor. 5.3V / 10kΩ = 530µA. Times the gain of 50, and that can support over 25mA of collector current. That's well more than any reasonable digital input will require, even if it has a pullup connected.

As others have said, you may need a pullup if whatever you are driving doesn't passively make the line go high. However, make sure the pullup goes to same voltage as the power supply of whatever will receive the digital signal. Your supply is 6V, which is probably higher than the receiver's supply. That could cause the receiver to not work or even to damage it if its power voltage is significantly lower.


Your problem is probably that you also need a so-called pull-up resistor between the collector of the transistor and the positive voltage (+5V).

As for the basis resistor, there are two constraints:

  1. The resistor value should be small enough to switch the transistor completely on when the output of the 555 is high. So you have to consider the voltage on the basis (+5V - 0.7V) and the current you need through the basis, which must be greater than the current you need through the collector to pull the voltage low divided by the minimal current gain of the transistor.

  2. The resistor value shouldn't be too small, so that you don't exceed the maximal basis current of the transistor.

  • \$\begingroup\$ so which resistor should be use in my case? I tried 10k and 1k ohm resistors. In 10k resistor the difference is of 1 second (ie. 3.1 sec). \$\endgroup\$ Oct 30, 2011 at 18:03

As Starblue mentions, a pull up resistor may be required.

I would try something like 10k for the base resistor, and 1k for the collector resistor (between collector and +5V)
EDIT - I just noticed it's actually a +6V supply voltage you are using after reading Olins post.
As mentioned, take care not to pull up to a higher voltage than the parallel ports supply. You should be able measure the high voltage on one of the lines. If in doubt I wouldn't go above 5V.

Take the parallel port connection from the transistors collector.


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.