Once we learn how to control the parallel port, then we can use the parallel port to control relay.
It’s very easy. We simply replace the LED on LED Connecting to LPT with relay. In order for the data port can be used to control the relay, we need an an NPN transistor, for example C9013. as shown below:

You can still use the LPTTest program to enable the relay mounted on LPT like the picture above. To activate the relay, please check the CheckBox. As for turning off the relay, uncheck the CheckBox. Relays can be used to control electrical appliances to suit your needs.
With a little modification done on the program LPTTest, you can make the control electrical appliances automatically. For example, create Automatic Bell for school and others.
kalau relay nya sekitar 50 an bagaimana pak?
Kalau jumlah relay banyak ya sebaiknya jangan menggunakan LPT, lebih baik menggunakan RS232 dan dikendalikan oleh mikrokontroler, atau bahkan menggunakan ethernet