Hard drive clock is powered by Microchip PIC18F2320 clocked at 40MHz.
PIC18F2320 is a fast and versatile microcontroller with hardware I2C serial interface and plenty of I/O ports to handle communication with all external modules.
Actually, any medium range microcontroller can be adapted for this project. I have quite a collection of various PIC microcontrollers and I've chosen chip with excess of memory and I/O ports to allow some modification in the future.
PIC18F2320 based clock controller. |
Controller is assembled on a double sided home-made PCB which was fabricated using proven heat toner transfer method.
Home-made double sided PCB for clock controller. |
Compact sized board bundled with LCD, hosts PIC18F2320 microcontroller with clock crystals, LED switching MOSFETS and real time clock module.
Clock controller, LCD, RTC. |
To multitask parallel operations microcontroller employs two independent internal timers.
Short interval timer0 is dedicated for measuring time of full disk revolution.
External interrupt function resets Timer0 upon signal from index sensor. Current time value is used to calculate precise moment for LEDs to switch ON and OFF. Because of that, clock displays correct position of clock hands regardless of disk RPM.
Clock controller assembled. |
Main program loop is used to check and reset control flags, scan keyboard, refresh LCD, recalculate latest position of clock hands and toggle RGB LEDs accordingly.
LCD with blue backlight. |
Controller is connected with external modules via 8 connectors and whole unit can be easily taken apart and reassembled back.
Keyboard assembly contains two illuminated buttons which are used to set correct time, date and select clock mode.
Current time, date and service information are displayed on LCD.
Free for noncommercial use technical notes include:
- schematics;
- PCB in PDF format;
- BOM;
- HEX file for PIC18F2320;
- C source code for CCS compiler.
Hardware documentation available for download.
Firmware documentation available for download.
(part 4)<--- DIY hard drive clock ---> (part 6)
wauw, that design looks really neat. i love the way you put alot attention to detail and how everything fits perfectly. good work!
ReplyDelete