Relay interface module
The module’s circuit is shown in Fig. 3. This module actually controls the load. For a relay to operate, a suitable pull-in and holding current should be passed through its coil. Generally, relay coils are designed to operate at a particular voltage. We have used 12V DC supply to switch relay RL3. This module receives power and data through the main module’s connector CON3 to its connector CON6. The relay module is used to connect devices. The status of the load/device is indicated by RGB LED (LED8). When power is switched on but load is off, RGB LED is red. When load is switched on, RGB LED is green.
You can replicate the same relay module circuit and extend a parallel connection at CON3 to control another load. Six or more loads can be connected in this manner.
Touch-control module. This module provides various control options for controlling devices/appliances manually. The method of interfacing a touch-control module is shown in Fig. 4. The circuit has a 4-wire resistive touchscreen (not shown in Fig. 4), ATmega8 (IC10), 128×64 graphic LCD (JHD12864E), 7805 regulator (IC9) and a few other components. The touch-control panel menu includes lock/unlock, name of the device like porch light, lamp, on/off buttons, etc for controlling connected devices and also has a shutdown feature for the system. It includes a lock screen feature that switches off the LCD backlight when not in use, in order to save power.
A resistive touch panel consists of two transparent rigid foils, forming a sandwich structure that has resistive layers on its inner sides. The touch panel is easily available in mobile phone repair shops. Resistances of these layers usually do not exceed 1-kilo-ohm. Opposite sides of the foils have contacts available for use through a flat cable. This cable is connected to CON11 in the circuit.
The process of determining coordinates of the point at which the touch panel is pressed can be broken up into two steps. First is the determination of X coordinate and second is Y coordinate of the point (Fig. 5).
In order to determine X coordinate, it is necessary to connect the left contact on X surface to ground and the right contact to +5V power supply (Vcc). This enables a voltage divider to be obtained by pressing the touch panel using a stylus (or finger). If the pressing point is closer to the left contact of X surface, the voltage will be closer to 0V and the controller will determine the exact position of the point depending on the voltage obtained.