summary refs log tree commit diff
path: root/VFD clock/index.md
blob: 72e963860f67c7644f72489189260466cc100cd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
description: "Vacuum fluorescent display with an ESP"
created: 2025-08-21
---

## Resources

- [WD202 User manual](https://www.touchdynamic.com/wp-content/uploads/2021/06/wd202.pdf)
- [WD202A User manual (contains RJ45 pinout)](https://manualzz.com/doc/html/11817581/digipos-wd-202a-customer-display-user-s-manual)
- [Link to code git repo](https://git.node5.net/firmware/vfd/)

![VFD from the front, one line showing a UNIX timestamp and another line showing a human readable datetime](main.webp)

Got an old VFD from a Point Of Sale device. The kind found in price tally displays in supermarkets.

It uses RS232 to communicate,
so you need a TTL to RS232 converter for the display to recognise the signal from a micro controller.
Which convents the ESPs from 3.3v logic -> -15 to 15 volt.

## --> Attribution: oliver@labitat.dk made the hardware awesome <--

![](back%20pcb%20full%20view.webp)
![](backside.webp)
![](barrel%20jack.webp)
![](dip%20switches.webp)
![](esp-01%20connection.webp)
![](modules.webp)
![](modules%20top.webp)
![](rj45.webp)
![](2025-08-17-19-15-38-708.webp)
![](2025-08-17-19-15-47-182.webp)
![](2025-08-17-19-15-57-696.webp)
![](2025-08-17-19-16-17-416.webp)

---

## Circuit diagram

[Link to circuit diagram - cirkitdesigner.com](https://app.cirkitdesigner.com/project/05cf3635-211d-451e-8c80-614e9fb4ede3)

![](circuit_image.svg)

---

## Code

 [Link to code git repo](https://git.node5.net/firmware/vfd/)

```cpp
#include <FastLED.h>
#include <ESP8266WiFi.h>
#include <ezTime.h>

Timezone CopenhagenTime;

void setup() {
  Serial.begin(9600);

  Serial.write(0x0C); // Clear display
  Serial.print("VFD display\n");
  Serial.print("Starting\n");

  WiFi.setHostname(HOSTNAME);
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);

  Serial.write(0x0C); // Clear display
  Serial.printf("Hostname: %s\n", HOSTNAME);
  Serial.printf("Connecting to: %s\n", WIFI_SSID);
  while (WiFi.status() != WL_CONNECTED)
  {
    delay(1000);
    Serial.print('.');
  }

  Serial.write(0x0C); // Clear display
  Serial.println("Connected, IP address: ");
  Serial.println(WiFi.localIP());
  delay(1000);

  waitForSync();
  CopenhagenTime.setLocation("Europe/Copenhagen");

  Serial.write(0x0C); // Clear display
}

void loop() {
  // Get Unix epoch timestamp
  char buffer [3];
  sprintf(buffer,"%03d",ms());
  String milliEpoch = String(now()) + buffer;
  Serial.println(milliEpoch);

  delay(50);
  // https://github.com/ropg/ezTime#getting-date-and-time
  // 16;36;15 Sat 16 Aug 33
  String time_formatted = CopenhagenTime.dateTime("H:i:s D d M");
  Serial.println(time_formatted);

  events(); // Needed to update time continuously
}
```

---

## Alternative input method

It's been suggested to me that one could possibly forgo the TTL to RS232 converter chip,
since the VFD probably contains an RS232 to TTL convenrter anyways, worth exploring for another iteration.