0
\$\begingroup\$

I am trying to send TTL pulse from Arduino to 8 raspberry pi simultaneously. For this, I am using npn transistor as a switch. Below is the circuit for same:

enter image description here

Note: MB102 is a power supply that takes in 5v or more and regulates it to 3v3 http://www.petervis.com/Raspberry_PI/Breadboard_Power_Supply/YwRobot_Breadboard_Power_Supply.html. I am using q1 2n3904 transistor. Also, Arduino is connected to a recording system which takes 5v pulse rather 3.3v.

Issue the voltage drop across collector-emitter is 2.51v whereas it should be 0 when the TTL pulse is HIGH. The voltage drop across Pi is 0.67v whereas it should be ~3.3v. What is wrong with the circuit? What can be changed?

\$\endgroup\$
5
  • 3
    \$\begingroup\$ Partial list of issues: First, NPN is no good as a high-side switch unless you can drive the base just about to the collector voltage. NPN can be used as a low-side switch. Second, NPN (OR PNP) will have around 0.2V of CE drop even when fully turned on. Third, you cannot pass enough current through an 3904 to power 8 Pi's. Bottom line: use PMOS. Use your 2n3904 to pull the MOSFET gate low. Put a pullup on the MOSFET from source to gate. Your PMOS must be designed to turn on fully with only 3.3V. Not all of them are. Come back and ask more questions after you study this comment a bit. \$\endgroup\$
    – user57037
    Commented Jun 18, 2017 at 4:14
  • 1
    \$\begingroup\$ Are you trying to send a signal? (You mention "TTL.") Or trying to power the RPi(s)? (Schematic looks like it.) \$\endgroup\$
    – jonk
    Commented Jun 18, 2017 at 4:35
  • 1
    \$\begingroup\$ If all you are doing is sending a TTL signal to the 8* RPi's then you don't need the 2n3904 at all. Providing all the units are powered from the same supply, you can simply connect an Arduino pin output to 8 RPi input pins, use a 2k2 series resistor which will ensure that you don't exceed 20 mA sink/source on the Arduino. \$\endgroup\$ Commented Jun 18, 2017 at 4:49
  • \$\begingroup\$ Oh, yeah, if you are not powering them, then some of my comments don't really apply. But the first bit, about not using NPN on the high-side, that still would apply. \$\endgroup\$
    – user57037
    Commented Jun 18, 2017 at 5:02
  • \$\begingroup\$ Actually, now that I think about it and pay more attention, if the base is driven with 5V CMOS (as appears to be the case) and the collector is only 3.3V, it should be possible to saturate the 2N3904 unless the required collector current is really large (like over 300 mA, in which case you need to do something else, like the PMOS in my first comment). If you want to try that, you would need to use a much smaller base resistor (maybe like 100 or 200 Ohms). 100 Ohms would yield something like 15mA of base current. If that doesn't saturate it, then go to PMOS. \$\endgroup\$
    – user57037
    Commented Jun 18, 2017 at 5:19

1 Answer 1

0
\$\begingroup\$

Generally speaking, when you wish to use an NPN transistor as a switch, the emitter should be grounded and the load is connected to the collector side of the transistor. In your case, ground the emitter and place a 220 ohm resistor in series with the collector to your supply and then connect the Pi's to the junction of the resistor and collector.

You are showing a resistor in parallel wth the Pi's. This should be removed.

You didn't state what input of the Pi's this is going to but be aware that if combined they represent too much of a load, you may have to use more than one transistor circuit and split the Pi's among them. Test your circuit with one Pi first and then add others.

Also take note that an NPN in this configuration will invert your logic. When the base is biased on, the voltage to the Pi's will be low (about 0.2 volts) and vise versa.

\$\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.