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   

Calculator from 1975: PICO PA-80N

From 1975 this Japanese calculator comes. He was sold from 1975 to 1976 by the Eduscho – Tchibo coffee chain. The device is called „PICO“ PA-80N. Exactly this model was also once in my father’s possession and I was already fascinated by the luminous seven-segment displays as a child. And that was the problem again. As far as I can remember, I was in elementary school age, when I first disassembled the device into its individual parts. That was not the problem, but it was not there. Over time, I disassembled the computer several times. At some point wires broke off and nothing worked. Reassembled, the Pico then disappeared into a box and was disposed of years later by my father. Why I took apart and assembled the small computer again and again, I can not say today anymore. Apparently it was the success of an eight-year-old, after assembly again to have a working device – just to last. 🙂 On an online flea market platform, I found just such a calculator and in addition to that in a TOP condition and almost gave it. So I had to have him …

Pico with the imitation leather case

To the dates:
The display has eight 7-segment digits based on LED technology. To be able to read the MikroLEDs they are embedded in a convex shaped plastic. This achieves a magnifying effect that makes the numbers readable.

Siebensegment – Anzeige mit 8 Digits

LEDs under the convex plastic encapsulant

The housing is made of aluminum and plastic and has the dimensions in about a cigarette box. 8.2 x 5.7 x 2.4 cm. In order to keep the calculator gently, there was a leatherette case to do so.

Mainboard des PICO

The calculator is powered by two Tripple A (AAA) batteries, so with 3V. Optionally, there was also an external power supply that could be purchased according to the then price list by almost 18DM. (unfortunately no price information for Austria)

Power adapter socket at the top

Technically, the small computer consists of a display board, a „motherboard“ and a keyboard board. These boards are connected to each other with a multipolar bridge line. This should not be bent too often, because then quickly break off individual wires …

Opened circuit boards

The display board is driven by a Toshiba T1337 Displaydriver IC and the computer itself is a GI C593 (General Instruments) processor that handles the basic operations and percentage calculation. The processor works with a supply voltage of 15-17VDC and is able to drive Floureszentplays directly. In order to produce in the small Pico computer from the 3V of the AAA batteries also the 17VDC a small DC / DC converter on the Mainboard expires.

central processing unit

displaydriver

DC / DC converter circuit for the 17V of the CPU

datasheet from theC593 (source: 1977 Datacatalog GI Microelectronics)

In addition to the faux leather case, there was also a card with a user manual and a flyer. It was printed with warranty information and an advertising slogan:
„The Pico will become an indispensable arithmetic assistant for you. At school, at home, at work – wherever there is something to be expected, the Pico is at your fingertips. Just press keys, and you’ve already calculated the most complicated tasks. This is how arithmetic becomes a pleasure! „(Source: Internet)
   Sende Artikel als PDF   

Data Node with Arduino

Unfortunately, the intervals in which I find some time to write a new post for the blog have not gotten shorter. But post a post per month, I think … 🙂

This time it’s not a retro craft project from the local Gefielden or a restoration of an old device, but again something about Arduino. The idea – to build a sensor that, as always, transforms a physical quantity into an electrical signal. This is nothing special and what kind of sensor it will be, I will not describe for the time being. But there should not be a sensor board, but many. And these sensor boards short „sensors“ are to be networked together in a two-dimensional matrix. You can imagine it as a chessboard, with each of the chessboard panels representing a sensor. This network of sensors – ie sensor nodes – should then be connected via a transfer point to a computer and output the sensor data of the respective field. It should then also be possible to remove individual fields from the network without the remaining network losing its function.

The whole system should be as simple and cheap as possible. And so a system concept was quickly developed in which the nodes communicate via the I²C bus and send their data to a master. The following diagram is intended to illustrate this.

This concept, I thought, is easiest to implement with an ATmega microcontroller. The has enough IO’s, an I²C bus and UART onboard, as well as analog inputs and requires little component peripherals to bring it to life in its own layout. And there is nothing faster to do such a test setup of such a node network than to use the well-known Arduino development boards. I have chosen the cheapest version for a test setup -> the Chinanachbau of the ArduinoUno (Joy-IT UNO) with the Atmga328 in the capped DIL housing.

Joy-It Uno Boards

