Arduino Forum

Using Arduino => General Electronics => Topic started by: skootles on Jan 05, 2013, 02:25 am

Title: Multiple transistors from one pin?
Post by: skootles on Jan 05, 2013, 02:25 am
I was just wondering if it's possible to drive multiple transistors using one Arduino pin. Here's an example of my current setup:

(http://i.imgur.com/2hvV2.png)

You can see, I'm using the transistors to make/break the connections between the Arduino and the ZIF socket. Ideally I'd love to just use one pin to switch anywhere from 2-7 transistors. Is that possible?

I figured that this would be possible with a shift register like a 74HC595, but if I can make my circuit simpler, that'd be best.
Title: Re: Multiple transistors from one pin?
Post by: dhenry on Jan 05, 2013, 03:01 am
Yes, in that all the transistors will act in lock step with each other.
Title: Re: Multiple transistors from one pin?
Post by: retrolefty on Jan 05, 2013, 03:07 am
You do realize that the transistors will propbably invert the signal it passes on to the zif? They will not be a simple/make break between the arduino pins and the zif pins. But without seeing what is going to be plugged into the zif it's difficult to suggest a way to do what you may be trying to do?

But yes you can drive multiple base resistors from a single output pin.

Lefty
Title: Re: Multiple transistors from one pin?
Post by: Docedison on Jan 05, 2013, 03:08 am
@ *dhenry* Gee pretty good and on topic too, but that was I think what the OP was asking for..

Bob
Title: Re: Multiple transistors from one pin?
Post by: skootles on Jan 05, 2013, 04:07 am

You do realize that the transistors will propbably invert the signal it passes on to the zif? They will not be a simple/make break between the arduino pins and the zif pins. But without seeing what is going to be plugged into the zif it's difficult to suggest a way to do what you may be trying to do?

But yes you can drive multiple base resistors from a single output pin.

Lefty

I do not realize that.

What I'm trying to do is see if it's possible to replace the DIP switches on my ATtiny/ATmega programmer shield. (http://jeffmurchison.com/blog/introducing-arduinoisp/) The way it works now is you load the ArduinoISP sketch to the Arduino, plug the shield in, and then there are different 3 banks of 6 DIP switches (and some jumpers) that you flip based on the microcontroller you want to program. The reason for the switches is because the GND, VCC, and SPI pins on each type of microcontroller are different. (http://www.akafugu.jp/images/microcontroller-reference-sheet.png)

Ideally I'd like just one switch, so I figured the best way to do this would be with transistors. I tested a bit using the transistors between some of the SPI pins and they seemed to pass the signal through just fine, but I haven't tried with all of them at once.
Title: Re: Multiple transistors from one pin?
Post by: SirNickity on Jan 05, 2013, 04:41 am
Remember that the base or gate pin isn't a simple switch input either -- it's relative to one of the other pins, and which one depends on the type of transistor.  So, with an N-channel FET for instance, the Gate pin needs to be (Vsrc + Vgs) or higher before the transistor will even START to conduct.  You can't treat it exactly like a relay, where the load and control sides are completely independent of each other.  I know that's often a misconception as people suggest "use a transistor" when there's a post about using a relay.

Definitely check out some simulation software so you can see what's happening, and where you won't toast any parts while you learn.  :-)
Title: Re: Multiple transistors from one pin?
Post by: Kane on Jan 05, 2013, 06:37 am
Sounds more like the job for some of the more exotic types of opto-couplers than transistors.
Title: Re: Multiple transistors from one pin?
Post by: fungus on Jan 05, 2013, 11:36 am
No problem. Just pick your transistor base resistors so that no more than 40mA comes out of the Arduino pin.