0
\$\begingroup\$

I'm trying to use a Teensy 3.2 to control a digital scoreboard display. I'm using 6 common anode 7-seg displays controlled by two 74HC595 shift registers daisy chained to control a transistor array. (Schematic attached).

I followed this tutorial to connect the shift registers to the board using 3 output pins. I have tested and mounted the circuit onto protoboard but I cannot get the displays to light up at all. (The Teensy is powering up and excecuting code correctly).

I have tested every connection between nodes with a multimeter and there are no shorts or missing connections, but no matter what data I send the output pins all read LOW when tested with a multimeter. I know the circuit should work as I tested a condensed version with one shift register and one 7-seg display on a breadboard and all worked fine.

I aim to multiplex the displays such that only one is on at a time (selected by the first (leftmost) shift register and the number displayed driven by the rightmost chip so each LED should be able to recieve the required current from the DC source.

The schematic and test code (just lights up one display) are attached below as well as the data for the components:

Transistors: 2N5210; Displays: SA40-19EWA (8V 20mA common anode);

Any help as to what could be going on would be really appreciated as I am relatively new to digital circuits


EDIT:

The schematic shows sets of 8 LEDs in series-parallel as one LED for clarity.

Schematic

int dataPin = 3;
int clockPin = 5;
int latchPin = 4;

void setup() {
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(latchPin, OUTPUT);
}

void loop() {
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, B11111111);
  shiftOut(dataPin, clockPin, MSBFIRST, B00010000);
  digitalWrite(latchPin, HIGH);
  delay(1000);
}   
\$\endgroup\$

3 Answers 3

2
\$\begingroup\$

Your problem is your multiplex drive.

First, though, I have to point out that I believe your problem description is wrong. When you say, "the shift registers have no voltage across any of the output pins", I'm pretty sure that you mean that no LEDs are lighting, and that is not the same thing at all.

Second, your schematic is extremely misleading, since you show single LEDs in your displays. In fact, each display segment is composed of 4 pairs of LEDs connected in series, and this makes a big difference,

With that said, when you use NPN for your display selectors, you produce the following circuit for a selected segment:

schematic

simulate this circuit – Schematic created using CircuitLab

Since Q1 is being used as an emitter follower, the LED Voltage cannot be more than about 4.3 volts, and so the LEDs are not lighting.

You need to replace your multiplexing transistors with an NPN-PNP pair, like so:

schematic

simulate this circuit

Driving Q1 will cause base current to be pulled through Q2, turning it on. You do not need a 100 ohm in this case, 1k will be more than adequate, and the 2k base resistor will draw about 5 mA through the base, which will be more than adequate to turn on Q2 to the tune of 20 mA or less. You could actually use 5k and the circuit would work perfectly.

\$\endgroup\$
5
  • \$\begingroup\$ Although this does solve the 12V switching (is this possible with a single device or only the NPN-PNP pair?) the set of 8 transistors controlling the ground of each segment should still be functioning but the voltage into the base (from the shift registers) is also reading 0. The transistors should still be switching but they aren't. \$\endgroup\$ Nov 21, 2016 at 4:35
  • \$\begingroup\$ @MichaelFotopoulos - Again, it's hard to tell if you are conflating two separate issues. With the low multiplex voltage, the low-side transistors have nothing to switch. The LED Vf is too high to allow any current at all through the transistors. So - have you measured the base voltages? Have you measured the 595 output voltages? Or are you assuming they are zero because nothing is happening at the transistors? With your current setup, the collector voltages will be zero regardless of base drive. Try tying the anode of one display to +12 and then driving the segments. \$\endgroup\$ Nov 21, 2016 at 5:38
  • \$\begingroup\$ I have measured both the 595 output voltages and the collector-emitter voltages of the low-side transistors. The actual 595 output voltages are all reading 0V and the transistors are dropping about 7.8V when I tie one of the anodes to +12 as expected with no voltage to the base. If I short the collector-emmiter of the transistors the segments do light up so I'm fairly sure the shift registers are not writing +5V from the outputs. \$\endgroup\$ Nov 21, 2016 at 6:14
  • \$\begingroup\$ @MichaelFotopoulos - OK, so you're doing something very wrong. Try shifting in all 1's and look at the Q7S outputs, pin 9. If these are not 1, then your interface is probably bad. If these are OK, I'd suggest looking closely at your OE connections. If the Q7S indicates 1 and the output is 0, then either you're not sending a latch pulse or the output is not enabled. \$\endgroup\$ Nov 21, 2016 at 15:04
  • \$\begingroup\$ Thanks! All is functioning as expected now, I re-soldered the shift register inputs and set up the high side driver transistors as suggested. So not sure whether one issue caused the other but all working now. \$\endgroup\$ Nov 22, 2016 at 11:12
1
\$\begingroup\$

You have a 1uF capacitor on your LATCH pin. This is likely your problem -- digital pins need nice, sharp edges, they should never need a capacitors. Moreover, 1uF is such a high value, LATCH most likely never goes all the way to 0.

\$\endgroup\$
1
  • \$\begingroup\$ I tried removing the cap and still no effect. The circuit seemed to work fine with the cap in place when testing on a breadboard. \$\endgroup\$ Nov 21, 2016 at 3:41
1
\$\begingroup\$

Your circuit will never work with the high voltage (8V) LED display. The emitter follower outputs will deliver only about 4.3V so the LEDs will not light. The output voltage ends up being one Vbe drop below the input voltage, which is 5V. The rest of the voltage is burned up in the transistor, which might actually be just peachy if you were driving a single LED of 2-3V, moving the power dissipation from the regulator to the driver transistors, but in this case it's fatal.

You need a high-side driver like this (x6):

schematic

simulate this circuit – Schematic created using CircuitLab

Also, get rid of that 1uF on the latch, and increase the base drive resistors on the grounded emitter transistors to more like 2.7K, 100 ohms is way too low- those transistors have lots of current gain and you should use it. Neither is keeping your LEDs from lighting but they're stressing the parts a lot more than they need to be.


Note to anyone confused by this- typically large LED displays such as scoreboard displays are made from series or series-parallel strings of individual LED dice within the module, and that is exactly what the OP has. They have a nominal Vf of 8V according to OP, so maybe 4 red LEDs in series, or 8 in series-parallel etc.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.