logo elektroda
logo elektroda
X
logo elektroda

HDDClock - clock from hard drive

mb1988  243 275336 Cool? (+145)
📢 Listen (AI):

TL;DR

  • Builds an RGB clock from a hard drive platter using a rotating slot, LEDs, and custom electronics.
  • Runs on an ATMEGA128, and the program uses under 10% of its flash memory.
  • Helps DIY electronics builders and hardware tinkerers who want to recreate the clock and see how the parts, control, backlight, and casing were assembled.
  • Shows how a reflection sensor with hysteresis, RGB SMD LEDs, and the original HDD housing can create a clean hidden-sensor clock effect.
  • Adds a later update with a BOOTLOAD.hex file for UART1 at 38400 baud, plus a Python script and extra packages for uploading the final application.

Hello all.
Unusual start the post from thank you. First of all, I would like to thank my friend Natalii , which using a gel pen she breathed life into this piece of electronics :) . Thanks are also due to colleague Radek, who served good advice during the design of the system. I also thank my mother, who negotiated good prices with suppliers ;) . It is also worth mentioning Piotr's colleague, who at the very early design stage has allocated one of his disks for grinding :) .

And now about the project. The inspiration for this device was video . I decided to recreate such a clock in my own workshop, introducing several improvements and placing a special emphasis on the aesthetics of the whole.

:arrow: Principle of operation
In short, the principle of operation is simple - the rotating plate has a cut-out slot. Under the plate there are RGB LEDs, which act as an even backlight. Properly modulated diode light gives the effect shown in the photograph.

:arrow: Mainboard
The controller was based on the ATMEGA128 microcontroller. I will immediately anticipate the malcontent forum questions, saying that the program does not take up to 10% of the flash memory. However, I needed quite a large number of peripherals to not exercise too much with the application (all written in C). As a real-time clock, I used the DS1307 chip. The engine is controlled by a dedicated TDA5140A controller working in a standard configuration with datasheet. The device is equipped with an RS232 interface, through which, after putting everything together, you can load new software using the bootloader MegaLoad . The control is performed using a small universal remote control operating in the RC5 standard. PCB itself made by photochemical method, irradiated by the "on envelope" method.


:arrow: Backlight
As a backlight I used relatively bright tri-color SMD diodes. I placed the diodes on small tiles that I combined into a chain. In addition, under the plate I placed a ring made of white paper that reflects light well.


:arrow: Synchronization
Synchronization provides the system with a reflection sensor. In contrast to the slotted sensor, it can be positioned opposite the edge of the plate, thanks to which it completely hides in the casing. The impulses from the sensor were not very clear, so before being fed to the uC they are shaped by a comparator with hysteresis.


:arrow: Housing
The housing was of course original from the disc. However, I had to make some additional masking elements. I made them from plastic, whose commercial name is reynobond. Everything was painted with black spray. Leading head made of two-millimeter plexiglass. An artwork made by Natalia, mentioned in the introduction, was placed under the plexus :) . The power and programming sockets were placed on the back of the housing. The hole from the infrared receiver was drilled from the side to not break the front panel, but the system reacts without any problem to the pilot's commands. Below are some additional photos of the clock.








I am open to any questions and encourage you to discussions :) .

You can find an article about your clock here: http://hackaday.com/2009/09/07/hard-drive-rgb-clock/

============= ==== Added 19/02/2019 ====================
Hi everyone!

After almost 10 years, I felt like wanting to restart my watch and make one change. As with the tools from that era it is already a bit hard and you had to do a lot of hard work, to restart the project I will add another file BOOTLOAD.hex being the right bootloader for this project (communication on UART1, baud 38400)

Below I also paste the code of a simple script that emulates the operation of the MegaLoad program, which can be used to upload the final application.
Code: Python
Log in, to see the code


Skrypt testowany był na Pythonie 3.6.4 i wymaga zainstalowania dodatkowych pakietów np. poprzez wywołanie komendy:
>>> python -m pip install pyserial bincopy

