TIX clock: Difference between revisions

From RevSpace
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
   {{Project
   {{Project
   |Name=TIX clock
   |Name=TIX clock
   |Status=In progress
   |Status=Stalled
   |Picture=2019-11-15 181501 - DSC06467.jpg
   |Picture=2019-11-15 181501 - DSC06467.jpg
   |Contact=Noor
   |Contact=Noor
Line 17: Line 17:
There are a total of 19 transistors on the board.
There are a total of 19 transistors on the board.
Each column has its own transistor.
Each column has its own transistor.
From left to right:
* column: D27/D18/D9, cathode connected through 62 ohm to collector of Q11, which is controlled through 220 to IC pin 5 (RBx?)
* column: D26/D17/D8, cathode connected through 62 ohm to collector of Q12, which is controlled through 220 to IC pin 6 (RB0)
* column: D25/D16/D7, cathode connected through .. to collector of Q13, which is controlled through ... to IC pin 7 (RB1)
* column: D24/D15/D6, cathode connected through .. to collector of ..., which is controlled through ... to IC pin 9 (RB3)
* column: D23/D14/D5, ... IC pin 10 (RB4)
* column: D22/D13/D4, ... IC pin 11 (RB5)
* column: D21/D12/D3, ... IC pin 12 (RB6)
* column: D20/D11/D2, ... IC pin 13 (RB7)
* column: D19/D10/D1, ... IC pin 15 (RA6)
Rows:
* D27/D26/D25/D19, D24/D23, D22/D21/D20
* D18/D17/D16/D10, D15/D14, D13/D12/D11
* D9/D8/D7/D1, D6/D5, D4/D3/D2
D13 cathode goes to D12 cathode, goes to Q5 collector, Q5 base goes to R5, R5 goes to


==Schematic==
==Schematic==


[[File:TIX.pdf]]
[[File:TIX.pdf]]
Pins from this schematic:
* top row: RA0, pin 17
* mid row: RA1, pin 18
* bot row: RA2, pin 1
* col 1 (D19/D10/D1): RA6, pin 15
* col 2 (D20/D11/D2): RB7, pin 13
* col 3 (D21/D12/D3): RB6, pin 12
* col 4 (D22/D13/D4): RB5, pin 11
* col 5 (D23/D14/D5): RB4, pin 10
* col 6 (D24/D15/D6): RB3, pin 9
* col 7 (D25/D16/D7): RB2, pin 8
* col 8 (D26/D17/D8): RB1, pin 7
* col 9 (D27/D18/D9): RB0, pin 6


== Software ==
== Software ==
Line 59: Line 55:


Framerate calculation:
Framerate calculation:
Suppose we have 4 rows (3 actual + 1 "vsync" row), 4-bit intensity (16 levels) and at least 100 Hz updates, we need 4x16x100 = 6400 Hz line rate.
At first I'm aiming at a 10 kHz line update rate (= interrupt rate).
Rounded up to 10000 Hz interrupt rate, this means that the worst case flicker is 156 Hz.
Suppose we have 3 rows, 4-bit intensity (16 levels) that means a worst case flicker is 10 kHz / 3 / 16 = 208 Hz.
If this is still too low in practice, we can reduce the dimming resolution, or just use the LEDs at full brightness.
If this is still too low in practice, we can reduce the dimming resolution, or just use the LEDs at full brightness.
In comparison, a MAX7219 has a "scan-rate" of 800 Hz typically.
In comparison, a MAX7219 has a "scan-rate" of 800 Hz typically.
Line 75: Line 71:


==== platformio ====
==== platformio ====
The software can also be built and uploaded using platformio:
The software can be built and uploaded to the ESP32 using platformio:
   pio run -t upload
   pio run -t upload
The toolchain and libraries will be automatically downloaded from the internet (and cached locally).
The ESP32 toolchain and required libraries will be automatically downloaded from the internet (and cached locally).


Platformio can be installed (on Debian Linux), using:
Platformio can be installed (on Debian Linux), using:

Latest revision as of 13:19, 11 May 2020

Project TIX clock
2019-11-15 181501 - DSC06467.jpg
Status Stalled
Contact Noor, bertrik
Last Update 2020-05-11

Have an 'original' TIX clock (YouTube video) from ThinkGeek.

Could also be programmed to display any number up to 4 digits, but the design is best suited for displaying time (blocks are in sets of 3, 9, 6, 9).

Reverse engineering

There are a total of 27 LEDs on the board, organised as 9 columns of 3 leds each. Each column has a shared cathode.

There are a total of 19 transistors on the board. Each column has its own transistor.

Schematic

File:TIX.pdf

Pins from this schematic:

  • top row: RA0, pin 17
  • mid row: RA1, pin 18
  • bot row: RA2, pin 1
  • col 1 (D19/D10/D1): RA6, pin 15
  • col 2 (D20/D11/D2): RB7, pin 13
  • col 3 (D21/D12/D3): RB6, pin 12
  • col 4 (D22/D13/D4): RB5, pin 11
  • col 5 (D23/D14/D5): RB4, pin 10
  • col 6 (D24/D15/D6): RB3, pin 9
  • col 7 (D25/D16/D7): RB2, pin 8
  • col 8 (D26/D17/D8): RB1, pin 7
  • col 9 (D27/D18/D9): RB0, pin 6

Software

Github archive for the software prototype is at https://github.com/bertrik/esptixclock

TODO

  • wait for hardware to finish and update the pin map in display.cpp
  • power it up, can we perhaps run the entire clock from USB 5V power?
  • test it on actual hardware
  • fancy startup animations / more display modes / etc

Basic principles

Basic principles of the software are:

  • Inspired by the LichtKrant firmware
  • Basic ESP32 Arduino framework
  • Simple command interpreter running on the serial port @ 115200bps.
  • TIX display driver that alternates between rows and lights up the pixels in the columns
  • NTP client to get UTC time from NTP + local time conversion (incl. summer time)
  • Main process to convert local time into TIX format (number of LEDs lit in a group indicates number)

Framerate calculation: At first I'm aiming at a 10 kHz line update rate (= interrupt rate). Suppose we have 3 rows, 4-bit intensity (16 levels) that means a worst case flicker is 10 kHz / 3 / 16 = 208 Hz. If this is still too low in practice, we can reduce the dimming resolution, or just use the LEDs at full brightness. In comparison, a MAX7219 has a "scan-rate" of 800 Hz typically.

Building

Arduino IDE

The software can be compiled in the Arduino IDE.

You need the ESP32 toolchain, see https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md for the instructions.

Also install the following libraries:

  • NtpClient, by Fabrice Weinberg, Sandeep Mistry

platformio

The software can be built and uploaded to the ESP32 using platformio:

 pio run -t upload

The ESP32 toolchain and required libraries will be automatically downloaded from the internet (and cached locally).

Platformio can be installed (on Debian Linux), using:

 sudo apt install python3-pip
 sudo pip3 install platformio

Add yourself to the 'dialout' group (and log out/in to activate):

 sudo adduser <yourlogin> dialout

Timeline

2019-11

Changed out the American plug for an EU one, but the clock requires 60 Hz AC, and 50 Hz will make it run slow and thus useless for telling time.

2019-11-13 144638 - DSC06464.jpg 2019-11-15 180044 - DSC06465.jpg 2019-11-15 180508 - DSC06466.jpg 2019-11-15 181501 - DSC06467.jpg

2020-01-17 - 2019-01-20

From an old Tweakers thread: "Dus schoef je wekker eens open en google op het typenummer van de chip. 10 tegen 1 dat er een 60/50Hz-select pootje aanzit. Vaak is die verbonden met een draadbruggetje op de print; omsolderen en klaar!"

Looked into this but no luck. Best bet is to replace the chip (original PIC16F628A, with ESP8266?) and update time via wifi.

Came across TIX-Uhr, describing improvements made to the (European version) TIX. Emailed and got the schematic from This Manhart.

Removed the original chip completely, to be replaced with an ESP32.

2020-01-18 182119 - DSC08511.jpg 2020-01-19 172607 - DSC08533.jpg 2020-01-19 205609 - DSC08534.jpg 2020-01-19 205845 - DSC08535.jpg 2020-01-19 205943 - DSC08536.jpg 2020-01-19 210011 - DSC08537.jpg 2020-01-19 210714 - DSC08538.jpg 2020-01-19 211758 - DSC08539.jpg 2020-01-19 212233 - DSC08540.jpg 2020-01-19 212635 - DSC08541.jpg 2020-01-19 213004 - DSC08543.jpg 2020-01-19 213104 - DSC08545.jpg

External links