Here is a Christmas tree controlled by the Commodore 64!

Do you know what is the mistake that everyone, but everyone, makes when decorating the Christmas Tree? They don't connect it to the Commodore 64!

Subscribe my YouTube channel ValorosoIT. Retro technology, vintage audio, retro computers, experiments and tests. Retroprogramming, Basic. Commodore, IBM, Atari, Apple, Texas Instruments, Amstrad, MSX.

To fill this gap, I did this experiment: a Christmas tree controlled by the Commodore 64!

Hardware to connect the Christmas Tree to the Commodore 64

To carry out this experiment I used the interface with 4 relays and photocouplings that I have already shown you in other videos and in this article. It connects to the Commodore 64 user port via a 3.96mm edge 24-pole connector.

Christmas tree interface Commodore 64 user port plugs photocoupling relay sockets, control sockets, lamps, Christmas lights connected to the Commodore 64, 5V USB power supply, user port, 3.96mm edge 24-pole type connector

This time, I put the interface inside a container, to increase security. In fact... here there is current! If you want to carry out this experiment, pay close attention!

The wiring diagram of the connections is as follows.

Christmas tree interface scheme Commodore 64 user port plugs relay sockets, load control, home automation, outlet control, light control, Christmas tree lights control with the Commodore 64

The mains voltage first passes through a fuse, which increases the safety of the project. In the event of a short circuit, the fuse would be broken before creating damage!

I also mounted in varistore, to reduce the electrical disturbances caused by switching the relays that control the various loads.

Continuing your analysis of the mains power section, consider the following:

  • all lands (yellow/green wires) are connected to each other;
  • all neutrals (blue wires), are connected together with each other;
  • the phase (brown wire) enters from the plug, passes from the fuse, then gives voltage to the power supply and common contacts of the relays;
  • the normally open contacts of the relays are connected to the phases (brown wires) of the sockets.

To tell the truth, this cassette could be used to drive even loads other than the lights of the Christmas Tree! By changing the program appropriately, you could drive the lights of a room, irrigation pumps and other things.

However, attention must be paid to this aspect: remember to turn on the Commodore BEFORE the interface, otherwise the relays will activate randomly and the sockets will activate without your consent! For the same reason, we must turn off the interface FIRST and then the Commodore 64.

Christmas tree interface Commodore 64 user port plugs sockets relay photocouplings, control sockets, lamps, Christmas lights connected to the Commodore 64

The 4 relay interface must be powered externally, using a 5V power supply. I included the power supply inside the same container where I mounted the relay interface.

Relays control the power supply of four sockets, to which the Christmas tree bulbs connect.

Since relays are very noisy, when they shoot, you might think of building an interface with triacs instead of relays to be quieter.

Christmas tree controlled by Commodore 64: the program in Basic

Now let's see the software, which I wrote in Basic. The software can be downloaded at the bottom of this page.

Christmas tree interface Commodore 64 program basic user port plugs sockets relay photocoupling, Christmas lights connected to the Commodore 64, control sockets, lamps

To load the program, I use the Kung Fu Flash, which allows you to start it immediately when the Commodore 64 is turned on.

The light bulbs that you buy today already flash independently. It is therefore not necessary to carry out routines to flash the series of light bulbs. Indeed, since there are transformers, putting and removing voltage continuously could even be counterproductive.

Follow me on Instagram channel. Retro technology, Commodore, vintage audio, retro computers, experiments and tests. Retroprogramming, Basic. Commodore, IBM, Atari, Apple, Texas Instruments, Amstrad, MSX.

In the software, I have included commands to:

  • turn on only one set of lights at a time (keys from 1 a 4);
  • turn off all light bulbs (button 0 โ€“ zero);
  • control the switching on of several bulbs at a time (keys A, B, C and D);
  • automatically drive the various series of bulbs, slowly, in order to choose the color of the shaft and the tip automatically (S key);
  • exit the program (key X), at the exit the bulbs all turn off.
Christmas tree controlled with relay interface for the Commodore 64, basic user port plugs program sockets relay photocouple, Christmas lights connected to the Commodore 64, control sockets, lamps

List of the program in Basic

And here is the listing of the program in Basic to manage and control the series of Christmas tree lights.

The program is available in two formats:

  • TREE-CHRISTMAS-COMMODORE-64.TXT, in text format, to analyze it on a PC (this file can not be immediately loaded or transcribed on the Commodore 64: to convert it into PRG you have to use C64LIST);
  • CHRISTMAS-TREE-COMMODORE-64.PRG, to be unpacked, in loadable and bootable format from Commodore 64 and emulator (CCS64, VICE or others).

Credits: in the video tutorial, the SID music is Contest Demo (part 4) โ€“ Sami Seppรค (Rock).

Subscribe my YouTube channel ValorosoIT. Retro technology, vintage audio, retro computers, experiments and tests. Retroprogramming, Basic. Commodore, IBM, Atari, Apple, Texas Instruments, Amstrad, MSX.

Do you like this page? Share it:

Posted in Retro Computer, Retro Technology and Vintage Electronics, All articles.

4 Comments

  1. As always a great idea and a great video !!!
    Congratulations also to your assistant, and merry Christmas ๐ŸŽ„

  2. Your site is very clean (in the sense of very tidy) and above all full of valuable content. It must also be said that there is a lot of passion... In short, I hope you see the number of members and the esteem of the Internet community grow!!!
    PS Thanks for talking about MSX, the computer I adore (I'm a damn nostalgic...)

Leave a Reply

Your email address will not be published. Required fields are marked *