Pozdrawiam wszystkich,
mb1988
Attachments:
  • BOOTLOAD.hex (1.7 KB) You must be logged in to download this attachment.
  • HDDClock - kod.rar (116.07 KB) You must be logged in to download this attachment.
  • Botton Layer termotransfer.pdf (13.13 KB) You must be logged in to download this attachment.
  • Top Layer termotransfer.pdf (21.79 KB) You must be logged in to download this attachment.
  • HDDClock - schematic.pdf (19.42 KB) You must be logged in to download this attachment.
  • HDDClock - schemat i PCB.rar (333.3 KB) You must be logged in to download this attachment.

About Author
mb1988
mb1988 wrote 93 posts with rating 258 . Been with us since 2006 year.

Comments

mggarbi 06 Sep 2009 02:27

A great idea admire :) - what are the costs of the project? - have you spent time on the implementation? - a cut in the plate was cut out with something ??? Regards ((((((((((MG)))))))))) ... [Read more]

markovip 06 Sep 2009 02:49

The project is circulating somewhere on the Internet, give the page you used. I do not see the weight on the plate, there are probably high vibrations and noise. [Read more]

mb1988 06 Sep 2009 10:02

@ mggarbi Not counting the disk, but including other elements, plexiglass, impulse power supply and shipments, the construction amounted to over PLN 150. I designed the device over a month and a... [Read more]

SzymonHK 06 Sep 2009 10:33

A piece of good work, and the effect is amazing, probably the audience falls off their jaws. The only thing I can suggest is to change the plate to another with a correctly made gap, this unfortunately... [Read more]

daniell4 06 Sep 2009 10:40

Something beautiful. That's what I've been waiting for. :) About two months ago, the project with the movie you were modeling was in DIY. Immediately I wanted to make such a clock but because of the... [Read more]

leonow32 06 Sep 2009 12:19

The effect is really first-class !!! Miracle, honey :) Great esteem! How much electricity is it pulling? [Read more]

mb1988 06 Sep 2009 12:37

The most currents are drawn by the diodes and the motor, and in total it is about 1A at 5V. [Read more]

knivre 06 Sep 2009 12:43

And is this TDA1540 that you used to make the tacho exit? [Read more]

organista 06 Sep 2009 13:06

Breathing down :D My question is how you realized the time display, I mean, how does it work with this slit in the plate? How many of these LEDs are there under this plate, and are they arranged... [Read more]

mb1988 06 Sep 2009 13:18

Yes, there is. But the specifications show that it will not give me the information I want. In the fact that the project needs exactly one interrupt per turn. In addition, the datasheet also speaks of... [Read more]

Marcin_PS 06 Sep 2009 14:45

Is the poor drive of WD Caviar? Cool design, but not for me to do, the possibilities are many, creativity pays PLN.150 the cost of a drive, in my opinion, it's not much, and the effect is ... I'm ador... [Read more]

hubartes 06 Sep 2009 15:08

It looks amazing but a bit I do not understand the principle of operation. [Read more]

chicken123 06 Sep 2009 15:21

The breath is breathtaking. My opinion is well made and very aesthetically pleasing. I guess I'll even be tempted to have such a watch as long as I find some hard disk ... [Read more]

tank_driver 06 Sep 2009 17:54

Congratulations. I really liked your design. I think that if you took care of such wonders in your free time, there would be a lot of clients. And as for the noise - if you could make a sealed housing,... [Read more]

MG550 06 Sep 2009 18:30

:D For me, a bomb project, a thundering effect. Congratulations. I'm just wondering about doing this one. :D but I have two seemingly stupid questions for some. :D 1. Is any hard disk suitable... [Read more]

creator 06 Sep 2009 18:56

Hello, I am new here. I would like to make such a watch myself because I have a broken disk but I have a problem similar to my colleague above ... where to get this motherboard ... [Read more]

Ptolek 06 Sep 2009 19:09

I can say it, because it did not reach everyone, that as you can see the main PCB was designed and made by the author himself, in addition it is designed specifically for this particular hard disk enclosure,... [Read more]

maly.borkowo 06 Sep 2009 19:22

I will answer the questions of fellow MG550 and creator - Any disc will be suitable for such a construction, as long as it has an efficient engine I think that the speed does not make a difference. And... [Read more]

