Git Product home page Git Product logo

hdd-persistence-of-vision-clock_v4's Introduction

HDD converted into a persistence of vision display clock

V4.1 Prototypte Slit Mask:

V4.1 Prototypte Nipkow 12 Hole Mask, Clock and "HELLO WORLD":


V2.0 Project YouTube Video


Project Explanation

The front face of a HDD is removed exposing the internals. The platters are replaced with a stationary LED board and a spinning light mask. The LED board sits against the HDD frame, stationary. The light mask is mounted to the HDD motor.

There is an IR reflective sensor mounted on the LED board that keeps track of an index point on the bottom of the light mask.

The light mask spins quickly, the processor on the Driver Board monitors the sensor and tracks the period of time it takes for a full rotation. The LEDs can then be controlled with precise timing to allow light to escape the holes in the light mask when the light mask is at its desired rotational angle. Doing this quickly enough can trick the eye into seeing an image. This is called persistence of vision.

There are 2 types of light masks designed for the clock.

  • The first uses a slit going from the center of the platter to the edge. This allows me to draw lines radiating from the center of the display. I use this mask to draw an analog clock.

  • The second uses what is known as a Nipkow Disk. This is a disk that has holes spiraling from the center at a constant interval. Each of these holes can then be used to draw pixels on the display. Each hole corresponds to a horizontal line on the display, the vertical pixels are then placed by rotating the light mask and pulsing a backight. One light mask has 8 holes, the other has 12.

*Light masks are PCBs. Actual ordered PCBs have black solder mask. V4 clock uses the same light masks as V3.


Hardware Breakdown

This project is a clock that uses a hard drive to create a persistence of vision display.

The project has 2 PCBs

  • Driver Board
    • This board replaces the original PCB.
    • The Driver Board has an STM32F411 ARM M4 processor running at 100MHz. The driver board controls the whole system from the motor driver chip, LEDs, Temperature sensors, human interface, etc.

  • LED Board
    • This board replaces the bottom platter in the HDD. A 3D printed spacer is used to elevate the light mask, which replaces the second platter.
    • The LED board contains 116 APA102-2020 LEDs in a circular pattern. It also has an IR reflective sensor which can be used to either track a shiny pad on the light mask, or the absence of one, depending on the light mask used. The LED board also has a board mounted temperature sensor.

The electrical connections between the PCBs are made between spring-loaded header pins mounted on the driver board and contact points on the back of the LED board.


Assembly

*Above shows Driver Board V4.1 and LED Board V3.1



Firmware Breakdown

Update

A new version of the Firmware will be uploaded soon which includes code to run the Nipkow mask. I'm currently in final stages of testing.

Firmware Flow Diagram

See the Spinning Vision Flow Diagram for a visiual outine of the code flow.

Overview

STM32CubeMX was used to generate the microcontroller setup code and files. See the peripheral settings I used further down this readme for setup information. I'm not finished writing the firmware yet. The firmware I've uploaded has the following features:

  • Persistence of vision
    • Slit mask
    • Nipkow mask
  • Devices
    • RTC
    • Temperature Sensors
    • Motor controller
  • Interface
    • Momentary buttons (x3)
    • Rotary encoder
  • Display
    • Analog clock animation
    • Nipkow animation
  • Configuration
    • Manual time setting
    • Multiple clock faces

Hardware Implemented in Firmware (so far)

  • Code outine in .c and .h files was generated with STM32CubeMX.
  • Overview of components configured and used in the uploaded .c main file:
Hardware/Component Configured Implemented Detail
APA102-2020 LEDs YES YES 2 Lines at 25MHz. Display and rear LED
DRV1173 BLDC motor driver YES YES PWM frequency 10kHz (TIM2 CH1)
DS1307 RTC YES YES I2C, basic implementation
NCT175 temperature sensor YES NO I2C, 3 sensors, basic implementation
Right-angle momentary buttons YES YES X3 buttons
Right-angle rotary encoder YES YES 24 pulses/rotation, TIM5 encoder mode
GPIO LED YES NO not used surface mount LED
USB-C NO NO -

Microcontroller Configuration

* Microcontroller is running at 100MHz using a 16MHz external crystal.

Timers

Timer Configuration Function
TIM2 PWM Generation CH1 Motor speed signal
TIM3 Gen Timer at 1MHz Microsecond timer used for display algorithm
TIM5 Encoder input Encoder input
TIM11 Gen Timer at 1MHz, interrupt overflow at 1000 pulses Interrupt at every 1ms for ms counter

Connectivity

Peripheral Configuration Function
I2C1 Standard speed Communication: RTC, Temp sensors
SPI2 Master Transmit Only, 25MHz Rear LED Communication
SPI5 Master Transmit Only, 25MHz Display LED Communication
USB Not configured yet Serial communication for debugging

GPIO

Pin Configuration Given Name Function
PA2 INPUT TempAlert1 Temperature alert pin for Driver Board temp sensor
PA3 INPUT MotorFG Motor speed feedback signal
PA4 INPUT MotorDirection Reads direction setting (set in hardware)
PA6 INPUT fastMotor/slowMotor Reads speed setting (set in hardware)
PA7 INPUT motorFault Reads the motor fault output
PB12 INPUT button1 Input for button 1
PB13 INPUT button2 Input for button 2
PB14 INPUT button3 Input for button 3
PB15 INPUT encoder_button Input for the encoder button
PC0 INPUT TempAlert2 Temperature alert pin for the display temp sensor
PC9 INPUT testLED Basic LED for functional testing
PC10 INPUT opticalSwitchBuffOut Optical sensor output (sent through a buffer)

DMA

  • DMA is not used yet. This microcontroller has 2 DMA controllers. I'm planning to use them for:
    • I2C communication
    • SPI communication


What’s Next?

I'm developing this project in my spare time. Updates will come in batches.

  • Hardware

    • Driver Board V4.1
      • choose new motor driver chip
      • choose new DC jack
      • Fix SPI lines
      • fix via placements
      • fix air temp sensor routing
      • fix motor connector orientation
      • update IR sensor signal resistors
      • order PCBs and parts
      • assemble PCB
      • test hardware (hardware is good)
      • update documentation (if needed)
    • LED Board V4.0
      • pick new IR reflective sensor
      • order PCBs and parts
      • assmble PCB
      • test hardware
      • update documentation (if needed)
  • Firmware

    • Devices
      • temperature sensors
      • real time clock
      • LEDs
      • motor driver chip (V4.1)
    • Persistence of vision (basic)
      • slit light mask
      • Nipkow Disk
        • Prove concept
        • Optomise

hdd-persistence-of-vision-clock_v4's People

Contributors

tickingclocks avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.