The picture shows ten of these microcontroller boards. Of these, one should be used as a bus master and nine as slaves. Of course, each of these slaves has a unique bus address, which only occurs once in the system. In the test setup, this bus address is permanently assigned via the program code, since anyway each Arduino must be connected to the computer in order to carry out the program upload. Of course, that should look different later. Because the Arduino is on the Atmega328 chip, its quartz and the few resistors reduced on the sensor board with gelayoutet. The chip should then be programmed via the ISP pins. Of course, as many boards do not always customize the program code and they all have the same Flash file, I want to set the sensor address with a 7-bit DIP switch. A 4021 Cmos Static Shift Register is supposed to read the bits after the controller is powered on and push them serially into the controller. The resulting value is then available as a bus address in a variable.

Each of these slaves with their individual bus address is now queried in sequence by the master node, which state it has and whether it should switch an output or not. That is, the node has only one DO (digital output) with which it can, for example, turn an LED off and on and interrogate one or more DIs (digital input) which polls a state, for example a simple switch. These functions are stored in 2 bits of a byte. Another byte is used to transfer the bus address. So two bytes are sent over the bus. The picture below shows the test setup with the „UNO boards“

All Arduinos are connected to I²C data bus and power supply

The process is as follows:

MASTER:
The master node sends a request after the series to all slave addresses and a switch command (which comes from all nodes of a TEST push button input on the master) for the LED output of the node and sees if a response comes back or not. If no answer comes, the node is not in the network or is defective. If there is an answer, this consists of the address of the node and its status byte. This information is transmitted via an RS232 terminal to the computer connected to the master. Thus, for example, the switching status of each individual node can be displayed on the screen via a visualization using (NI LabView, or Matlab or similar). By adapting the master program, it is also possible to switch the LED outputs of the slaves via the computer.

SLAVE:
When the master node requests data from the slave, the slave sends back two bytes. Where byte0 again is the slave ID (ie bus address) and byte1 is the data. Byte1 actually consists of only two bits encoded as follows (in decimal representation):
 0 = LED off| Sensor not triggered
 1 = LED on | Sensor not triggered
 2 = LED off | Sensor triggered
 3 = LED on | Sensor triggered

The program code as an example:

 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
// I2C Slave Code
// 16.05.2018 
// ver 1.3
#include <Wire.h>
#define ADDRESS 2     // adresse des slave knotens
#define PAYLOAD_SIZE 2 // anzahl der bytes  die vom masterknoten zu erwarten sind
int LED=12;            // indicator led an pin D12
int SENSOR = 8;        // sensor input an pin D8
bool actionState=0;      // sensor zustand
int busstatus;  // statusvariable 
                       // 0 = LED aus | sensor nicht belegt
                       // 1 = LED ein | sensor nicht belegt
                       // 2 = LED aus | sensor belegt
                       // 3 = LED ein | sensor belegt
 
bool sensled=0;          // sensor LED
byte nodePayload[PAYLOAD_SIZE];

void setup()
{
  pinMode(LED, OUTPUT);         //sensorLED
  pinMode(SENSOR, INPUT);       //Sensor 
  Wire.begin(ADDRESS);          // Activate I2C network
  Wire.onReceive(receiveEvent);
  Wire.onRequest(requestEvent); // auf master anforderung warten
                      //  // debug interface
                      //  Serial.begin(9600); 
}

// *********************************mainloop****************************************************
void loop()
{ 
  delay(5);
  
   if(sensled){digitalWrite(LED, HIGH);}
         else{digitalWrite(LED, LOW);}

  actionState = digitalRead(SENSOR);  //Sensoreingang abfragen        
   if((actionState==1)&&(sensled==1)) {busstatus=3;}
   else if ((actionState==0)&&(sensled==1)) {busstatus=1;}
   else if ((actionState==1)&&(sensled==0)) {busstatus=2;}
   else if ((actionState==0)&&(sensled==0)) {busstatus=0;}

                      //  Serial.println("######################");
                      //  Serial.print("busstatus neu setzen ");
                      //  Serial.println(busstatus);
                      //  Serial.print("sensled LED            ");
                      //  Serial.println(sensled);
                      //  Serial.print("actionState           ");
                      //  Serial.println(actionState);
                      //  Serial.println("######################");
  nodePayload[0] = ADDRESS;                  // Adresse in byte0 zurücksenden.  
  nodePayload[1] = busstatus;                //byte 1 ist die statusinfo der LED
}



// *********************************************************************************************
void requestEvent()
{ Wire.write(nodePayload,PAYLOAD_SIZE);  
  Serial.println("bytes status schreiben");
  Serial.println(nodePayload[0]);
  Serial.println(nodePayload[1]);
  delay(5);
}

