To control the car wash a interface is necessary.
One of the reasons is that the model needs a 24 VDC power supply and the Commodore C64 works with 5 VDC.
Also the current that a C64 can deliver is to small for controlling the model.
The upper part of the schematic is for reading the signals from the model in to the Commodore C64.
The lower part is for controlling the model from the C64.
The LED D1 shows the status of the input signal. The LED D3 shows the status of the output signal.
If a voltage of 0 VDC is applied to the input the LED D1 will not light up and the transistor T1 will be turned off. The signal at the joystick port will be a "1" via the "pull-up" resistor R3.
If a voltage of 24 VDC is applied to the input the LED D1 will light up and the transistor T1 will turned on. The signal at the joystick port will be an "0".
Remark: The signal from the input is inverted. This has to be considered when writing the program.
If the C64 user-port applies a voltage of 0 VDC the transistor T2 will be turned off and the relays K1 will also be turned off.
If the C64 user-port applies a voltage of 5 VDC the transistor T2 will be turned on, the relays K1 will be turned on and LED D3 will light up.
[553]