1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics 7-segment LED Clock

Discussion in 'Modding' started by Explicit, 27 Sep 2004.

  1. markp

    markp What's a Dremel?

    Joined:
    29 Aug 2004
    Posts:
    16
    Likes Received:
    0
    Yeh I think it's going to come down to sanding the back of the perspex and diffusing with some glue on each LED or some thin paper.

    Each digit is 600x400mm.
     
  2. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    you could sand down the led's as well to help diffuse the light
     
  3. tomjediknightt

    tomjediknightt What's a Dremel?

    Joined:
    14 Oct 2006
    Posts:
    22
    Likes Received:
    0
    Markp, That is really awesome. Good luk. I too want to build the sparkfun clock, but like you, money is tite!
    Where did you buy the blue led's?
    Thanks
    Tom
     
  4. markp

    markp What's a Dremel?

    Joined:
    29 Aug 2004
    Posts:
    16
    Likes Received:
    0
    Thanks!
    Right here for LEDs
     
  5. markp

    markp What's a Dremel?

    Joined:
    29 Aug 2004
    Posts:
    16
    Likes Received:
    0
    Quick mini update...

    I've hit a problem. The LEDs are just too bright.

    Despite looking seriously cool...
    [​IMG]

    ...they don't look so good when sheet is put over the top:
    [​IMG]

    So I've redesigned the light boards to point at the sides and hopefully difuse and reflect the light instead:
    [​IMG]

    [​IMG]

    The result is a less bright, but better defined "segment" of the number:
    [​IMG]

    Currently waiting for perspex sheet samples to turn up. Probably just building numbers for the next couple of weeks while I wait for my PIC programmer to arrive so I can start writing the clock software.
     
  6. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    you could throw in a bigger resistor and see if it helps dim the LEDs a bit and therefore get rid of the bright spots, but the new way looks much better than the old
     
  7. Aurbo

    Aurbo What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    33
    Likes Received:
    0
    Any idea how to make a MONTH/DAY/HOUR/MINUTE/SECOND Display?

    Everything I've seen so far is for HOUR/MIN/SEC

    Cheers
    Steve
     
  8. markp

    markp What's a Dremel?

    Joined:
    29 Aug 2004
    Posts:
    16
    Likes Received:
    0
    Just use more digits!
    I'm creating 6 digits seperated by 2 colons. All you'd have to do is create another 6 or 8 digits (depending on whether you want 4 numbers for the year) and then create some /'s or -'s to seperate them.

    Of course, you'd need to programme a controller accordingly.
     
  9. Explicit

    Explicit What's a Dremel?

    Joined:
    23 Dec 2002
    Posts:
    172
    Likes Received:
    0
  10. Aurbo

    Aurbo What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    33
    Likes Received:
    0
    Using more digits would be the logical thing to do! I'm just stuck at the HOW? part.

    I can tinker and mess up the code all I want to get my end product, I am suffering a mental block on how to expand the circuit to acommodate the extras digits

    My goal is D100,D10,D,H10,H,M10,M and have the Seconds as the blinking dots between H and M10

    The end result = 365 days 23hours, : ,59min for a total of 8 outputs to handle the time with reset/adjustment to each digit.

    If I am reading the circuit correctly, I will need 15 or 16 outputs to handle the digits as well as the A-G (7 outputs) to drive the displays.

    Any help would be appreciated.

    Steve
     
  11. Mike K8LH

    Mike K8LH What's a Dremel?

    Joined:
    17 Nov 2005
    Posts:
    36
    Likes Received:
    0
    Which circuit are you using Steve?

    You might consider using a multi-function display. I use this method with the Clock/Calendar/Alarm/Timer below (using the up and down arrow keys to select the display mode).

    [​IMG]

    If you absolutely must have more digits then I should point out that one not-so-obvious feature of this 8-pin bus design is its ability to drive up to 42 discrete 7-segment displays. The displays would be configured as six modules of one to seven displays (each module would have its own MIC5821 or A6275 serial-to-parallel sinking driver IC).

    [​IMG]

    Here's another example of the 8-bit bus design/method but turned sideways (scanning rows instead of columns) to drive 5x7 matrix displays.

    [​IMG]
     
    Last edited: 2 Feb 2008
  12. Aurbo

    Aurbo What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    33
    Likes Received:
    0

    What I'm looking to do, is as above, with just a single module of 7 displays.. Your layout looks deceptively simple.. I like it.

    Here is what I hacked together.. but still not sure if its going to work. I'd love the reduce the 595's to a single IC similar to your layout.

    Everything is still open to change at this point. I've looked at several different layouts and for the most part they are all similar..The major change I am looking for is the 3-5 led per segment, segment. that way I can scale the digit size to suit my project.

    Suggestions?

    [​IMG]
     
    Last edited: 10 Feb 2008
  13. Mike K8LH

    Mike K8LH What's a Dremel?

    Joined:
    17 Nov 2005
    Posts:
    36
    Likes Received:
    0
    Hi Steve (Aurbo);

    The TPIC6C595 is a good candidate for a multiplexed single driver IC solution using a 9 pin interface (RB0..RB7 and CCP1 pins). You would also need eight "source driver" transistor pairs.

    Do you need circuit and software help? If so, what development language do you use (C, Assembler, BASIC)?

    -----------------

    Deceptively simple is probably a good description for the circuit (and software). Basically, the PWM pin is doing triple duty to (1) modulate the driver IC output enable line to control display on and off times for brightness control, (2) transfer the contents of the driver IC shift registers onto its output pins, and (3) multiplex the interface pins for use as column driver lines during display "on time" and as clock and data lines to load the driver IC shift register during display "off time".

    The interrupt driver is relatively simple (code example below from an early version of that 6 digit Clock/Calendar/Alarm/Timer circuit). The PWM module is initialized with a period equal to the digit scan rate (1 msec in this case) and brightness is controlled simply by changing the PWM "duty cycle" value in your Main program. PWM "duty cycle" is inversely proportional to "display brightness" so you must use "duty cycle" values between 2..100% for a corresponding 98..0% display brightness.

    Mike

    Code:
    ;
    ;  The seven LED columns are 'scanned' one at a time at 1-msec
    ;  interrupt intervals for an overall 14.3% LED duty cycle and
    ;  142.85-Hz refresh rate...
    ;
    ;  A minumum PWM 'on' time of 2% guarentees a minimun window
    ;  of 20-usecs (100 instruction cycles) at the beginning of
    ;  each interrupt cycle where PWM drives the <OE> input high
    ;  (display off)...  This allows us to reuse the RB1 and RB2
    ;  column driver lines temporarily as '5821 <DAT> and <CLK>
    ;  lines to load the '5821 (without messing up the display) 
    ;  before RB1 and RB2 resume their column driver duties when
    ;  PWM drives <OE> low (display on)...     
    ;                            
    ;  The 2% minimum PWM 'on' time limits maximum brightness to
    ;  98% but the 2% loss of brightness is inperceivable
    ;
    ISR_LED	
    	movlw	d'8'		;				  |B0
    	movwf	BitCtr          ; serial bit count		  |B0
    ISR_Load	
    	bcf	SERCLK		; preset '5821 CLK line lo (RB1)  |B0
    	bcf	SERDAT		; preset '5821 DAT line lo (RB2)  |B0
    	rlf	LEDdata,F       ; shift data bit into Carry	  |B0
    	skpnc			; a '1' bit?			  |B0
    	bsf	SERDAT		; yes, set SERDAT line to 1	  |B0
    	bsf	SERCLK		; clock data bit into the '5821	  |B0
    	decfsz	BitCtr,F        ; all 8 bits sent/loaded?	  |B0
    	goto	ISR_Load	; no, branch and do another	  |B0
    ;
    ;  now setup Port B column drivers before PWM drives the '5821
    ;  <OE> pin low to turn on the segment driver outputs & display
    ;
    ;  COLPOS variable cycles through the following fixed values
    ;  one interrupt at a time to 'scan' the display and switches;
    ;
    ;  00000010, column 1, inverted 11111101
    ;  00000100, column 2, inverted 11111011
    ;  00001000, column 3, inverted 11110111
    ;  00010000, column 4, inverted 11101111
    ;  00100000, column 5, inverted 11011111
    ;  01000000, column 6, inverted 10111111
    ;  10000000, column 7, inverted 01111111
    ;
    ISR_Column
    	comf	COLPOS,W	; invert bits (only 1 bit low)	  |B0
    	movwf	PORTB		; setup the column drivers	  |B0
            rlf     COLPOS,W        ; advance for next interrupt      |B0
            rlf     COLPOS,F        ;                                 |B0
            skpnc                   ;                                 |B0
            bsf     COLPOS,1        ; reset to '00000010'             |B0
    ;
    
     
    Last edited: 10 Feb 2008
  14. Aurbo

    Aurbo What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    33
    Likes Received:
    0
    Thanks for the reply Mike.. Yes I'm essentially stuck at this point.

    Got a quick schem on how this would lay out? the way I understand it, the 12Vdc on the led's would need a PFET to keep the 12vdc isolated from the ic's



    Yes I do.. I'm using WinPic800 at the moment with a JDM enhanced programmer. Any code that I could step through to observe exactly what its doing would be great. I need to learn this stuff not just plug and play it. Something to light up one segment at a time a-g, dp through each digit would let me see the interaction between the code and chip. From there I can change the code to see what it does with changes and learn from there.

    Cheers
    Steve
     
  15. Mike K8LH

    Mike K8LH What's a Dremel?

    Joined:
    17 Nov 2005
    Posts:
    36
    Likes Received:
    0
    Is WinPic800 a development language (grin)?
     
  16. Kipman725

    Kipman725 When did I get a custom title!?!

    Joined:
    1 Nov 2004
    Posts:
    1,753
    Likes Received:
    0
    nah it's software that lets you program the pic with hex files. Can do EEPROMS and amtel micros aswell, is overall quite a spiffy bit of software. I have the same setup actualy but my program didn't come with a serial cable so no programing for me till I get one :p (serves me right for buying the cheapest one I could find).
     
  17. Mike K8LH

    Mike K8LH What's a Dremel?

    Joined:
    17 Nov 2005
    Posts:
    36
    Likes Received:
    0
    Yeah, I know it's programming software (grin).

    Steve (Aurbo):

    Still need to know which development language you use Sir.

    Your schematic shows connection to the SPI port on the PIC which I never thought of using. Sweet. I'd like to study that option.

    Later, Mike
     
    Last edited: 11 Feb 2008
  18. Aurbo

    Aurbo What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    33
    Likes Received:
    0
    Assembly or PicBasic I think will give me the basic understanding of what the code is doing.

    I'm still mulling over which "real" programmer and software package to buy.. Suggestions are definately welcome in that area..


    Cheers
    Steve
     
    Last edited: 13 Feb 2008
  19. Aurbo

    Aurbo What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    33
    Likes Received:
    0
    Mike, K8LH


    What software are you using to create those images with?

    The 5x7 led matrix looks like it would address any need for dual voltages and allow expanded texting beyond the simple digits.

    I'm still looking for a programming language/programmer/software combo that will let me tinker and learn.

    Cheers
    Steve
     
  20. geogecko

    geogecko What's a Dremel?

    Joined:
    23 May 2007
    Posts:
    56
    Likes Received:
    0
    Hey Stevey! Well, it's been a while, and I've completed no project yet! It's been really busy switching jobs and states, so I haven't had much spare time to work on anything.

    Anyway, things are looking promising regarding C-MAX, now it appears Digikey stocks quite a few of their products, so I'm still on to make one of these clocks, however, I've decided to do something a little different, all inspired by this guy:

    http://www.youtube.com/watch?v=uKazTENcNWo

    I'm going to try and duplicate the face of this clock, but plan on using a micro with a MAX6954 driver for the LEDs, and then a 8x2 line character LCD on the back for settings and alarms and what not. It should be a fun little project. He is sending me the plans for his little box that he used. I mistakenly thought it was a baseball display case.

    I'm placing my order for some of the C-MAX parts next week, and have a LCD setup to display things on, so I can see if I can decode the time and display it properly, before doing anything else.

    I'll probably have PCB123 (Sunstone) make the boards, as their software is free, and boards are fairly inexpensive. If I end up making some, I may get a batch of 10-20 boards to sell to others...
     

Share This Page