// *********************************************************************************************
void receiveEvent(int bytes)  //einen wert vom I2C lesen
      
{
  
  busstatus = Wire.read(); //If the value received was true turn the led on, otherwise turn it off  
                              //  Serial.println("status empfangen");
                              //  Serial.println(busstatus);
  if((busstatus==1)||(busstatus==3)){sensled = 1;}
                                else{sensled = 0;}
                                              
}

 

The bus address must still be entered individually in this slave code. In the next version, the previously described „serializer“ of the parallel dip-switch variant will be implemented. The following code example is from the master node, which reads out the slaves and sends a LED pattern to the sensor slaves using the test button:

 

  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
109
110
111
112
113
114
115
116
117
118
119
// I2C masterknoten 
// 16.05.2018 
// ver 1.2
// changes abfrage wenn kein knoten am bus dann 255 ausgeben
#include <Wire.h>

#define busbytes 2          // wievele byte vom I2C knoten zu erwarten sind
#define maxKNOTEN  10       // anzahl der zu scannenden slaves
#define startKNOTEN 2       // startadresse der slaves
#define DELAY 5             // einfach ein delay ....

int i; int j=0;
int buttonPin = 12;
int testbut = 0; int anim = 0;
int buttonState = 0;
int DATEN[busbytes];
int adresse; int busstatus;  
byte sensorbelegt; byte ledsensoron;

                       // 0 = LED aus | Sensor nicht belegt
                       // 1 = LED ein | Sensor nicht belegt
                       // 2 = LED aus | Sensor belegt
                       // 3 = LED ein | Sensor belegt

int leddat1[] = {1,1,1,1,0,1,1,1,1}; // -
int leddat2[] = {0,0,0,0,1,0,0,0,0}; // |

void setup()
{
  Serial.begin(9600);  
  Serial.println("MASTER-KNOTEN");
  Serial.print("Maximum Slaveknoten: ");
  Serial.println(maxKNOTEN);
  Serial.print("Datengroesse in byte: ");
  Serial.println(busbytes);
  Serial.println("***********************");
  
  Wire.begin();                 // Activate I2C link
  pinMode(buttonPin, INPUT);    // test-tastereingang festlegen
}


//#####################################################################################################
void loop()
    
{
  for (int Knotenadresse = startKNOTEN;         //alle knoten scannen
           Knotenadresse <= maxKNOTEN; 
           Knotenadresse++) 

        
    //################################################################################################       
    { 
     // testbut = 0;  
     anim = 0;   
    Wire.requestFrom(Knotenadresse, busbytes);        // daten vom jeweiligen knoten anfordern
                                                 
           DATEN[0]=255; DATEN[1]=255;   // wenn kein knoten dann auf 255 setzen    
          if(Wire.available() == busbytes) {                                    // wenn knoten und daten dann
            for (i = 0; i < busbytes; i++) DATEN[i] = Wire.read();          // daten holen (zuerst busID, dann daten)
           // for (j = 0; j < busbytes; j++) Serial.println(DATEN[j]);        // daten an rs232 ausgeben   
          }            

//            Serial.println(Knotenadresse);
//            Serial.println(DATEN[0]);
//            Serial.println(DATEN[1]);
//            Serial.println(" ");
           
            adresse=DATEN[0]; 
            busstatus=DATEN[1];
           
            if(busstatus == 0)       {sensorbelegt=false;  ledsensoron=false;}
            else if (busstatus == 1) {sensorbelegt=false;  ledsensoron=true;}
            else if (busstatus == 2) {sensorbelegt=true;  ledsensoron=false;}
            else if (busstatus == 3) {sensorbelegt=true;  ledsensoron=true;}
      
         //################################################################################################
         //Testbutton Status lesen und variable testbut entsprechend setzen
       
          buttonState = digitalRead(buttonPin);               //tastereingang einlesen
          if(buttonState == HIGH){                            //wenn taster aktiv dann variable anim setzen
          anim = 1;
          //delay(5); 
          }
            
//            //debug debuginfo tasterstatus auf rs232 ausgeben
//            Serial.println("#######################");
//            Serial.print("Knoten Adresse    :");
//            Serial.println(adresse);
//            Serial.print("Busstatus         :");
//            Serial.println(busstatus);
//            
//            Serial.println("----------------");
//            Serial.print("Fliese belegt    :");
//            Serial.println(sensorbelegt);
//            Serial.print("LED Fliese       :");
//            Serial.println(ledsensoron);
//            Serial.print("#######################");
//            Serial.println(" ");
      
          //################################################################################################
          //Testbutton Status an jeweiligen knoten senden
      
          Wire.beginTransmission(Knotenadresse);           // transmit to device actual in for loop
          //anim schreiben
                    
           if (anim==0) {testbut=leddat1[j]; j++;}
                   else {testbut=leddat2[j]; j++;}
           if (j>8){j=0;}
          
          Wire.write(testbut);                             // senden des tasterstatus
          Wire.endTransmission();                          // ende gelände mit uerbertragung
       
          delay(DELAY);
          

    }
   
}

 

