holmatic / zx-iot-video

ESP32-based Tape/WLAN file server for ZX81, with VGA and/or LCD display support
GNU General Public License v3.0
31 stars 5 forks source link

zx-iot-video

This project creates the firmware for ZX-Wespi-V - a DIY ESP32-based TFT/VGA-video-display-interface and wifi-enabled fileserver for ZX81. When using a Sinclair ZX81 nowadays, one may look for a more handy replacement of the TV set and cassette recorder. Maybe even something that can be built in, and allows to exchange the ZX programs and files via wifi to your modern computer.

Common modern LCD monitors often get in trouble with the ancient ZX81 video signal, as there is no colour carrier signal that allows the monitor to recognize PAL versus NTSC, and the synchonisation sinals are - lets say a 'bit more dynamic' than on modern devices, so nowadays' displays are offended and show blue screens whenever ZX switches to FAST mode. Wespi-V is ZX-aware, starts up quickly, handles FAST mode gracefully, and shows the expected LOAD/SAVE-stripes.

Components needed for building the device are quite inexpensive (about 20€ in total), and required soldering skills are just classic cables and a few simple components.

Circuit Phote

Hardware

ESP32-based modules are often used whenever it comes down to electronics control tasks, combined with wifi communication abilities. Here, the I2S interface of the ESP is used to retrieve the ZX81 video signal - which is, as special feature of the ingenious ZX computers, also used as tape recorder output. ESP32 furthermore feeds the tape input of the ZX computer, so LOAD and SAVE work.

Schematic outline

McKlaud kindly provided more professional drawings (great thanks !) : Schematic outline

Optional VGA Output (new!)

Starting from software version v0.6, a simple VGA interface for standard monitors is supported.

For the VGA interface hardware, you need five resistors (3x 270$\Omega$ and 2x 100$\Omega$) and the well-known female-type 15-pin D-subminiature connector. Connect as follows:

ESP32                     VGA
Module                    Connector

D13 ----[R 270 Ohm]----  1 (RED)
D12 ----[R 270 Ohm]----  2 (GREEN)
D14 ----[R 270 Ohm]----  3 (BLUE)

D27 ----[R 100 Ohm]---- 13 (HSYNC)
D26 ----[R 100 Ohm]---- 14 (VSYNC)

GND ------------------- 6,7,8,10,5 (GND)

The monitor connection is completely optional, one may use VGA, LCD-TFT, both, or none.

Power regulator

ESP32 and TFT-diplay need 5 Volts at about 250mA. Safest variant is an additional switching regulator like outlined in the schematic sketch. If your ZX is already upgraded with a modern regulator or bigger heat sink, you may use the 5V from the ZX81 PCB directly.

If you use the Wespi as an external device, easiest wasy is of course to just utilize the USB plug as a power supply.

When using this device as an external monitor

If you do not want to modify the ZX81 or its case, Wespi-V can also be used as external monitor/interface, connected via longer cables. In this case, R1 should be a 75 Ohms resistor to act as standard cable impedance termination. Of course, in this case it is required that the ZX is internally equipped with a video mod/amplifier.

Version Info

0.6.3 Improvements for older ULA (2C184E) video signal

0.6.0 VGA output support added

0.5.0 Initial pre-release (derived from zx-iot-mi)

Downloading the firmware to the ESP32 Module

Info for the flash files and initial image download for the ZX-Wespi project:

ZX-Wespi is usually able to do over-the-air (OTA) updates via the webserver user interface.

However, for the following cases a regular download of the flash image is required:

This short instruction is for using the ESP32 download tool (tested with V3.8.5)

Over-the-air (OTA) updates

Once you have the system running and connected to WLAN, incremental firmware updates can be done just using a browser. for this,

As an info - Wespi OTA uses double-buffering, so a failed update should not harm.


Instruction v1.2