Pages: 1 2 [3]   Go Down
Author Topic: Shift Register only works when hand is close  (Read 2473 times)
0 Members and 1 Guest are viewing this topic.
Estonia
Offline Offline
Full Member
***
Karma: 1
Posts: 180
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes.  The "outputs" of the shift register act just like your transistor - they are "off" so then are high impedance (open circuit), or "on" and connected to ground.  You need power from the 5V rail to turn your transistor on, and when you turn on the output to the shift register it connects the base of your transistor to ground, turning it off.

Wouldn't this just connect the collector to the base of the transistor? How would this allow the power to flow to the emitter in of the transistor?
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You put electrickery into the base of the transistor and it turns on.  The resistor to +5V provides said electrickery.

You turn on the output of the shift register and it connects that resistor to ground, giving a lower resistance path for the electrickery to go though, so less goes into the base, turning the transistor off.

Think of the output of the shift register like a button.  When on it connects the output pin to ground.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Estonia
Offline Offline
Full Member
***
Karma: 1
Posts: 180
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Excellent, I understand! And, I have gotten it to work properly!

The last question I have though is - do I really need so many wires? It really seams like I have way more wires than nessicary. For example, this tutorial has only a few wires for each shift register and doesn't have the extra cross between the base and collector of the transistor. Is it just the parts that I bought that make this more complex?
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Most shift registers (like the 74xx595) use TTL (or similar) outputs, which output a positive voltage when turned on.  This makes connecting transistors and similar much similar.  However, they generally can't provide much current.  The shift register you have effectively has the transistor you have wired up inside the chip, so it can "sink" (which is what your transistor is doing) more current - something like 150mA per output (check the data sheet for exact figures).  So, if you're not wanting to connect anything that uses more than 150mA then you don't need any of your external transistor, but can just use the shift register directly.  The output of the shift register would be the collector of the transistor.  So, to use it like a 74xx595 is slightly more complex, but to use it "properly" can be simpler, depending on your application.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Estonia
Offline Offline
Full Member
***
Karma: 1
Posts: 180
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, so most registers actually output current while mine "sink"s the current (inputs the current per-say). Is this correct?

I am using this all to control an LED array. I am using the registers to control 25 columns and 15 rows. The plan is to sink 1 row at a time and make the columns provide the power so that each LED has it's own power supply, giving maximum brightness. I am using the transistors to switch on-off the power to the columns, thus giving total control.

Maybe it makes more sense to get simpler output-current registers for the columns while using the sink-current registers for the rows? This would make the transistors easier to use (if I would even still need them, depends on how many LEDs I am trying to power I suppose). Is this a correct thought process?
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, so most registers actually output current while mine "sink"s the current (inputs the current per-say). Is this correct?

I am using this all to control an LED array. I am using the registers to control 25 columns and 15 rows. The plan is to sink 1 row at a time and make the columns provide the power so that each LED has it's own power supply, giving maximum brightness. I am using the transistors to switch on-off the power to the columns, thus giving total control.

Maybe it makes more sense to get simpler output-current registers for the columns while using the sink-current registers for the rows? This would make the transistors easier to use (if I would even still need them, depends on how many LEDs I am trying to power I suppose). Is this a correct thought process?
Yep, that is correct.  Use something like a 74HC595 to power the LEDs, and use your existing shift register to sink the groupings (columns, rows, whatever).

If you are going to have lots of LEDs connected from one output of the 595 and have them illuminated *at the same time* then you will need a transistor, but as it's a "high side" switch, make it a PNP, not an NPN.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Estonia
Offline Offline
Full Member
***
Karma: 1
Posts: 180
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you are going to have lots of LEDs connected from one output of the 595 and have them illuminated *at the same time* then you will need a transistor, but as it's a "high side" switch, make it a PNP, not an NPN.
Why would I use a PNP WITH THE 595? Since the 595 would push the current, wouldn't I use a NPN transistor to control 5V flowing to each column (while using my current shift registers to sink the rows when needed)?

Basically, couldn't I use the 595 ouput pins as the switch on the NPN transistor to unleash the 5V when the register pin is turned HIGH?
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you are going to have lots of LEDs connected from one output of the 595 and have them illuminated *at the same time* then you will need a transistor, but as it's a "high side" switch, make it a PNP, not an NPN.
Why would I use a PNP WITH THE 595? Since the 595 would push the current, wouldn't I use a NPN transistor to control 5V flowing to each column (while using my current shift registers to sink the rows when needed)?

Basically, couldn't I use the 595 ouput pins as the switch on the NPN transistor to unleash the 5V when the register pin is turned HIGH?
The rule is, if you are switching the connection between a load (led, relay, etc) and ground, then you use an NPN.  If you are switching the connection between the power (+5V, +12V, etc) and a load, then you use a PNP.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

TX
Offline Offline
Jr. Member
**
Karma: 2
Posts: 99
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to learn to use the TPIC6B595N shift register http://www.adafruit.com/datasheets/tpic6b595.pdf but I am having a strange problem. The register only works every now and then and very often it works only when my hand is nearby.

I just ran into this problem yesterday with one of these. I got in a hurry and didn't connect the SRCLR pin - it was floating. I could control the chip by hand movements, just like Darth Vader. A floating pin can really mess with your mind!
Logged

Pages: 1 2 [3]   Go Up
Jump to: