PDA

View Full Version : Pull-up resistor or Transistor??



goelvaibhav
12-07-2009, 05:46 PM
Hi,

Here is a simple question but I haven't found the answer yet:

Say, I want to send a signal between two PCBs using a wire connection. Both circuits have a uC. Im not using any protocol (USART,SPI,I2C,etc). Just a TTL Output from one circuit to TTL Input of the other.

There are two options:
1) I can connect a transistor (eg BC548) to the TTL Output signal and pull up at the receiving end. The signal will get inverted but that is not an issue.
2) I can pull up the signal at both the ends.

Kindly suggest me the best way and why?

Regards,
Vaibhav

MohitM
12-07-2009, 07:34 PM
I haven't been able to understand what your two options mean, but I can understand what you are trying to ask.

You basically want to interconnect between two PCBs. If the grounds are same, then yes its doable with a simple transistor (assuming the V+ on both PCBs are within the transistors rating).

If the grounds are not same, you need an optocoupler. A 6N25 is about Rs. 5. You could maybe fabricate one using an LED and a phototransistor. Mind you, the signals won't be two-way.

Hope this helps.

goelvaibhav
12-07-2009, 08:25 PM
Thanks for the info..

Let me reframe the question:

Is it necessary to use a transistor? Won't simply pulling up the signal work? The power to both the circuits come from the same source, so the grounds are same.

MohitM
12-07-2009, 09:14 PM
Thanks for the info..

Let me reframe the question:

Is it necessary to use a transistor? Won't simply pulling up the signal work? The power to both the circuits come from the same source, so the grounds are same.
Still not clear... What do you want to do? A circuit diagram can help.

Vivek
12-07-2009, 10:10 PM
Yes simple pull-up will work *
1. You can have a pull up on one or both PCBs. Just make sure that it is not too small to load the TTL output of the MCU.

* BUT, (there is always a "situational" design decision) - A simple pull up may not "always (100% in life of your device)" work , and may be affected by
1. Noise - specially you are talking TTL level signal, and on a robotics forum so if here is heavy motor / inductive noise.
2. Length of wire.


now that i have put my disclaimers, the answer is still - yes- and you dont need a BJT unless you are too concerned about noise , and have a grip of above 2 items.

good luck!

Nivedita
12-08-2009, 02:01 PM
A simple wire from PCB A to PCB B and a common ground works.

Use transistor if both controllers are on different Vcc.

tpsbpl
12-09-2009, 11:56 PM
you can use TRI-State Buffer like 74ls244