8-Bit Generation: The Sinclair ZX-Spectrum


The ZX-Spectrum from SInclair

On April 23, 1982, the Sinclair ZX Spectrum has been marketed by Sinclair Research. [Source: Wikipedia] He was then sold at a price of 140 euros or 194 euros. The two prices refer to the 16kByte version or the 48kByte version. 16kByte and 48kByte are the sizes of the RAM memory with which the computers were equipped. The ZX-Spectrum is the successor to the Sinclair ZX81 and the predecessor of the ZX-Spectrum Plus and Sinclair QL.

The small computer (the dimensions are just 23.5cm * 14.5cm * 3cm) is powered by a Z80A CPU running at 3.5MHz clock speed. The ULA (Uncommitted Logic Array) is the largest chip on the ZX motherboard. She is responsible for the graphics, the audio IOs (for loading and saving programs on tape) and keyboard input. Then there are, depending on the version, the DRAM chips (upper and lower RAM) on the board and another ROM IC, which houses the BASIC interpreter. The small calculator can draw colorful graphics on the screen with a resolution of 256 x 192 pixels and 15 colors. The image output is sent to the antenna input of a TV via a built-in RF modulator. With picture output but I really only the „picture“, because for the sound is not the audio channel of the TV set used. But there is a small speaker on the motherboard, which outputs the sounds of the computer. Which in turn are not generated like in the C64 in a separate chip (SID chip) and that in several voices – no, the MIC / TAPE pin of the ULA is used, which simply switches the speaker via a transistor to 5V. This can then be used to generate simple „beep noises“. Of course, from a current point of view, that’s nothing special at all, but for those who were confronted with it in their childhood, there are certainly some memories associated with it. So also for me. At least then I had the opportunity, with my brother to borrow such a device from a friend. Then of course it was – how can it be otherwise – played. Titles such as „Manic-Miner“, „Ant-Attack“ or Flight Simulator were among the most frequently loaded cartridges. Yes – cassettes. At the time it was common to buy the programs on an audio cassette. A simple tape recorder was connected to the ZX-Spectrum via the headphone jack and the LOAD „“ keys were entered via the rubber keys on the ZX. Then you had to press on the tape recorder only more play and it could start. The prerequisite was, of course, that the tape speed and the adjusted volume level fit. Only then was the loading of the program successful and the game started. The loading times were from two to often more than ten minutes depending on the program.

datarecorder for loading and saving from programmcode

In my 8Bit – Retrorechner collection was missing until now the complete series of Sinclair calculator, but finally I could make a bargain and buy a whole set with ZX-Spectrum, joystick module, a data recorder and many original game cassettes. I would like to briefly describe the preparation and restoration of the ZX here. If you get your hands on a computer with an unknown background, which has been lying around in a cellar for the last 30 years, you should not try to put it into operation. If he is not already, that could be his death. Because, as always, there are some parts that can age and change their parameters. Someone could have tinkered with it before to repair or retool something. In this case, the case was dusty and dirty, but there were no missing screws, dents or externally apparent retrofits, such as buttons or plugs. So I could solve the case screws.

The keyboard foil was quickly pulled out of the clamping bushes and the lid with the rubber keys removed. Now the inner life of the Spectrum revealed itself – and what can I say – 1A. Everything in original condition. No repairs or tinkering have been done on the device yet. So I first started cleaning the body parts. The keyboard is easy to disassemble. In this revision of the spectrum (ISSUE 4A), the metal sheet that holds the rubber mat in the housing is fixed with four „brass bending tabs“. These can be easily bent back and remove the sheet.

Frontblech und Gummitastenmatte enfernt
freigelegte Tastaturfolie

The housing parts were now very easy to clean. I rinsed it with soap under lukewarm water. Also, the residue between the rubber mat buttons could be easily removed. While the parts were now set aside to dry, I dedicated myself to the motherboard.

Mainboard des ZX-Spectrum 48K Issue 4A

