Comments: Large Digit Driver Hookup Guide

Pages

Comments 36 comments

  • I got this working with a Photon. I know it is out of spec but if you provide 3.3V to the driver board instead of 5V it seems to handle 3.3V logic fine.

    I also appreciate the codebender integration into the tutorial. It made testing the boards a snap. -Thanks Shawn!

    • I am new to hardware and as a result had a hard time it understanding basic concepts of how voltage is calculated. Thanks to my grad professor in explaining the concept of ground. Key point here is if you are using photon the make sure GND of 12v(Coming from adapter) and 3.3v(coming from photon) share same ground. I had different grounds and as a result voltage values were different. Now I have connected all the grounds together and got it working.

    • Good to know, thanks!

  • WARNING: before soldering, I’d strongly recommend putting a piece of tape on the back of this board to insulate the vias from the exposed copper traces on the 7 segment display.

    On my board, the via connected to pin 10 (RCK) on the shift register wasn’t fully covered by the solder mask and ended up bridging with the exposed 12V trace on the back of the 7 segment board. This caused a short from 12v to pin 10 (RCK) on the shift register, which made ~12V available on all the input pins as well as the 5V pin. I fried a couple Arduinos before I figured out what was happening. Seems like the shift register is fried too. Now that I’ve pulled it off the 7 segment board it’s no longer trying to supply 12V on all the input pins, but it doesn’t seem to do anything anymore.

    I’m going to order some new shift registers and try to salvage the board :(

    • Thank you for catching this! I’ve updated the tutorial to recommend taping over the vias before soldering the board.

  • Hello, First Timer here. Using Windows and Arduino UNO board. I’ve successfully daisy chained 3 LDD’s together and made the automated counter up to 999 from here: https://learn.sparkfun.com/tutorials/large-digit-driver-hookup-guide/example-two-large-digits

    example

    I’m trying to make this into a button press counter and am having some difficulty finding the appropriate code to go with this driver since most code is for a breadboard style driver and individually controlling the number segments.

    Can I run a button directly into the UNO board? Anybody have suggestions. Thanks

  • According to the data sheet for the TPIC, provided that I read it right, the logic supply and input voltage should be between -0.3V and 7V, which, again as I understand it, would mean that a Raspberry PI GPIO at 3V3 should be fine as long as the TPIC sees 3V3 on the 5V line. But the datasheet also states that recommended is 4.5-5.5V for Vcc, which has me a bit confused.

    Another question, provided I get the logic levels sorted, would a string of 6 of these drivers be compatible with the Pi7SegPy python library (https://pypi.python.org/pypi/Pi7SegPy). From what I understand, a string of these should behave similarly to a string of 74HC595 registers, but you never know… :)

    • You’re reading the “absolute maximum ratings” on the TPIC datasheet, which tell you what you can give to the chip without damaging it. To see what kinds of signals to send it to make it work, you should look at the “recommended operating conditions” section, which says that your voltage supply (Vcc) should be between 4.5 and 5.5 V. Also, it states that input logic high is anything above 0.85 * Vcc, which is 4.25 V if you’re using a 5 V supply. Similarly, input logic low is anything below 0.15 * Vcc = 0.75 V. To work with the TPIC, it’s highly recommended that you use a 5 V supply and 0-5V logic levels, which means you’ll want a level shifter with the Pi.

      From my very brief review of the TPIC and *595 datasheets, they should behave very similarly. In theory, you should be able to get the Pi7SegPy library to work, but you’ll need to manually control a few of the pins on the TPIC, like /G and /CLR.

      • Thanks mate, I used one of your logic level shifters (had ordered some of them years ago and forgotten about them), and it worked perfectly! I didn’t end up using the Pi7SegPy library, but I can say that the TPIC behaves just like a 595 shift register (and after reading a bit about the topic, turns out the TPIC in this case is a 596 chip, which seems to be a power version of the *595). I have my project almost completed, as soon as I get the code tidied up I’ll post a link to it here, might help somebody trying to use these with a RasPi. :)

  • Can a single Arduino Uno power 4 of these Large Digits + an RF receiver? the RF receiver needs 5v (must be less than 6v). I’m not sure how to read the Large Digit datasheet - thank you

    • ShawnHymel / last year * / 1

      From what I can tell, each segment can consume up to 20mA, and with 8 segments per digit, that’s a max of 20 x 8 x 4 = 640 mA to drive all four digits. Add maybe 20-30 mA for the Arduino, and you’re looking at needing close to 700mA to power the whole system. Because the Large Digit Driver uses the VIN pin, you don’t need to worry about the Arduino powering the digits, just make sure you have a power supply that operates at 12V and can supply at least 700 mA.

  • TO Member #910971 Thank you! for porting much of the arduino example over to python, I searched all over and I found you posted it in another place as well but couldn’t find any working versions ANYWHERE ELSE. So I modified it a little further (in my simple python/pi noob way) and made it function. I also found you were using GPIO.BOARD but referencing pins number in GPIO.BCM

    #!/usr/bin/env python
    
    import RPi.GPIO as GPIO
    import time
    
    GPIO.setwarnings(False)
    GPIO.setmode(GPIO.BCM)
    
    segmentClock=11
    segmentLatch=13
    segmentData=15
    
    GPIO.setup(segmentClock,GPIO.OUT)
    GPIO.setup(segmentData,GPIO.OUT)
    GPIO.setup(segmentLatch,GPIO.OUT)
    
    GPIO.output(segmentClock,GPIO.LOW)
    GPIO.output(segmentData,GPIO.LOW)
    GPIO.output(segmentLatch,GPIO.LOW)
    
    number=0
    
    
    def loop(number):
        showNumber(float(number)) #Test Pattern
    
    
    def showNumber(value):
        number = abs(value) #Remove negative signs and any decimals
    
        if number>=10:
            remainder = number % 10
            postNumber(remainder, False)
            number = int(number/10)
            postNumber(number, False)
        else:
            postNumber(number, False)
            postNumber("0", False)
    
        #Latch the current segment data
        GPIO.output(segmentLatch,GPIO.LOW)
        GPIO.output(segmentLatch,GPIO.HIGH) #Register moves storage register on the rising edge of RCK
    
    #Given a number, or - shifts it out to the display
    def postNumber(number, decimal):
        segments=bytes()
        a=1<<0
        b=1<<6
        c=1<<5
        d=1<<4
        e=1<<3
        f=1<<1
        g=1<<2
        dp=1<<7
        if number == 1: segments = b | c
        elif number == 2: segments = a | b | d | e | g 
        elif number == 3: segments = a | b | c | d | g
        elif number == 4: segments = b | c | f | g
        elif number == 5: segments = a | c | d | f | g
        elif number == 6: segments = a | c | d | e | f | g
        elif number == 7: segments = a | b | c
        elif number == 8: segments = a | b | c | d | e | f | g
        elif number == 9: segments = a | b | c | d | f | g
        elif number == 0: segments = a | b | c | d | e | f 
        elif number == ' ': segments = 0
        elif number == 'c': segments = g | e | d
        elif number == '-': segments = g
        else : segments = 0
    
     ##mistake likely here   
     #   if ((decimal segments) |= dp ):
        y=0
        while(y<8):
           GPIO.output(segmentClock,GPIO.LOW)
           GPIO.output(segmentData,segments & 1 << (7-y))
           GPIO.output(segmentClock,GPIO.HIGH)
           y += 1
    
    
    while True:
        number = number + 1
        print number
        loop(count)
        time.sleep(2)
        if number>=99:
            number = 0
    
    
    GPIO.cleanup()
    

    I hope this can help someone else as well!

    • Hi, it’s been a while since your post but I am trying to get this to work for a school project using the raspberry pi 3. Unfortunately, the code didn’t work and I have been debugging it. I am not getting an output on the segment pins (a,b,cd,…etc) as I rotate through the numbers (0-9). I am getting a clock and serial output, I verified this using an oscilloscope.

      I saw that you got this code to function. Could you please tell me to what extent this solution was working, how could you tell it was working correctly?

      Thank you, J

  • Hello. I ported this code to Python to use on a Raspberry Pi, and I must be doing something wrong, because only the right-most digit (of 2 digits) works. Whenever it gets to 10,20,30… it freaks out, then starts counting 1-2-3-4… properly. The number print out on the screen is correct. Where is it going wrong? Thank you!

    #!/usr/bin/env python
    
    import RPi.GPIO as GPIO
    import time
    
    GPIO.setmode(GPIO.BOARD)
    segmentClock=11
    segmentLatch=13
    segmentData=15
    
    GPIO.setup(segmentClock,GPIO.OUT)
    GPIO.setup(segmentData,GPIO.OUT)
    GPIO.setup(segmentLatch,GPIO.OUT)
    
    GPIO.output(segmentClock,GPIO.LOW)
    GPIO.output(segmentData,GPIO.LOW)
    GPIO.output(segmentLatch,GPIO.LOW)
    
    number=0
    
    def loop(number):
        print number
        showNumber(float(number)) #Test Pattern
        time.sleep(1)
    
    #Takes a number and displays 2 numbers. Display absolute value (no negatives)
        #look here maybe bug between value+number
    def showNumber(value):    
        number = abs(value) #Remove negative signs and any decimals
        x=0
        while(x<2):
            remainder=number % 10
            postNumber(remainder)
            number = number/10
            x += 1
    
        #Latch the current segment data
        GPIO.output(segmentLatch,GPIO.LOW)
        GPIO.output(segmentLatch,GPIO.HIGH) #Register moves storage register on the rising edge of RCK
    
    #Given a number, or - shifts it out to the display
    def postNumber(number):
        a=1<<0
        b=1<<6
        c=1<<5
        d=1<<4
        e=1<<3
        f=1<<1
        g=1<<2
        dp=1<<7
    
        if   number == 1: segments =     b | c                  
        elif number == 2: segments = a | b |     d | e |     g 
        elif number == 3: segments = a | b | c | d |         g
        elif number == 4: segments =     b | c |         f | g
        elif number == 5: segments = a |     c | d     | f | g
        elif number == 6: segments = a |     c | d | e | f | g
        elif number == 7: segments = a | b | c                
        elif number == 8: segments = a | b | c | d | e | f | g
        elif number == 9: segments = a | b | c | d     | f | g
        elif number == 0: segments = a | b | c | d | e | f 
        elif number == ' ': segments = 0
        elif number == 'c': segments = g | e | d
        elif number == '-': segments = g
        else : segments = False
    
      #  if (segments != dp):
        y=0
        while(y<8):
           GPIO.output(segmentClock,GPIO.LOW)
           GPIO.output(segmentData,segments & 1 << (7-y))
           GPIO.output(segmentClock,GPIO.HIGH)
           y += 1
    
    while (number !=129378917123):
        loop(number)
        number = number+1
        number %= 100
    
    GPIO.cleanup()
    
  • The driver arrived few days back and I finally managed to start playing with it. But disappointed. I do not have Sparkfun Large 7 Segment Display. I used other 4" 7 segment Common Anode display. But it didn’t work. I followed the arduino hookup guide, connected the abcdefg pins to my display’s corresponding pins and uploaded the single digit program. All I got is number 8 glowing forever, along with the dot. No number counting - 1-2-3-4…

    I am upset to realize that may be you guys have kept half of the circuit in this driver and half in your display. No where on the driver documentation, I see a word where you assured that it works with standard 12V Common Anode displays.

  • HI I have 3 big 7 segment display connected together and being controlled by 1 Redboard. Basically each 7 segment display has the same sequence of segments being turned on and off: case 1: segments = a; break; case 2: segments = f; break; case 3: segments = e; break; case 4: segments = d; break; case 5: segments = c; break; case 6: segments = b; break;

    I have a delay delay(100 ); set at 100 between each time a segment is going on and off.

    The problem I am having is that sequence on the 3 segments are not in sync with each other. The first 7 segment display is fine the second is of by one segment and the third by two.

    I am guessing this is a hardware issue since I have them connected with 6 pin jumper wires being run by one Redboard.

    Any help would be appreciated.

    • I highly recommend contacting our tech support, who will be able to walk through the issues with you. Are you able to get 2 displays working together?

      • Yes they are all working. The issue is that the sequence on the first is not in sync with the second or third. They all light up and display the sequence of segments but there is a slight delay from the first 7 segment display (connected to the Red Board) to the second and then third which are not connect to the Red Board.

        Thanks

        • Is there a delay when you only have 2 displays connected in series?

          • Yes. The second 7 segment display which is connected by a 6 pin jumper wire to the first 7 segment (which is directly connected to the Redboard) is off by one segment. Here is my code:

            //GPIO declarations
            //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
            

            byte segmentClock = 6; byte segmentLatch = 5; byte segmentData = 7;

            //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

            void setup() {

            pinMode(segmentClock, OUTPUT); pinMode(segmentData, OUTPUT); pinMode(segmentLatch, OUTPUT);

            digitalWrite(segmentClock, HIGH); digitalWrite(segmentData, HIGH); digitalWrite(segmentLatch, HIGH);

            int x = 0; while(1) {

            postNumber(x, true); //Show decimal
            
            digitalWrite(segmentLatch, LOW);
            digitalWrite(segmentLatch, HIGH); //Register moves storage register on the rising edge of RCK
            delay(100 );
            
            x++;
            x %= 7; //Reset x after 7
            

            } }

            void loop() { //showNumber(42); //Test pattern }

            //Takes a number and displays 2 numbers. Displays absolute value (no negatives) void showNumber(float value) { int number = abs(value); //Remove negative signs and any decimals

            for (byte x = 0 ; x < 3 ; x++) { int remainder = number = 0;

            postNumber(remainder, false);
            
            number /= 0;
            

            }

            //Latch the current segment data //digitalWrite(segmentLatch, LOW); //digitalWrite(segmentLatch, HIGH); //Register moves storage register on the rising edge of RCK }

            //Given a number, or ‘-’, shifts it out to the display void postNumber(byte number, boolean decimal) { // - A // / / F/B // - G // / / E/C // -. D/DP

            define a 1<<0

            define b 1<<6

            define c 1<<5

            define d 1<<4

            define e 1<<3

            define f 1<<1

            define g 1<<2

            define dp 1<<7

            byte segments;

            switch (number) { case 1: segments = a; break; case 2: segments = f; break; case 3: segments = e; break; case 4: segments = d; break; case 5: segments = c; break; case 6: segments = b; break; }

            //if (decimal) segments |= dp;

            //Clock these bits out to the drivers for (byte x = 0 ; x < 8 ; x++) { digitalWrite(segmentClock, LOW); digitalWrite(segmentData, segments & 1 << (7 - x)); digitalWrite(segmentClock, HIGH); //Data transfers to the register on the rising edge of SRCK } }

  • ——————– Tech Support Tips/Troubleshooting/Common Issues ——————–

    Design Tips

    We have used the large digit drivers before during the AVC [ upper left hand corner of this picture => https://www.flickr.com/photos/sparkfun/18877960640/in/album-72157654869278586/ ] but it was in a tent under a small arena. As long as there is some shade you will be able to see the segments light up. In direct sunlight, you will not be able to see any segments.

    Testing the display inside in the afternoon, it was obviously better. When there was sunlight shining on the segment, it was hard to see. Try using it under some shade so that sunlight is not shining directly on the 7-segment.

  • I’m also planning a scoreboard project. I think I understand setting up the LEDS and arduino but how can it be controlled live. For it to function, I need to be able to change the score on the fly. Any suggestions would be much appreciated.

    • You could have buttons connected to the Arduino increment or decrement the score. If you wanted to control it remotely, you could use Zigbee, Bluetooth, WiFi, etc. to send and receive messages.

      • hi, i am trying to make 3 digit scoreboard with count up and count down buttons, i hooked up two displays and run the example code for two displays which works perfectly, however i don’t know how can i use buttons to count up and down, can you please help me with the code ,, i am new to arduino :)

  • I’m a complete newbie to Arduino projects, so bear with me. I was planning a project to create a hockey scoreboard for an outdoor rink. I would need two digits for the ‘Home’ team and another two digits for the ‘Away’ team each displaying numbers from 0-99 independently. I would obviously need 4 Large LEDs, chaining a pair of them for each ‘side’. Do I have enough inputs on the UNO (or sparkfun version) Arduino for this? I see exactly how one pair would hookup and work, but I assume I need a separate connection entirely for the other pair of digits. Or..perhaps..the Arduino masters have a simplier plan that would work. Thanks for any advice.

    • With a little extra coding you could chain 4 together with one Arduino. Each digit is shifted down the chain.

  • Will this work on a regular arduino Uno - i.e., non-RedBoard ?

    • Yes, it should work with any Arduino (or microcontroller). Just remember that you will need to provide 5V and 12V to the Driver board. 5V logic (GPIO/SPI) is also recommended.

      • Will it work with 3.3V GPIO? Also, is the 12 V only for making the digit appear brighter or it’s necessary for correct functionality?

        • It’s been a while since I’ve looked at this board. From what I can tell from the datasheet, you need 5V as Vcc. With that, 3.3V I/O should work. 12V is needed for the large 7-segment display, as each segment consists of 6 LEDs in series (see the datasheet here).


If you've found a bug or have other constructive feedback for our tutorial authors, please send us your feedback!