With this arrangement, it is now possible to read all Arduinos and their input or to control the LED via the bus. In the next step, a „sensor“ is built, a board is laid out and the ArduinoUno reduced to its microcontroller. I’ll talk about that in one of the next posts …

 

 

 

   Sende Artikel als PDF   

Solar – Radiometer

The Radiometer – also called lightmill – is an instructive, physical demonstration object that was invented about 100 years ago by the English physicist Crookes. This small physical-technical arrangement clearly shows how light is converted into mechanical energy.

 

 

The working princip of the solar radiometer:

Impeller inside the part evacuated glass ball

If warm light, ie sunlight, light of light bulbs or spotlights, meets with light in the spectrum of which the infrared component is present (but not cold light from fluorescent lamps) on the wing cross resting on a needle, this will turn depending on the intensity of the light source , In a particular method, a partial vacuum is generated in the glass ball, so that the air resistance is not stronger than the rotational force of the impeller generated by the light energy. The blackened surfaces of the wing cross absorb more light energy than the bright surfaces. Due to the warming of the air molecules, a much higher pressure is created on the dark areas than on the bright areas. This causes the constant rotation of the wing cross. (Brownian Molecular Theory). Depending on the light intensity, up to 3000 revolutions per minute should be achieved. (Source: Manufacturer of the Radiometer)

 

   Sende Artikel als PDF   

Temperature sensor for IV-11 DCF melody

A functional update for the IV-11 DCF melody watch is available from gr-projects. It is a radio temperature transmitter. The special thing about it is, that the transmitter operating in the ISM band 433 MHz is equipped with a photovoltaic cell (solar cell). Depending on the version, a small rechargeable battery or a CR2032 button cell can be installed in the transmitter. The battery is thus supported by the solar cell in the sunlight or in the battery version it is charged during the day and then keeps the transmitter in operation over the dark time.

The assembly is easy. The kit consists of a transmitter and a receiver. The boards of transmitter and receiver are equipped with few components quickly. Here, however, some attention is required and you should read the documentation carefully, because due to the lower number of kits, the boards are manufactured without component imprint and solderstop.

transmitter module

The radio modules themselves are completely pre-assembled (SMD) and only need to be soldered into the corresponding circuit boards. Optionally, a trim potentiometer can be connected in parallel to the temperature sensor (NTC) for adjustment purposes. The transmitter, like the receiver, is installed in a small PVC housing. Here, except for a 3mm drill hole and possibly some silicone for the sealing of the solar cell (for operation outside the window sill) no further tools are needed.

transmitter complete with PV-cell

To connect the receiver to the clock, make a few minor changes to the clock’s mainboard. First, the microcontroller is replaced – logically – because there is indeed a new program that then displays the temperature in the date line. A resistor is removed, one is added and a jumper can be swapped. The connection between the clock’s motherboard and the radio receiver is made with a piece of cable. Three lines are required (GND, + 5V and the data signal from the receiver controller to the clock controller). That’s it then already. The clock can go into operation. After a few seconds, the received temperature is displayed in the tube.

receiver in it´s case

 

A video how to solder the circuit is available here:

   Sende Artikel als PDF   

USB stick defective?

 

Again and again it happens to me that a USB memory stick loses its function and is suddenly no longer recognized. Often the stick is still registered as a drive in the system, but it lacks the disk, or even the system reports that the stick is not formatted. And even though he just recently, full of important data, has worked in another computer. 🙂 (Here would now be the story with the backups or backup copies …). All these problems are mostly due to operator errors or mechanical problems. For example, an operator error may be that the stick is being pulled while one more writing is in progress. The stick is then de-energized during a process. And depending on whether the controller or flash memory can handle it, the stick will survive or not. Often, mechanical defects are the cause of breakdowns. So it may be that the solder joints between the connector and the board break, or get the connecting pins of the quartz or oscillators contact problems.