Here all solder joints were clean, no traces of foreign intervention and all parts still in original condition. So I could start directly with the first exams. An ohmmeter was used to test for short circuits in the power supply area. If you look at the circuit diagrams of the spectrum, you can quickly see that the computer is supplied with an input voltage of DC9V. Here the assignment of the power supply socket is to be considered. Here, the plus pole is not the inner pin but the outer ring of the connector. This is especially important if the original power supply is no longer available and you take a replacement. The further structure of the supply concept is as follows: From the 9VDC the + 5V supply is made via a linear regulator 7805. Using a DC / DC converter circuit consisting essentially of the components TR4 and TR5 and a small transformer (cylindrical coil with two windings), a 12VDC and further a -5VDC power supply are generated. Special attention should be paid to this area, as a wrong or missing power supply can damage other components (especially the DRAM ICs). To do this, use a diode tester to test the transistors for their conduction and blocking behavior of the PN junctions. The easiest way to test the small transformer is to use the ohmmeter for low-resistance behavior of the respective winding and high-resistance behavior between the primary and secondary windings. If everything is alright here, one tests the output of each of the three voltage sources with respect to the ground 0V potential. Here are the following guidelines to measure:

  • Eingang des Linearreglers (9V) gegen GND -> ca. 100k-150k
  • Ausgang des Linearregler (+5V) gegen GND oder an Pin9 des RAM ICs -> ca. 300 – 500 Ohm
  • Pin1 des RAM ICs (-5V) gegen GND -> ca. 300 Ohm (im 400Ohm Messbereich)
  • Pin8 des RAM ICs (12V) gegen GND -> ca. 2.6k bis 2.8kOhm
Elektrolytkondensatoren erneuern

In the next step, the over 30 years old axial electrolytic capacitors are exchanged. This is a pure precaution, because as everyone knows, these parts like to change their values ​​with increasing aging or run out. And what leaked electrolytes can do so everything, I have already shown in older posts. In order to allow the ZX a longer life again, all Elkos are exchanged.

die alten Elkos
Mainboard mit neuen radialen Elkos

Once this work is done, then the exciting part begins. The power supply is switched on. It is best to supply the ZX with a laboratory power supply with adjustable current limit. He may take after switching on not more than 750mA at 9VDC. If that also fits, the voltages can be measured (best on one of the lower RAM ICs). It should be measured at PIN1 -5V, at PIN9 + 5V and at PIN8 12V.

Conversion of the RF modulator to video output

In order to be able to connect the ZX-Spectrum to a display unit, there is the RF modulator, which modulates the internally generated composite video signal onto a UHF channel carrier in order to operate a classic analogue TV. Since television receivers with analogue tuner are now hardly available anymore, but many TV have at least a SCART or video input, the RF modulator of the ZX-deactivated. The former antenna socket is converted into a video output. First, the two wires coming out of the modulator are unsoldered from the motherboard. (These are + 5V and CVBS). Then inside the modulator, the pin of the resistor is unsoldered from the inner conductor of the antenna socket and bent away. Thus, the modulator is completely disconnected from the circuit. Now only the CVBS output from the motherboard needs to be soldered via a capacitor to the inner pin of the socket. The capacitor should be around 100uF. It serves as DC decoupling of the signal.

When all this is done, you can now connect and power up. In my case, it was a complete success. The Sinclair reported immediately with its gray-screened startup screen „(c) 1982 Sinclair Research Ltd“ Next, I tried an old original game (backgammon) on the tape recorder (data recorder) to load into the ZX. That did not work for the time being. Sometimes a part was loaded, then again not and it came to „Tape Error“ messages. So the tape recorder was also quickly overtaken. A new belt made for a better synchronization of the band and a head cleaning for nicer levels of the output signal. But even now the shop did not work. (this reminded me strongly of the time, where often a long time was trying to load a game) So I saw with the Oszi the output signal and especially the period of the initial signal (the first whistle on the band :))


Einstellung der Bandgeschwindigkeit

Here it was, the problem. The frequency of the initial signal was about 890-910Hz. That means the tape runs way too fast. The problem is resolved quickly. Almost every cartridge drive has a small potentiometer to adjust the tape speed of the servo drive. Even so in this case. The frequency should be around 800Hz. The result was then:


Here is the program from mp3 file: backgammon


   Sende Artikel als PDF   

Small craft project for the summer time

solar module
As a mini – craft project for the summertime I call the following tinkering. A small monocrystalline solar module called „SM 6“ from a well-known large electronics distributor starting with „C“ and ending with „d“ plays the main role in the project. The module has a nominal power of 6Wp with a maximum current of 320mA. The rated voltage is 17.3V. The open circuit voltage is 20.8V. The silicon cells are embedded in an EVA (ethylene vinyl acetate) plastic sheet and are UV and moisture resistant. The whole module is about 25cm x 25cm in size. It is thus ideally suited to provide the power to power USB devices. For example, I thought about WIFI IP cams. It should also be possible to charge smartphones or tablets.

