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

Electronics LED clock I made today

Discussion in 'Modding' started by SteveyG, 4 Apr 2004.

Thread Status:
Not open for further replies.
  1. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    Today I had nothing to do and was rather bored, so I decided that I'd make a new clock for my room - one that I could see in the dark too!

    Here's the result of 12 hours work:
    The front:
    [​IMG]
    [​IMG]
    With lights off:
    [​IMG]
    The back of the PCB:
    [​IMG]

    The wires along the back of the pcb are for ICSP for the PIC which I forgot about until I'd finished the PCB layout :duh:

    The actual circuit was pretty simple, though the PCB layout ended up being a real pain in the arse to do.

    Next time I'll do one with blue or white LED's.

    Comments please! :baby:
     
  2. TheAnimus

    TheAnimus Banned

    Joined:
    25 Dec 2003
    Posts:
    3,214
    Likes Received:
    8
    nice speedy work :)
    was that what the code was for by chance?

    also can we get some bigger pics :)
     
  3. The Bodger

    The Bodger What's a Dremel?

    Joined:
    26 Dec 2003
    Posts:
    421
    Likes Received:
    4
    Nice clock! Are you going to put it in a case, or leave it as it is? (I'd probably go for a plexi case - I like to see what I've made!

    As far as clocks go, I've already built one slightly unusual clock, which used nixie tubes, and now I'm getting more adventurous and I'm converting an old oscilloscope into a clock!! (The tube will be the screen)

    If I decide to go ahead and post the results when its finished, (probably in mod summer) then maybe we should open a specialist 'DIY special clock' forum :D

    Anyone else got any DIY clocks they would like to share in this thread?

    As for the 'code', I reckon that it is in 24 hour mode: 00 hours, 25 mins, XX seconds (changes in the photos)


    Edit: Just noticed that the clock is already hanging on the wall. One idea, one question:
    Idea: Make a custom power supply for it so that it can retain its time in a power cut. (back up battery or similar)
    Question: Where did you get a white PCB? I've never seen one like that before, all mine are yellow, or greenish.
     
    Last edited: 4 Apr 2004
  4. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    Here's some bigger pictures:
    [​IMG]
    [​IMG]

    Shame about the nasty wire links :( But there really was no way to do it without them. Maybe next time I'll do it with a double sided board, but i didn't have any to hand today since it was an unplanned project.

    The code I asked for in the early hours of this morning was part of a routine to count seconds, so thanks for your help with that TheAnimus.
     
  5. TheAnimus

    TheAnimus Banned

    Joined:
    25 Dec 2003
    Posts:
    3,214
    Likes Received:
    8
    ah sorry didn't explain very well by the code, i was refering to some code for adding 24bit number to a constant i was helped with.
     
  6. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    Thanks :) I'll either leave it bare or make some kind of clear case for it - I too like to see what I've made, and the front looks reasonably tidy. If it was a mass of wires I'd want to cover it over ;)

    I think I'll build several different clocks in the near future, and I'd like to see some other people's clocks for inspiration.

    Yes it's in 24hr mode. I always prefer to read clocks in 24hr rather than 12hr - The amount of times I've set my alarm clock for 7.30pm is rediculous! :wallbash: 24hr clocks all the way!

    I didn't really put a lot of thought into extra features for the clock today, but for my next clock I will certainly do this.

    The circuit board is Economy Photo Board from Mega Electronics (sold at Rapid too). It's quite a lot cheaper in the bigger sizes of board, and I actually prefer the white board to standard fibreglass board.

    The TMR0 prescaler was set to 65536, and on every interrupt it subtracted this amount from 1000000 (4Mhz XTAL), when the high byte reached zero the time was updated and 1000000 was added to whatever was left over in the previous mid and low bytes. This does mean that every second maybe slightly longer/shorter than the last (not enough to notice), but overall there will be no loss of time.

    Is there a better method of counting in seconds?
     
  7. TheAnimus

    TheAnimus Banned

    Joined:
    25 Dec 2003
    Posts:
    3,214
    Likes Received:
    8
    As i mentioned in a thread in this forum for a binary clock, get urself an RTC or Real Time Clock chip, this will often interface to the CPU via I2C and have its own support for a battery cell that will give years of life.

    The RTC keeps the time, the PIC just queiries it.
     
  8. Hargle

    Hargle What's a Dremel?

    Joined:
    13 Oct 2001
    Posts:
    404
    Likes Received:
    1
    Nice clock :)

    What is the number on the far right in the first of the two larger pictures you posted?
     
  9. Xiachunyi

    Xiachunyi What's a Dremel?

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    Very nice work! :rock:
     
  10. Morphine

    Morphine weeee!

    Joined:
    23 Feb 2002
    Posts:
    3,423
    Likes Received:
    2

    hours:minutes:seconds
     
  11. thecrownles

    thecrownles What's a Relix?

    Joined:
    27 Feb 2004
    Posts:
    733
    Likes Received:
    0
    no but look... its not an actuall number lol its like this:

    edit: damn that line drawing didnt work, go look at
    the number that is all the way right on the first big picture, its not a number

    lol its not a 6 and its not a 9 or 7 or anything i can see, unless he has a faulty or unclosed circuit for those leds in that row :eeek:
     
  12. Smilodon

    Smilodon The Antagonist

    Joined:
    25 Mar 2003
    Posts:
    6,244
    Likes Received:
    102
    looks like the 6 is mirrored :duh:

    anyway. nice clock! i found a broken one as school once, so i took out the LEDS from it to make my own.. never got around to it, but i might make one in the near future... i think i have 74 yellow LEDS that works just fine... and some more that i'm not sure about yet...

    i might make myself a binary clock instead... or mabye an analog clock with LEDs.. (i have drawed chematics for both already :) )

    edit: normally I use those white PCB's aswell. They are much easier to work with than the normal green ones... looks nicer aswell :)
     
  13. lamcdonald

    lamcdonald What's a Dremel?

    Joined:
    1 Mar 2004
    Posts:
    123
    Likes Received:
    0
    Looks like it changed from :11 to :12 just as he took the pic :)
     
  14. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    Thanks for the comments guys

    Yep, it was just changing from 11 to 12, but the shutter on the camera was open long enough to see both numbers.

    It's not quite keeping time perfectly yet though, so I need to make a fine adjustment to the code. It lost about a quarter of a second overnight.

    /edit:
    Just tested how much current this clock draws - only 30mA with a 12V supply! Not bad for 130 LED's!!
     
    Last edited: 4 Apr 2004
  15. [Tom]

    [Tom] Minimodder

    Joined:
    10 Dec 2003
    Posts:
    505
    Likes Received:
    2
    Very nice work....
    Any chance of the schematic being posted? please!
     
  16. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    I'll try to draw one up, but I can't remember exactly what I did now.
     
  17. modding-monkey

    modding-monkey What's a Dremel?

    Joined:
    29 Jan 2004
    Posts:
    200
    Likes Received:
    0
    Cool! please could you post schematics, pcb layout and components list if you have time?
    :D
     
  18. SFOD-D LoneWolf

    SFOD-D LoneWolf What's a Dremel?? :p

    Joined:
    10 Apr 2004
    Posts:
    858
    Likes Received:
    0
    WOW, it looks really great.




    Cheers,
    Mike
     
  19. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    IIRC the schematic was along the lines of this, but really it's up to you how you design the circuit as it all depends on what code you use.

    [​IMG]

    /edit,

    I missed off the GND between the two capacitors on the XTAL, and tie MCLR to VDD.
     
  20. Blue Raven

    Blue Raven What's a Dremel?

    Joined:
    25 Sep 2003
    Posts:
    247
    Likes Received:
    1
    Can you post the code for it. I have been looking for a clock project and i realy like the idea.
     
Thread Status:
Not open for further replies.

Share This Page