



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Lab 2: Use of Timers, Counters and Relays
A relay is an electrical switch that opens and closes under the control of another electrical
circuit. In the original form, the switch is operated by an electromagnet to open or close one
or many sets of contacts.
A simple relay has 5 pins. The left 2 pins are the operating part by taking input, the rest of
the pins are the switching part to get output. A 4 pin relay doesn’t have NC pin.
When current will flow in the inductor, the switch will be attracted, hence opening the
normally closed (NC) switch and closing the normally open (NO) switch.
A timer is a specialized type of clock. A timer can be used to control the sequence of an event or process.
The timer switches on, when it is energized for the specified time. If it is interrupted, it starts with 0, i.e. to reset the timer, we’ll have to give an interruption to the energy source being provided.
In digital logic and computing, a counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship to a clock signal. In practice, there are two types of counters:
up counters, which increase (increment) in value down counters, which decrease (decrement) in value
Figure 1: Simple Relay
Lab 2: Use of Timers, Counters and Relays
Implement an automated motor system in Trilogy.
Motor should turn on when the water level is bellow UL It should turn off when the motor level is above UH If the water level is below LL in the lower tank the motor should be turned off. The detection of water at these levels should be confirmed by using a timer.
Inputs:
UL (Upper Tank Lower Level) UH (Upper Tank Higher Level) LL (Lower Tank lower level)
Output:
MOTOR
Timer:
T
Relay:
R
Figure 2 : Upper and Lower Tanks with defined levels
Lab 2: Use of Timers, Counters and Relays
Implement clock with time period 2 seconds when start is pushed Clock should stop working when stop button is pushed Update value of counter for every 1 minute, till stop button is pushed
Inputs:
START STOP
Output:
CLOCK
Timers:
Timer Timer
Counters:
Counter1 (Up counter) Counter2 (Up counter)
Lab 2: Use of Timers, Counters and Relays
For the circuit of this clock, two timers are used to switch the clock on and off in accordance of the duty cycle. Since the duty cycle is 50%, the sizes of Timer1 and Timer2 are same.
The START and STOP switches are used to turn on or off the clock.
When the START switch is pressed the timer will start getting energized, mean while the CLOCK = 0.
When Timer1 is fully energized, i.e. Timer1 = 1 , CLOCK will switch to 1, and Timer2 will start getting energized. On getting fully energized, i.e. when Timer2 = 1 , the switch Timer2 will be opened, hence interrupting Timer1 and resetting it.
On turning off, Timer1 will turnoff Timer2 as well, closing the NC switch Timer2. This way Timer1 will again start getting charged and cycle will continue until STOP button is pressed.
To increment the value of counter, two counters are used from the special functions. These counters reset them automatically. It increments each time Timer1 switches on. Therefore the size of Counter1 is 30 i.e. it increments Counter2 after every 30 cycles of the clock. Since the time period of Clock is 2s, Counter2 increments after every 1 minute.
Figure 4: Ladder Logic for clock
Lab 2: Use of Timers, Counters and Relays
In this circuit 4 timers are used to switch the duty cycle when Control, button is pressed. START and STOP button are used to switch on or off the circuit respectively.
This circuit is working much like the previous circuit. The sizes of Timer1 and Timer2 are same, i.e. when Control = 0 , the duty cycle of the output is 50%.
When Control = 1 , the Timer1 and Timer2 switch off, and Timer3 and Timer4 turn on. Size of Timer3 is set to 15 and value of Timer4 is set to 5. Therefore, when Control button is pressed, the duty cycle is reduced to 25%.