Difference between revisions of "StackClock"

From Hackstrich
(Adding a bunch more info put together in the past day or two.)
Line 2: Line 2:
  
 
== Status ==
 
== Status ==
 +
* 2017-09-17: Started working on this again, putting BOM together and such.
 
* 2016-09-15: Started putting this idea together.
 
* 2016-09-15: Started putting this idea together.
 
* 2015: Tried to find some commercial clocks I could stack up to make this, failed to find anything nice looking that supported 24h time. The [http://incolor.inebraska.com/bill_r/hayes_stack_chronograph.htm Hayes Stack Chronograph] would be cool but they're very rare now.
 
* 2015: Tried to find some commercial clocks I could stack up to make this, failed to find anything nice looking that supported 24h time. The [http://incolor.inebraska.com/bill_r/hayes_stack_chronograph.htm Hayes Stack Chronograph] would be cool but they're very rare now.
  
 
== Specs ==
 
== Specs ==
* Arduino-compatible master board on the bottom has the RTC and keeps time.
+
* Arduino-compatible Base Board on the bottom has the RTC and keeps time
* Display boards stack on top of that board
+
** Supports multiple oscillator options:
** As many as you want to stack (up to maybe 8 or 16)
+
*** TCXO (cheap, stable to ~216ms/day)
 +
*** OCXO (less cheap, stable to ~840us/day or 305ms/year)
 +
*** External clock input from a Rb/Cs or other reference
 +
** Has an encoder on it to allow changing the time briefly to compare between time zones
 +
*** For instance, "this log is in UTC and it says 0502, what time was that in Calgary?"
 +
*** A few seconds after the encoder stops rotating, display goes back to real time
 +
* Arduino-compatible Display Boards stack on top of that board
 +
** As many as you want to stack (up to maybe 8 or 16, but the bus limit with the current design would be 127)
 
** Each display board has:
 
** Each display board has:
 
*** 3 alphanumeric LED displays to show which timezone
 
*** 3 alphanumeric LED displays to show which timezone
 
*** 4 numeric LED displays to show the time
 
*** 4 numeric LED displays to show the time
 
*** Using displays available in Red, Yellow, and Green so can have different "levels" of the stack different colours
 
*** Using displays available in Red, Yellow, and Green so can have different "levels" of the stack different colours
 +
* Stack communicates internally via I2C
 +
** SCL/SDA and power carried on standoffs
 
* Stack is configurable via USB interface
 
* Stack is configurable via USB interface
  
[[Category:Future Projects]]
+
== Enumeration Process ==
 +
I want the display boards to figure out what order they're in without needing to set any DIP switches or anything. To accomplish this, each board has an IR emitter pointing up, and an IR detector pointing down.
 +
 
 +
=== Calibration Phase ===
 +
# Base sets ENUM as output and lowers it, displays set ENUM as input.
 +
# All boards toggle emitter on and off while recording min/max detector levels.
 +
# After CALIBRATE_TIME, base raises ENUM to start the enumeration process.
 +
 
 +
=== Enumeration Phase ===
 +
# All boards set ENUM_COUNT as an input and reset an internal counter to zero.
 +
# Base turns on LED, waits for ENUM_COUNT to go high.
 +
# Whichever board sees their detector goes high:
 +
## Sets themself as node #1.
 +
## Sets ENUM_COUNT as an output briefly.
 +
## Raises ENUM_COUNT for COUNT_HOLD_TIME.
 +
## Sets ENUM_COUNT back to an input.
 +
# Any boards that didn't see their detector go high just increment their counter and continue on.
 +
# Once ENUM_COUNT is low again, the board that was enumerated in step 3 turns its LED on, repeats steps 2-4.
 +
# When a board turns its emitter on and ENUM_COUNT does not go high in ENUM_TIMEOUT time, the enumeration process is complete.
 +
 
 +
[[Category:Current Projects]]

Revision as of 02:35, 19 September 2017

I'd like a series of clocks on my desk at work to show various timezones.

Status

  • 2017-09-17: Started working on this again, putting BOM together and such.
  • 2016-09-15: Started putting this idea together.
  • 2015: Tried to find some commercial clocks I could stack up to make this, failed to find anything nice looking that supported 24h time. The Hayes Stack Chronograph would be cool but they're very rare now.

Specs

  • Arduino-compatible Base Board on the bottom has the RTC and keeps time
    • Supports multiple oscillator options:
      • TCXO (cheap, stable to ~216ms/day)
      • OCXO (less cheap, stable to ~840us/day or 305ms/year)
      • External clock input from a Rb/Cs or other reference
    • Has an encoder on it to allow changing the time briefly to compare between time zones
      • For instance, "this log is in UTC and it says 0502, what time was that in Calgary?"
      • A few seconds after the encoder stops rotating, display goes back to real time
  • Arduino-compatible Display Boards stack on top of that board
    • As many as you want to stack (up to maybe 8 or 16, but the bus limit with the current design would be 127)
    • Each display board has:
      • 3 alphanumeric LED displays to show which timezone
      • 4 numeric LED displays to show the time
      • Using displays available in Red, Yellow, and Green so can have different "levels" of the stack different colours
  • Stack communicates internally via I2C
    • SCL/SDA and power carried on standoffs
  • Stack is configurable via USB interface

Enumeration Process

I want the display boards to figure out what order they're in without needing to set any DIP switches or anything. To accomplish this, each board has an IR emitter pointing up, and an IR detector pointing down.

Calibration Phase

  1. Base sets ENUM as output and lowers it, displays set ENUM as input.
  2. All boards toggle emitter on and off while recording min/max detector levels.
  3. After CALIBRATE_TIME, base raises ENUM to start the enumeration process.

Enumeration Phase

  1. All boards set ENUM_COUNT as an input and reset an internal counter to zero.
  2. Base turns on LED, waits for ENUM_COUNT to go high.
  3. Whichever board sees their detector goes high:
    1. Sets themself as node #1.
    2. Sets ENUM_COUNT as an output briefly.
    3. Raises ENUM_COUNT for COUNT_HOLD_TIME.
    4. Sets ENUM_COUNT back to an input.
  4. Any boards that didn't see their detector go high just increment their counter and continue on.
  5. Once ENUM_COUNT is low again, the board that was enumerated in step 3 turns its LED on, repeats steps 2-4.
  6. When a board turns its emitter on and ENUM_COUNT does not go high in ENUM_TIMEOUT time, the enumeration process is complete.