Arduino LED clock

Hi,
The first and probably final version is finished.


180 RGB LEDs driven by TLC5925 constant current LED drivers
each LED addressed separately (12x TLC5925 with 16 outputs each).
each colour adressed individually
4x 7 segment LED display
Atmega328P as MCU
DS1307 real time clock
Photoresistor (for adjusting brightness)
And DHT11 for temperature and humidity
Backup battery for clock
5V DC (eg USB)

at full power it is REALLY bright. Thats why is there 60 step brightness dependent on ambient lightning and time of the day

Colours are combined so I can create virtually any, realistically I have 10 of them setted up.


Because of each LED being addressed separately = NO Flickering

Its built on doublesided copper clad board using Toner transfer method. The routes aren't smaller than 0.44mm and all vias are made for 0.8mm drilling (truly DIY). Just around 5 vias are under a component and 7 segment displays have singnals only from bottom side (for easy soldering)

The switches in the centre were placed there for testing and can be removed. There is three of them on the side of the case

EDIT: Switch connected to A2 (PIN25) is replaced by 10k photoresistor and used as a sensor for ambient light. Other 3 switches on the PCB board are used as MENU/UP/DOWN.
The board and program is AS IS. No guarantee, but I have it and it's working.
Also please note that the 9 wires from the P-FET transistors are on a middle layer of the PCB that doesn't exist. I have that layer done with wires at the back of the PCB, because it was simply too tight with the toner transfer method to create paths. 

P-FET transistors used are DMP2160U - general P-FET in SOT23 20V/3.3A
All R-Ext resistors are 2k2 (cca 9mA current through LEDs), resistors on the switches are all 10k (pullup/down) and resistor on diodes are 220R (cca 9mA)

Pay Extra attention to the orientation of the PLCC LEDs !!! Cathode towards the centre (connected to the TLC5925) and anode to the outside (connected to the P-FETs). I bought recently PLCC LEDs that had the Lock on the anode, not on the cathode, BE CAREFUL and double check the polarity of YOUR diodes!

The small solder jumper beside DS1307 is to select either the two LEDs beetween the 7-segment to be permanently on or flashing at 1Hz frequency

The middle layer (from the P-FETs) is just six wires on the right connecting the P-Fets with the positive rings connecting Anodes of the LEDs at the bottom of the clock (there was no space)

I have these clock now running over half a year without a single LED gone so NO, they won't burn quickly.

Also for accurate reading, I recommend to connect the DHT somewhere away from the PCB. The PCB itself is getting warm and makes the temperature reading unaccurate

Go through the datasheets before you start building.

Links:

Eagle files, HEX  & Arduino code + script for LED placement & rotation




Schematics:




Pictures:










video

