Go Down

Topic: Driving 144 switch transistors (Read 512 times) previous topic - next topic


Nov 21, 2012, 02:21 pm Last Edit: Nov 21, 2012, 10:31 pm by strykeroz Reason: 1
Hi Roberto

That's an interesting idea.  I certainly wouldn't have guessed that one  :)

So why use a shift register instead of a multiplexer in this case ?
Where you only need to turn channels off or on, the shift register is nice and simple to code for - you just manipulate a bit-pattern in your code and shift that out.  Need to step one position up or down, just multiply/divide by two.  Or start with a pattern that's all 0's and set only the ones you need, all unwanted pins are turned off in that one move.

While there are multiplexers that can do output, I don't immediately think of them for that - and I usually think of multiplexers for allowing more than one input on a single Arduino pin rather than the other way round.  Which multiplexer were you thinking of using so we can compare ?

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield


I still have confusion about multiplexing and shift-registers..
A shift register is essentially a demultiplexer.   You feed serial bits into the shift register, and the shift register isolates & outputs the bits depending on their position in the data stream.

Perhaps you mean to say matrixing...  For example, with 12 outputs you can create a 6x6 matrix to control 36 LEDs or relays.  36 transistors or data lines from the matrix would be trickier because you loose your common ground line.

I don't know what specific transistor to use, I need two things:
- Minimal noise
- Minimal costs
Noise shouldn't be an issue in a switching application.   But the signal-to-noise ratio depends on what kinds of "signals" you're working with.

...to build something similar to a digital potentiometer...
Before you get too deeply into this, I'd recommend experimenting with 2 or 3 transistors/resistors to test-out your concept.   you can hard-wire the transistor inputs, or use pushbutton switches if you want to test it without programming the Arduino.

And since you are new to shift registers, I suggest the same thing....  Test one chip first.


I recommend the 2N3904 for the switching application of the transistor....They are extremely cheap, and I bought 50 for .07 cents apiece and Mouser Electronics. Here is the link:

http://www.mouser.com/search/default.aspx?cm_re=TopNavTabs-_-PRODUCTS-_-VIEW ALL PRODUCTS

They are high quality, and cheap.


50 for .07

That's actually quite expensive. They should be around a penny or so each, in 100s.

Go Up