ZX-WESPI - add a cheap wifi-enabled fileserver to your Zeddy!

Discussions about Sinclair ZX80 and ZX81 Hardware
Post Reply
patters
Posts: 122
Joined: Thu Mar 11, 2021 12:34 pm

ZX-WESPI - add a cheap wifi-enabled fileserver to your Zeddy!

Post by patters »

WESPI.jpg

What is it?
holmatic's ZX-WESPI project (pronounced Vespi) is so named because it's based on an Expressif Systems ESP32 microcontroller and because it means 'Waspy' in German. It's a ZX81 modification which provides 1024KB of local file storage, a wifi enabled web server, and seamless hooking of the native LOAD and SAVE commands. It's a total replacement for a tape recorder which fits hidden inside the ZX81 case - so it's ideal if your Zeddy already has the 16K internal RAM mod. The wifi antenna is even integrated into the PCB.


Why is it good?
  • It's cheap - the ESP32 controller is available for around £7.50, and only three resistors and a single capacitor are required
  • It's relatively easy to build - only 4 wires connect to the ZX81
  • The software integration is top notch
  • It supports normal LOAD and SAVE commands
  • The loading is very fast indeed, only a second or two for a 16K game
  • It senses when a jack is connected for comms with a real tape recorder/maxduino/tzxduino and will not trigger
  • It can be updated over the air, no future disassembly of the ZX81 needed
  • Even the graphic design of the wasp logo is great!

Files and documentation
The WESPI mod exists in two flavours: The GitHub documentation for the video version is more comprehensive than for the 'mi' variant, so for the latter you will need to refer to a translation of the post on the German 'tlienhard.com' forum: https://translate.google.com/translate? ... 26t%3D3360

As a precaution I have triggered a web.archive.org crawl of that page.


Sourcing the microcontroller
The main pitfall to building a WESPI seems to be ordering a compatible microcontroller since there are so many variants. The forum thread has some back and forth about that, with photos which allow comparison with what you may find on eBay. You need a 30pin model and it seems the antenna should not be hanging over the back edge of the PCB as it is for many of the ones on eBay. I bought this one, sub type "30pin ESP-32 unweld". I bought it without the pin headers attached to allow for a lower profile installation, as recommended in the guide.

The next sticking point is that to flash the firmware to the microcontroller you need Microsoft Windows (so you probably need a VM on MacOS or Linux) and you also are likely to need to download and install a USB-to-UART serial port driver since the peripheral components on ESP32 boards do vary somewhat. You need to do this to get the board to present a new COM port in Device Manager which the flashing software will target. This is detailed in the German forum thread. The VCP driver (virtual COM port) linked there worked for me. Running binaries and drivers from obscure Chinese electronics manufacturers isn't ideal from a security perspective, so I used an old Surface device I seldom use. I also scanned the downloaded files with www.virustotal.com. Once the board is flashed, you can confirm WESPI is running because when the controller boots the blue LED should blink intermittently. From factory the blue LED will not be lit, only the red one.


Assembly.jpg


Assembly
You will need insulating tubing or heatshrink. I used silicone insulated wire which doesn't melt, and I found I was able to assemble all of this quite easily. I soldered the capacitor first, then I soldered the two resistors together, then joined those to the board and one of them to the capacitor, then I added the power leads to the capacitor. Finally I added the EAR and display wires, tucking wires through the capacitor legs for support since it was going to be dangling a lot during testing. I chose to solder the wires to points on the underside of the ZX81 motherboard because it's easier. Also the mod is then conspicuous to anyone who opens the machine in future, and they can be careful not to yank anything unintentionally.


Voltage regulator
Though the guide leaves it up to the reader whether to change the 7805 regulator for a modern switching one, I would strongly recommend doing that. I measured that the WESPI added 200mA of current draw to the existing 290mA of the ZX81 and the heatsink was nearly hot enough to burn my hand after a sustained period with the case on. That was using a modern regulated 9V mains adaptor, so it would be even worse with the stock Sinclair PSU. I have ordered the Traco TSR 1-2450 1A switching regulator which is available for a reasonable price at retrorevivalshop (out of stock at the time of writing). Resident hardware guru 1024MAK confirmed that a 1A regulator is adequate, even with a ZX Printer attached so long as the PSU is at least 1.2A rated. This is because the printer takes most of its power from the +9V input supply, not the regulated +5V.


Installation into the case
I will update this post one I've fitted the new regulator and settled on the best way to fit the WESPI to the case. My initial thought had been to use hot glue to secure it to the bottom shell (avoiding direct contact with the keyboard for heat reasons) but this complicates future disassembly because the motherboard attaches to the top shell. The original regulator and heatsink will come out, so I think placing it near that location might be best to allow the case to open like a book (the wires all attach to that side of the board after all). A sturdy piece of adhesive hook & loop fastener tape might be the best way to attach it, like many people used to secure RAM packs. It's less permanent than glue if you want to take the motherboard out again in future.