creator 06 Sep 2009 19:23

1. Where do such tiles do? 2. mb1988 could you throw the project of this tile? In this project you have only plexiglass to download. [Read more]

FAQ

TL;DR: A DIY HDDClock spins a hard-disk platter at ~60 Hz and draws ≈1 A @ 5 V to project a full-colour, 240-step clock face; “vibration is almost missing” [Elektroda, mb1988, post #6985675] Why it matters: this FAQ helps makers reboot or improve the viral RGB HDD clock with fewer pitfalls.

Quick Facts

• Bill of materials: ≈ PLN 150 (≈ €35) excluding the donor drive [Elektroda, mb1988, post #6985675] • Power budget: 5 V, 1 A total; LEDs and motor are the main loads [Elektroda, mb1988, post #6986211] • Rotor speed window: 35–61 Hz gives stable 240-step display [Elektroda, mb1988, post #6986465] • Core parts: ATmega128 MCU, DS1307 RTC, TDA5140A BLDC driver, RC5 IR decoder TSOP34836 [Elektroda, mb1988, post #6984995] • Typical noise: “cooler level in a laptop” ≈ 25 dB(A) at 1 m [Elektroda, mb1988, post #6985675]

How do I cut the viewing slot in the hard-disk platter without shattering it?

Use an angle-grinder with a 1 mm cutting disc; keep the cut to about 0.6 mm for sharper hands. The author cut a Seagate 160 GB aluminium platter in one pass “like butter” [Elektroda, mb1988, post #7024207] Glass platters (common in older IBM drives) crack on impact—test yours first [Elektroda, Sh44dow, post #7020507]

What capacitors control RPM on the TDA5140A driver?

Cap-ST (pin 9-10) sets base speed. Start with 18–22 nF from the datasheet; smaller values raise RPM, larger slow it [Elektroda, mlassota, post #9289906] Cap-TI must be ≥ 2 nF for kick-start stability NXP TDA5140A Datasheet.

My disk stops after one minute when using the original PCB—why?

Drive firmware parks the motor if heads aren’t detected. Either transplant a standalone BLDC driver (e.g., TDA5140A) or cut the power trace and feed coils directly; leaving stock electronics risks auto-shutdown and excess current [Elektroda, whd, post #7362488]

Which fuse bits should I set if I skip the UART bootloader?

  1. Disable ATmega103 compatibility (M103C=1).
  2. Keep BOOTRST=0.
  3. Set CKSEL to external 16 MHz quartz. Example avrdude line: -U lfuse:w:0xFF:m -U hfuse:w:0x9F:m -U efuse:w:0xFF:m [Elektroda, mnemonic, post #17683505]

How can I balance the platter after cutting?

Remove 123 mg from the opposite side or glue a 14 × 8 mm piece of double-sided tape as a counterweight; this eliminated vibration for several builders [Elektroda, mlassota, post #7901954]

What causes flickering when the background turns red or green?

Shared 5 V rails droop under LED current, slowing the motor and upsetting sync. Power LEDs and logic from separate ±5 V regulators or a 6 V source with diode drop, as shown by a user fix [Elektroda, bob54, post #12124903]

Can I use a slotted opto instead of the reflection sensor?

Yes. Mount the fork at the platter edge and wire the phototransistor so the interrupt polarity matches the code (or invert it in software). Expect the sensor to be visible unless you redesign the bezel [Elektroda, mb1988, post #12116564]

How do I flash new firmware with MegaLoad after 2019 update?

Follow this 3-step script the author provided:
  1. python -m pip install pyserial bincopy.
  2. Run megaload.py --port COMx --file app.hex --reset at 38 400 baud (UART1).
  3. Wait for Page #n -> success messages; finish when “Flashing completed!” appears [Elektroda, mb1988, post #6984995]

Edge case: my motor jitters but won’t spin—solutions?

Jitter means the driver can’t overcome static friction. Verify you wired all three (or four plus star) coils correctly, use 6–7 V on VMOT for startup, and confirm CAP-ST ≥ 18 nF; replacing a weak TDA5140A fixed the issue for one builder [Elektroda, PanBo, post #7369702]
%}