In this case, I got a miniature stick from extrememory, which does not want to give away its stored data. It is displayed in the system administration, but if you want to access it, the message „no data carrier found“ comes. The attempt to format or partition over diskpart from the commandline did not work. Also various tools like „SDFormatter“ or „USBstick_Formattool“ failed. Even with Linux or on MAC systems, no success was achieved. So a stick for the barrel … But I thought, even if the stick in its small design rather not close to a mechanical defect – why not take a look anyway 🙂 And at 16GB I will not give up so fast.

So I tried to gently open the case by first removing the metal case of the USB connector.

That works quite well. After I wanted to take a closer look at the appearing small printed circuit board with its tracks, there suddenly appeared something familiar.

That looks like an SD card. More specifically, like a microSD card.

That’s the way it was. The USB stick is nothing more than a MicroSD card reader, in which such a card is installed. Using tweezers, the SD card could be levered out.

Apparently here again the problem is with the contacts, or contact springs between card and card reader. It is the cause of the problem, because the SD card worked fine in another card reader and all the data was available. It pays to invest in front of the garbage bin for a few minutes and to inspect the innards of the device.

   Sende Artikel als PDF   

DAT-Walkman Sony TCD-D3

Sony TCD-D3

At least one blog post per month to write I have set myself the goal, even if it is not always easy to implement this temporally. Anyone who has small children himself can perhaps imagine that. But in the evening and in between, I can collect material and edit it. -> it just takes everything much longer. This time I organized a Sony DAT recorder for retro audio. It is a Sony TCD-D3 from 1990-91, a so-called DAT Walkman.

DAT (Digital Audio Tape) is an audio magnetic tape recorded digitally. The recording format and the sound quality are essentially similar to those of the audio CD. The recording takes place on small cassettes, which were also used in the storage area in the EDP (DDS tapes). The DAT format was intended as the successor of the audio cassette, could not prevail in the broad market. It is also discussed here that the music industry did not want to see the format in the consumer world, as it was possible with the system to produce digital, lossless copies.

The technical structure of the cassette drive corresponds to that of a video recorder. The tape is pulled out of the cassette with loading arms and passed around a rotating head (DAT-R). The recording is done in helical scan. The copy, which I acquired this time as „defective“, was with the defect: Cassette shaft does not open, described. After dismantling, I noticed that I was not the first to look at the inside of the device after the factory. Someone was already messing around. All (tantalum) capacitors were soldered, the lead wires to the battery pole contacts were „pinched off“ and the wires were missing. The Flexiprint, which connects the front panel to the mainboard, had a broken track when looked at closely.

fixed trace

The broken wire could be repaired by carefully scraping off the insulation and brazing a stranded wire. The capacitors I have all newly soldered and of course checked before. Here I noticed that some were not soldered properly and had a cold loosening at a pole or were not connected to the pad. The battery contacts were also provided with new wires. On the mainboard there is also a DC / DC converter, which makes the supply voltages for the logic and the audio components from the 9V input voltage. (5V +/- 7V). This converter is housed in a completely soldered tinplate box. Of course, nobody was inside and checked the Elkos inside. That was done quite quickly and the small box was overtaken. Now I was able to provisionally reassemble the boards and drive and put them into operation. As data carrier I used a DDS (storage) cassette. So tension on it and „Eject“ pressed and lo and behold, the cassette compartment opens immediately. From my Handyaudioplayer as a music source, I made a trial recording. And what can I say, a wonderful sound quality!

The next issue to fix is ​​more of a visual nature. These are the side casings, which are coated with a rubber coating and this begins to seem to change chemically and becomes sticky. So I washed this gum carefully with isopropanol and tried not to replace the white printed lettering with. That worked quite well. With acrylic clearcoat I then painted the parts.

painted side casings

After curing the clearcoat I was able to assemble everything again and start the final test. The following pictures show the inside of the TCD-D3.

Specifications of the TCD-D3

  • Type: Digital Audio Tape Dec
  • Audiotracks : 2-channel stereo
  • Tape speed: 4.075, 8.15 mm/s
  • recording time: 240 minutes
  • headsystem: 2000rpm, rotary
  • D/A converter: 16 bit linear
  • A/D converter: 16 bit linear
  • Samplefrequency: 32-48kHz
  • Frequency Response: 20Hz to 22kHz
  • Signal to Noise Ratio: 90dB
  • Dynamic Range: 90dB
  • Total Harmonic Distortion: 0.0008%
  • Analoginput: 80mV (line), 0.25mV (mic)
  • Analogoutput: 0.5V (line)
  • Dimensions: 85.2 x 40 x 120.1mm
  • Weight: 0.42kg

 

   Sende Artikel als PDF   

