Miniature Realtime Controller
Wichit Sirichote, kswichit@kmitl.ac.th

A Miniature Realtime Controller controls night light, A/C, household appliances with programmable scheduler.


Introduction

This is my long history the device that controls my home's night light, air-conditioner,etc. The device is a Miniature Realtime Controller. The circuit uses only three chips, a 89C2051, DS275(MAX232), and 74LS07 open collector driver. The scheduler for time on/off of 6-channel output can be made by downloading from PC and saved into onchip RAM. Each output provides a 20mA sinking suitable for driving a homemade opto-triac or big solid-state relay for heavy load.

Hardware

A circuit diagram of the Miniature Realtime Controller is shown in Figure 1. A 89C2051 with a low-cost Xtal 3.579MHz runs timer6.hex. The 6-channel output is P1.2 to P1.7 driving with sink current. A 74LS07 open collector provides approx. max 20mA @12V suitable for driving a homemade opto-triac shown in Figure 2. Two signal diodes, 1N914, provid simple backing up supply for the 89C2051. Since RST uses simple RC circuit, there is no brownout protection and reset switch thus when the controller operated with battery for long time, the chip may knock. Simply take the battery out and put them again.
Figure 1: Circuit Diagram of Miniature Realtime Controller

Homemade Opto-triac

An opto-triac with zero-crossing can be made easily. I have used an MOC3041 to drive 5A 240V triac. A night light used in my home mostly be an incandescent lamp, the circuit below works fine. For such heavy load as air-conditioner, I have used a solid-state relay,one from CRYDOM D2410, say.
Figure 2: Example of Connecting Solid-State Relay to the RTC

Software

Timer6.hex is the hex file for 2051 chip. The original source program timer6.asm was written in assembly with c32 cross assembler format.

Example of scheduler air.pgm was written as a text file. Downloading to the controller may simply do via communication program, Xtalk or any others program but sending each character should mathed the receiving speed of the controller. For Xtalk, the speed may reduced by changing CWAIT command. Figure 3 shows an example of downloading scheduler using command p(program) followed by command r(read) to check the stored programm.

Figure 3: Checking stored program via Read command after air.pgm downloaded
Figure 4: Using Help, Enter time & Date


Last updated, 15 July 2542