30 komentářů:

  1. welcome you
    'd love to do an installation card as your
    proving you can help please?
    can provide the product code for me please?
    thank you much

    OdpovědětVymazat
  2. I don't exactly know what you need. Everything is here for download

    OdpovědětVymazat
    Odpovědi
    1. please send me the arduino code or hex file at domdomgin@yahoo.com..thanks..

      Vymazat
  3. Awesome Project!
    I really like it ;)
    Would you offer a BOM?
    How large is the PCB?
    ATM i can't open a file from your archive... :-/

    Best regards, Stefan

    OdpovědětVymazat
  4. Nice Project. Have you tried pulsing the anode MOSFETs to dim the LEDs?

    OdpovědětVymazat
  5. Hi,
    The PCB is 203x203mm. You should be able to get this size PCB in your local shop. I'm not sure what BOM means. The archive is fine, I've tried to open in logged out without any problem. If you want, I can send you the files by e-mail or upload it to another server.
    To Adam: This is included in the program already. It's dimming the LED's automatically. Reading a value from photoresistor with ADC, then dimming (pulsing MOSFETs as you want). Currently it's updating colours @cca500Hz via shift register. That can be used to mix colours / dim.
    I'm happy the way it is, even though the program might be a little bit messy (my second program written in C).

    OdpovědětVymazat
    Odpovědi
    1. Hi,

      thank you for the BOM and the Information. Your Archive is just fine, but i don't have eagle installed on my PC.
      The Materials are much cheaper then i thougt ;-)
      But I'm sad, i can't find RGB LEDs on (german) eBay :-(

      With best regards, Stefan

      Vymazat
    2. If you want, I can export it to a different format. If there is a Eagle script for it. Like DesignSpark. The LEDs I bought are not there anymore, but look for RGB PLCC 5050 LED
      I just found there 100 for €8 incl. postage (at the bottom)
      Look

      Vymazat
  6. Also in the program, all leds are in arrays minutes[0-60], seconds[0-60] ... after writing boolean true/false just call updateLED(); and that'll do the job. So are the coulours and so are the diming steps. Everything as simle as possible (to my programming skills)

    OdpovědětVymazat
  7. I think Stefan is looking for a bill of materials or parts list for your design. I assume this can be derived from the source design files. I haven't installed Eagle to try.

    Can you update the drivers fast enough to both PWM the anode drive (to globally dim the colors and rings) and PWM the cathode drive (to further dim and color mix the individual LEDs)?

    What did you set your maximum LED current to be?

    You have given me some good project ideas. Thanks Burak!

    OdpovědětVymazat
  8. Unfortunately I don't have any list of materials, but it can be exported from Eagle. This is first and final version. No prototype, nothing.
    I guess I can, but I don't thing it's necessary. Cathode of every single LED (RGB) is driven by TLC5925 set to cca 10mA (Rext = 2k2) therefore max. current is 1.8A (180x0.01) + display & circuitry. To avoid Brownout I have it slightly dimmed not to exceed 1.5A (USB2.0) and I had to add 2000uF capacitors close to the USB connector.
    Then there is second TLC5925 (could have been 595) that control 9 MOSFETs (to drive each colour for hours, minutes and seconds)
    In ISR (Timer 1) is simple routine that is turning only one colour at a time (in each row). If I wanna dim it I just skip couple ISR cycles and send nothing. I'm not 100% sure, but I thing it's close to 500Hz.
    So If I send R,G,B,47x nothing I will get white colour and low brightness. It's behind black film so it's nicely dimmed & you don't see flickering for up to 60 blank.

    Note: You can also notice that output enable is connected to one of the Arduino PWM pins. Original idea was to dim with PWM, but wasn't necessary (can be implemented). 5925 is capable of shifting with OE HIGH/LOW and min. OE pulse duration according to datasheet is 200ns (I guess You'd have to calculate min and max PWM duration @ required PWM frequency)

    OdpovědětVymazat
  9. - I live in Vietnam so I said you confusing
    - Now I was finished circuit but I'm having difficulties about the program, you can send me to my hex file can be loaded directly into IC program because I do not understand your message more
    - Send mail: chieuduongbocchay@yahoo.com.vn
    - Thank you much, have fun, hope your feedback

    OdpovědětVymazat
  10. Can you please send me all the files(hex, schmatics...) on my email 'coz I'm having troubles with my internet explorer, it wont let me download the files. Something with the pop up blocer which I do not understand. My email is: abkovacicek@gmail.com

    thank you so much, this is an awesome project, good job!! :))
    Antun

    OdpovědětVymazat
  11. Hello

    Could you send to my mail hex files ? your project is great and I would to use your file into my project or use some your idea. My mail is valdi.s@onet.eu

    Thanks a lot

    Br

    OdpovědětVymazat
  12. Can you please send me all the files(hex, schematics...)

    My email is: ionutbyly@yahoo.com
    Thanks a lot

    OdpovědětVymazat
  13. send me to my hex file can be loaded directly into IC program because.
    Send mail: ionutbyly@yahoo.com
    ionutbnyly@clicknet.ro
    Thank you much

    OdpovědětVymazat
  14. send me to my hex file can be loaded directly into IC program

    Send mail: ionutbyly @yahoo.com or
    ionutbyly@clicknet.ro
    Thank you much

    OdpovědětVymazat
    Odpovědi
    1. The HEX file was added in the download folder here:
      https://docs.google.com/open?id=0B66mbi7rFR8OUTZhcXR5LU1KTmM

      Vymazat
  15. Hi, few people was worrying about the lifetime of the LEDs. I can now confirm that the clock is running for over half a year without a single LED gone.

    OdpovědětVymazat
  16. Hi, i have choose your projetc for my electronic project class, but i have some questions. First, what are the values of all of the resistors and what kind of P-FET you used ?

    I await your response,thanx alot.

    OdpovědětVymazat
    Odpovědi
    1. Hi. Me to please Values of all the resistors and names P-Fet. Sorry for my bad English...;/

      Vymazat
  17. Hi, i have download your schematic on eagle and he found a lot of error, so i dont know if the .brd file are good ? does he need change before sent to the PCB shop ?
    thank for your reponse .

    OdpovědětVymazat
  18. There will be a lot of errors because of the stop mask, few overlaps with layer15 (the wires which are not really on the PCB itself), clearances for the solder jumpers and maybe few other not important things for DIY manufacturing. You shold get all that fixed if you want to get it done professionally. It should pass DRC. If you want to have the board made, I also suggest to change the drill size of the Vias and check all the drill sizes for the parts. Don't forget to check the polarity of the RGB diodes YOU have before soldering (cathode to TLC5925) and I suggest to add a capacitor close to the MCU (~470-1000uF) as mentioned above. Build this only if you know what you're doing.

    OdpovědětVymazat
  19. Hi, I like this project.Since I am new in AVR. I have already download the file Hodinyc4.cpp.hex. Can I program this hex file directly into Atmega328. IS any fuse bits settings are required? kindly prove the fuse bits values to program atmega328

    OdpovědětVymazat
  20. Can you please post a parts list if possible via export list from eaglecad? Thank you man, if there is any other edit that you made... please let me know, otherwise....AWESOME PROJECT man !!!!

    OdpovědětVymazat
  21. Hi, could you send me a list of materials used? This project rocks!!!

    OdpovědětVymazat
  22. Very Very Nice Project , In the year 1985 I made Similar project , but without Atmega nor Arduino , It was 2 Circuit Boards , one for the logic and RTC , and the second for the LED , I think I still have this one in my old case , I'll try to find it , but I dont know if the clock still works today :)
    I Will Try your project after my actual one : a dash board for my old van ( Renault Trafic ), with LCD display and full features .
    Thanx to share your mind :)

    OdpovědětVymazat
  23. i have made this project. It is working, but during some time led flicker very fast. Please help me. where is the problem. i used MBI5026 instead of TLC.

    OdpovědětVymazat