Operation
Once the ZX81 is back up and running you'll notice that the WESPI hooks the regular LOAD "" command. It senses the loss of vsync and sends a loader program to the EAR. That splash screen allows you to select a Wifi network and enter the key material. For characters not present on ZX81 (like '!') you can run your key through an ASCII to Hex converter and enter a hex string instead. Very elegant. Once connected you can upload your .p files via the web server from another computer, and they will appear in the ZX81 menu screen next time it refreshes. The loading is incredibly fast from that point onwards, considering the WESPI still has to send the data over the EAR connection.


Updating
This wasn't obvious: do note that the version of the WESPI software in the initial flash bundle isn't the latest, so once it's up and running go back to GitHub and get the latest zx_iot.bin file and upload it via the web server. Leave it time to perform the flash before resetting the ZX81 and you'll notice that you can now see the MAC address in the wifi config page and also that the web server now reports how much free storage space there is in the flash memory.


All in all the WESPI is an absolutely superb piece of engineering, and a fun little project to build. I thoroughly recommend it!
Last edited by patters on Tue Apr 13, 2021 10:37 pm, edited 18 times in total.
patters
Posts: 122
Joined: Thu Mar 11, 2021 12:34 pm

Re: WESPI - add a cheap wifi-enabled fileserver to your Zeddy!

Post by patters »

They_Don't_Know_Party_Meme.jpg
:lol:
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: WESPI - add a cheap wifi-enabled fileserver to your Zeddy!

Post by Moggy »

Even a regulated 9v power pack will make the heat sink overly hot,however using a regulated 7.5v power pack makes a world of difference to heat sink temperature as does fan cooling which I have tried and works well, whilst appreciating certain memory modules and interfaces need the 9v for upscaling to 12v I find a simple zeddy/zxpand combination works well at 7.5v especially as the 3v and 5v regulators on the zxpand run terribly hot when used at 9v and I would predict a fairly short life at those temps'.
Last edited by Moggy on Fri Apr 02, 2021 3:46 pm, edited 2 times in total.
McKlaud
Posts: 337
Joined: Tue Dec 19, 2017 10:02 pm
Location: St Albans, UK

Re: WESPI - add a cheap wifi-enabled fileserver to your Zeddy!

Post by McKlaud »

I built and tested it in late 2020: https://youtu.be/k5CE-XI7CFo

And now working on an internal version with LCD fitted on my scratched Zeddy case.
Attachments
4669B098-154C-4B00-812D-EE790DE3635A.jpeg
A6481C3C-715C-497F-8A2B-C184FF28B705.jpeg
7EFA1153-11B7-42EF-A0A1-60D65F6AFEC8.jpeg
Claudius
----------
patters
Posts: 122
Joined: Thu Mar 11, 2021 12:34 pm

Re: WESPI - add a cheap wifi-enabled fileserver to your Zeddy!

Post by patters »

Most of the games I've tried have worked, but not One Little Ghost for some reason. I wonder why it's not compatible with the turbo loader.
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: WESPI - add a cheap wifi-enabled fileserver to your Zeddy!

Post by mrtinb »

You don’t need a virtual machine to upload the firmware from a Mac. I just found the ESP32 command line tool, and set the parameters to match the screen shots for Windows.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
patters
Posts: 122
Joined: Thu Mar 11, 2021 12:34 pm

Re: WESPI - add a cheap wifi-enabled fileserver to your Zeddy!

Post by patters »

Do you have a link for that? The Expressif tools page only seems to list Windows for the flash tools: https://www.espressif.com/en/support/do ... ther-tools

Did you use this?
https://github.com/espressif/esptool
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: WESPI - add a cheap wifi-enabled fileserver to your Zeddy!

Post by mrtinb »

I'm on vacation now, so I don't have the Mac at hand.

This esptool.py looks familiar. I just looked at the command options, and added the files with memory address to the command line. You'll have to play a little with it. I cannot remember it by heart.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
marste
Posts: 250
Joined: Sun Aug 10, 2014 9:58 pm
Location: Italy
Contact:

Re: ZX-WESPI - add a cheap wifi-enabled fileserver to your Zeddy!

Post by marste »

patters wrote: Fri Apr 02, 2021 2:53 pm All in all the WESPI is an absolutely superb piece of engineering, and a fun little project to build. I thoroughly recommend it!
A very nice project indeed!!

I was thinking that the minimal flavor can be also made completely external (not invasive at all) just adding a "start button" to press after having written the LOAD "" (without automatic sensing on the video). Then the loaded "menu program" can communicate with the raspberry using the audio cables (both) as a serial interface and do all the rest automatically!

5 keys to press instead of 4 (load " " enter) of the original ZX-WESPI :)
patters
Posts: 122
Joined: Thu Mar 11, 2021 12:34 pm

Re: ZX-WESPI - add a cheap wifi-enabled fileserver to your Zeddy!

Post by patters »

I secured the WESPI board to the bottom case using a strip of adhesive hook and loop fastener which worked well. I like having it hidden inside. Wolf in sheep's clothing :D
Post Reply