Sei sulla pagina 1di 3

CONSTRUCTION

PC-BASED AUTOMATIC
TIME MANAGER
„ ADEEB RAZA gramming language is used for con- and a small square box on the top of
trolling an electric bell or hooter the rectangular box, respectively. The

M
any articles have been pub- through an electromagnetic relay. It program output user interface is
lished in EFY for control has been designed for Windows XP. shown here in the screenshot.
ling devices through a PC’s The graphics have been included
parallel port or line printer (LPT) so that the master clock shows the real Hardware interface
port. Here is another project for con- clock time on the PC’s screen. At the Fig. 1 shows the block diagram of the
trolling a school bell or a scheduled same time, it shows alarm clock tim- automatic time manager (ATM) and
shift-timing alarm of a factory auto- ing for triggering the timer circuit for Fig. 2 shows the circuit diagram of the
matically. The load connected to the activating the bell or hooter. interfacing unit. Here, we are con-
output of the project can be an elec- The alarm timings, ‘on’/’off’ con- cerned with only two connections: pin
tric bell or a hooter. The timing can trols and their activation sequence can 2 and a ground pin of the parallel port.
be programmed for every day sched- be set by the user as per his require- Pin 2 corresponds to the first data bit
ule as per individual requirement. ment through 48 numbers of settings— ‘D0’ in 8-bit data bus of the parallel
A Windows-based program devel- that is, 24 settings for alarm time dis- port.
oped in Microsoft Visual Basic pro- play on the screen and 24 for enabling The whole unit is powered by a
or disabling the 6V DC regulated supply. LED1 is the
timer circuit. power-’on’ indicator.
The alarm time IC MCT2E isolates the PC from the
as well as bell main interfacing unit in case any short-
or hooter ‘on’/ circuit occurs. Thus, it acts as a safety
’off’ timer can device and protects the PC.
be set by IC LM555 (IC2) timer is configured
simple clicking in monostable mode of operation. A
the bigger rect- low transition at its pin 2 will trigger
angular box the timer. IC2 timer can be triggered

PARTS LIST
Semiconductor:
IC1 - 7806 6V regulator
IC2 - 555 timer
IC3 - MCT2E optocoupler
LED1-LED3 - 5mm light-emitting diode
T1 - BC547 npn transistor
D1-D5 - 1N4007 rectifier diode
Resistors (all ¼-watt, ±5% carbon):
R1 - 330-ohm
R2,R3 - 10-kilo-ohm
R4 - 470-ohm
R5, R6 - 1-kilo-ohm
VR1 - 100-kilo-ohm
Capacitor:
C1 - 100μF, 25V electrolytic
C2 - 0.1μF ceramic
C3, C5 - 0.01μF ceramic
C4 - 100μF, 16V electrolytic
Miscellaneous:
X1 - 230V AC primary to 9V,
250mA secondary trans-
former
CON1 - 25-pin D-type parallel-port
male connector
RL1 - 6V, 1C/O PCB-mounted
relay

WWW.EFYMAG.COM AUGUST 2007


CONSTRUCTION

only if the alarm time is set to ‘1’ in eter (VR1) upto 60 seconds or more. in a file name called ‘HTIME.’ This
enable condition in the software. If the The load (school bell or hooter) is con- data is fixed and continuously com-
alarm time is set to enable condition, nected to the pole of the relay. When pared with the actual time of master
you will get a one-second long beep the relay energises, the pole comes in clock.
sound from the PC’s speaker and a contact with the N/O, and connects Whenever master clock time is
high pulse at pin 2 of the parallel port 230V AC across the load. This turns equal to alarm time and alarm time is
of the PC. A high pulse output at pin on the load for a brief predetermined set to enable condition, you will get a
2 of the LPT port will cause momen- time set through 555 timer circuit. one-second long beep sound from the
tary glowing of signal LED2 and An actual-size, single-side PCB lay- PC’s speaker and a high pulse at pin 2
conduction of transistor inside out for the PC-based automatic time of the 25-pin D-type parallel port con-
optocoupler IC MCT2E. The conduc- manager circuit is shown in Fig. 3 and nector of the PC. This pulse is used to
tion of this transistor sends a low pulse its component layout in Fig. 4. control the load connected across the
to pin 2 of 555 timer IC2. relay in the interfacing circuit.
When timer IC2 gets triggered, its Software program The logic of the ATM program is
output pin 3 goes high and holds the In the program, master clock time or very easy:
relay for 30 seconds. Output pin 3 of real-time clock is represented by ‘Time,’ Compare Master Clock Time and
timer IC2 is connected to relay driver alarm times are represented by AT1 Set Alarm Time
BC547. The load is controlled through through AT24, and timer enable/dis- If T1=1, Alarm Time No.1 is en-
the relay contacts to switch ‘on’ or ‘off.’ able for alarm times are represented as abled. If T1=0, Alarm Time No.1 is dis-
The load-’on’ time duration can be T1 to T24, respectively. AT1 through abled.
set through a 100-kilo-ohm potentiom- AT24, and T1 through T24, are stored A sample program to display

AUGUST 2007 WWW.EFYMAG.COM


CONSTRUCTION
the first alarm timer setting is Alternatively, you can use with the name ‘Project1’ folder along
given below: ‘ATMINSTALL.zip’ file included in the with other relevant files and drivers.
Label4.Caption = AT1 EFY-CD. Unzip ATMINSTALL.zip file You can also create a Win-Installer
If AT1 = Time then T = 1 and you will get a folder name ATM- program as follows: Open Microsoft
If T + T1 = 2 then pat = 1 ‘This will give a beep
sound through PC speaker’ Win-Installer. In this folder, you will Visual Studio folder. In the folder
AEPData = Val(pat) ‘Set PAT= 0 or PAT=1’
get a setup program. Clicking ‘setup’ ‘VB98,’ you will get another folder
Here, when PAT= 0, the load will file will install this project automatically ‘Wizards,’ which contains another
be in ‘off’ condition, and when in ‘Program Files’ folder of Windows folder ‘PDWizard.’ In folder
PAT=1, the load will be in ‘on’ ‘PDWizard,’ you will
condition. The statement ‘AEPOut get a program
(Data)’ will give a high output at file named
pin 2 of the LPT port. ‘PDCMDLN.EXE.’
For details on LPT port, you Clicking the
may refer to ‘Device Control PDCMDLN.EXE will
Through PC’s Parallel Port Using create Win-install soft-
Visual Basic’ project published in ware for any of your
EFY’s March 2005 issue. Visual Basic projects.
In case you have
Testing of software and additional software
hardware interface and services installed
1. Install Microsoft Visual Basic 6 in your PC with Win-
on your computer. dows XP, you may ob-
2. Fabricate the interface circuit serve a problem that
on the PCB. pin 2 of the parallel
3. Connect the male connector port is high every five
pin 2 (D0) and ground (pins 18 seconds. To solve the
through 25) to female connector problem, there is a
on the PC. ‘SuperProserver’ ser-
4. Launch Visual Basic from vices in the system
the desktop and develop the ap- under ‘Control Panel
plication as shown in the /Administrative
screenshot. Save the project file Tools’ which has to be
with extension ‘.vbp’ disabled before run-
5. Run the program ning the program.
6. Set master clock time and EFY. All the rel-
alarm time. evant files of this
7. Click ATM setting to know project have been in-
more about setting and help. cluded in this month’s
EFY-CD. z

WWW.EFYMAG.COM AUGUST 2007

Potrebbero piacerti anche