Mini-TV Broksonic

Broksonic CIRT-2097T

This beautiful, small, new piece of technology from the eighties has been added to my collection. It is a small tube radio receiver with radio part called CIRT-2097T from the manufacturer Broksonic (according to Internet research it is an US company). The device I received with the attribute „defective“ quite cheap on a flea market platform. So I thought, the risk can be taken and risk a repair attempt. What great things can not be broken – if it’s not just the picture tube.

inside the Broksonic

After a short functional test with the plug-in power supply, it soon became clear that nothing was working. No picture – no sound, no nothing. Since the device also has a battery compartment, I next wanted to try to feed the power via the battery terminals to see if there may already be a problem. And there it was already – the problem. The battery cover was almost impossible to get off, it held as glued. After some back and forth, I got the lid but then non-destructive and it revealed the cause of „jamming“ or better „gluing“. There were still batteries in the battery compartment (probably for 20 or more years). They were in a bad condition, totally corroded and leaked. In part, the outer coat of the cell was corroded and no longer available. Oh dear – I thought, hopefully the leaked dielectric did not move inside the unit and did damage there. There was nothing left for me to do but to disassemble and check everything. And then the evil manifested itself:

from leaked battery cells distroyed pcb

About a quarter of the TV board had come in contact with the battery fluid. And the stuff has done a great job, etched away almost all the traces and leads from components.

So I first tried with PCB cleaner to remove all the crystals and the rest of the battery juice to get a closer look at the damage. A few random measurements with the ohmmeter quickly showed that many traces were severed. So it did not help, the tracks had to be uncovered. Only then would a reasonable repair possible.

Rough cleaning with the brass wire brush

With a rotating brass wire brush, I then began to remove the etched areas, remove the remains of the solder resist and expose the copper traces.

Fine work with glass brush

After the rough preliminary work had the glass brush ran. Only with that it was possible to remove all paint and corrosion residues and finally expose the traces. A tedious job …

the exposed and repaired copper tracks

… but finally it was possible to uncover and repair all damaged areas. Some resistors and capacitors also had to be renewed because their leads were also in poor condition.

After the repair, a bump test could then be carried out – lo and behold, there was no further error and the device was working properly again. So I was able to protect the repaired area of ​​the board with solder varnish from renewed corrosion and reassemble the device.

 

 

 

 

Finally, here is an overview of the technical data:

vendor:                            Broksonic (US-Firma New York)
type:                                  CIRT-2097T
year of production:   ca. 1982
model:                               TV+FM Empfänger portable
receiverprinciple:       Superhet
screensize:                     2 Zoll SW Bildröhre
bands:                               AM, FM, SW (Radio), VHFI,VHFIII,UHF (TV)
                                              AM: 535-1605kHz
                                              SW:3200-9700kHz
                                               FM:88-108MHzTV:
                                               VHF Kanal 2-13(US), 2-12 (E)
                                               UHF Kanal 14-83(US),21-69(E)
supply:                               battery or accu, AC with adaper
supplyvoltage:              accu 6V, battery 6×1.5V AA
speaker:                           dynamic 16 Ohms speaker
outputpower:              150mW
dimensions:                  150x53x202 mm (BxHxT)
weight:                             ca 1.1kg

   Sende Artikel als PDF   

VFD clock with date, day of the week and sound

I received a new kit for vacuum fluorescence display from Günter (gr-pojects). Thanks a lot!

It is a clock with Type IV-11 vacuum fluorescent display tubes for hours, minutes and seconds, and an IV-18 tube for date display, and IV-3 for displaying the day of the week. The clock consists of a mainboard with power supply, CPU, MP3 module and driver blocks for the tubes. The time is set and synchronized via an externally connected DCF-77 receiver. Later, the board will be extended with a real-time clock circuit. The power supply for the entire circuit comes from a small plug-in power supply with 12V / 1.2A. The total power consumption is about 450mA. As a special feature, the clock has a small MP3 sound module with MicroSD card slot. This receives from the microcontroller via the serial interface every quarter of an hour a corresponding command to play an MP3 file. Thus the quarter of an hour is signaled with a „gong beat“, half an hour with two and three quarters of an hour with three „gong strikes“. At the full hour, the corresponding time is announced.

The entire circuit is built into an aluminum-acrylic housing. All fittings are milled and screwed. A video of the structure and the function can be seen below:

   Sende Artikel als PDF