In order to be able to do this, the operating voltage of the USB standard (5V) must be generated from the rated voltage of the photovoltaic cell. You could do that easily with a 7805 controller and convert the difference into heat. But this is the least efficient way to get the panel’s energy into a cell phone. Firstly, the internal resistance of the panel depends on the light intensity, which has a major impact on the efficiency of unmatched load resistors. On the other hand, a series regulator is a power shredder, since the difference between input voltage and regulated output voltage is converted into power loss, ie heat, during the flow of current. Here you are better served with a switching converter (buck converter).


In a simple laboratory setup, the behavior of the panel can be examined. For this purpose, the open circuit voltage of the panel is measured at different illuminance levels. Subsequently, the panel is loaded with different resistance values ​​and the current through the load as well as the voltage at the panel are measured. The measured values ​​are recorded and the Ri (internal resistance of the source) is calculated. The following circuit diagram shows the measurement setup:
measurement setup – schematic
The ammeter is an Agilent and Voltmeter Keithley 2701 table multimeter. These gauges can both be controlled via SCPI commands. The interface is a LAN port. This makes it easy to implement an automated measurement process via a PC and a suitable script. And since Matlab offers a very convenient way to script, it’s also used right now. In order to be able to measure in a laboratory and have approximately the same environmental conditions, a table lamp with halogen bulb is used instead of the sun. The brightness of the lamp is easily adjusted by supplying it with a laboratory power supply of 0-13V. Of course, the laboratory power supply can also be controlled by Matlab.
measurement setup with lamp as „sun“

The lamp is placed at a distance of 25cm in the middle of the panel. In order to get a feeling of which illuminance is achieved with the lamp, a reference measurement is taken with a luxmeter. That is, the lamp goes through the power ramp of 0-13V and the lux meter measures the illuminance at a distance of 25cm under the lamp. The whole thing is resolved in 0.5V steps. This results in a curve that looks like this:

Voltage on the lamp results in illuminance

Now the measurement can begin. Resistors are manually connected to the panel as a load resistor and current and voltage are measured at each brightness level. There are eleven load resistance values ​​ranging from 4.7 ohms to 220 ohms connected in sequence. An idle measurement is then of course made without load resistance. The following graph shows the calculated internal resistance for two loads of the panel over the brightness curve of the lamp in lux and in the other graph over the voltage at the lamp (for better scaling). The internal resistance of a source is calculated from the open circuit voltage of the source minus the voltage under load, divided by the current. With the difference between the no-load and load voltage, the voltage drop at the internal resistance is obtained. Since the load is also known as the current, it is only necessary to use Ohm’s law to obtain the resistance value …

Internal resistance vs. illuminance
Internal resistance vs. Voltage on the lamp

Since some clarifications about the behavior of the PV cell have now been eliminated, I can briefly report on the structure of the voltage converter. As previously announced, a switching converter is the more efficient way to adapt the energy to the consumer. Here comes an LM2596S used. The LM 2596 is a „Simple Switcher Power Converter“ that switches at 150kHz and can supply a load with 3A.) Here is an overview of the functions:

  • 3.3-V, 5-V, 12-V, and Adjustable Output Versions
  • Adjustable Version Output Voltage Range: 1.2-V to 37-V ± 4% Maximum
    Over Line and Load Conditions
  • Available in TO-220 and TO-263 Packages
  • 3-A Output Load Current
  • Input Voltage Range Up to 40 V
  • Excellent Line and Load Regulation Specifications
  • 150-kHz Fixed-Frequency Internal Oscillator
  • TTL Shutdown Capability
  • Low Power Standby Mode, IQ, Typically 80μA
  • Uses Readily Available Standard Inductors
  • Thermal Shutdown and Current-Limit Protection

(source: datasheet from vendor TEXAS Instrument)

With this switching converter and a few other components can quickly assemble a circuit and transform with the layout tool „Eagle“ into a board. However, this circuit is so simple that it only works as efficiently as possible with the advantages of the LM2596, but does not perform any power tracking. This means that the load representing the circuit for the solar cell is not adapted to the internal resistance of the solar cell.


Circuit diagram of the DC-DC converter

From this circuit, a simple layout was created, a board etched and equipped. A USB socket on the output allows the direct connection of USB devices. To make the whole thing look a bit reasonable, I have donated the board still a small plastic casing …

Measurement of illuminance

measurement setup
Switchable load resistors
Layout on the computer
Foil for creating the printed circuit board
Etched PCB
Etched PCB
Finished circuit
   Sende Artikel als PDF