KIT CONTENT
- Arduino Nano -1
- Nano USB Cable - 1
- TTP224b 4- channel capacitive touch module - 1
- 2 channel relay module - 1
- 9V battery - 1
- Battery snapper - 1
- Jumper wire(male to male) - 40 pcs
- Jumper wire(male to female)- 40 pieces
- Breadboard 830 points - 1
- 16*2 LCD with i2c module – 1
Introduction
In this project we are making a home automation project in which we are using 2 channel relay modules using TTP223B touchpad Module interfacing with Arduino Uno. Here we will press the keys on touchpad to control the Relay 1 and Relay 2. If you are looking for applications like control AC lamp or High voltage DC device you need a relay, so let's do something simple to control 2 channel relay modules.
HARDWARE REQUIRED
- Arduino Nano -1
- Nano USB Cable - 1
- TTP224b 4- channel capacitive touch module - 1
- 2 channel relay module - 1
- 9V battery - 1
- Battery snapper - 1
- Jumper wire(male to male) - 40 pcs
- Jumper wire(male to female)- 40 pieces
- Breadboard 830 points - 1
- 16*2 LCD with i2c module – 1
SOFTWARE REQUIRED
Arduino IDE 1.8.5 (programmable platform for Arduino)
Click To Download:https://www.arduino.cc/en/Main/Software
SPECIFICATIONS
TTP224B 4-CHANNEL CAPACITIVE TOUCH MODULE
- On-board TTP224 capacitive touch 4 key induction IC
- On-board 4 road level indicator.
- Working voltage: 2 V to 5.5 V DC
- Adjustable output mode, key output mode, longest time and fast/low power output
- PCB board size: 35(mm) x29 (mm).
ARDUINO NANO
NANO | |
Microcontroller |
ATmega168 |
Operating Voltage |
3.3V or 5V |
Input Voltage |
3.35 -12 V (3.3V model) or 5 - 12 V (5V model) |
Digital I/O Pins |
14 (of which 6 provide PWM output) |
Analog Input Pins |
8 |
DC Current per I/O Pin |
40 mA |
Flash Memory |
16 KB (of which 2 KB used by bootloader) |
SRAM |
1 KB |
EEPROM |
512 bytes |
Clock Speed |
8 MHz (3.3V model) or 16 MHz (5V model) |
2-channel 5V 10A relay Module
This is a 5V, 10A 2-Channel Relay interface board. It can be used to control various appliances, and other equipment’s with large current. It can be controlled directly with 3.3V or 5V logic signals from a microcontroller (Arduino, 8051, AVR, PIC, DSP, ARM, ARM, MSP430, TTL logic).
It has a 1x4 (2.54mm pitch) pin header for connecting power (5V and 0V), and for controlling the 2 relays. The pins are marked on the PCB:
- GND - Connect 0V to this pin.
- IN1 - Controls relay 1, active Low! The relay will turn on when this input goes below about 2.0V
- IN2 - Controls relay 2, active Low! The relay will turn on when this input goes below about 2.0V
- VCC - Connect 5V to this pin. Is used to power the optocouplers
PIN DESCRIPTION
TTP224B 4-CHANNEL CAPACITIVE TOUCH MODULE
VCC: 2V to 5.5V DC
GND: ground
OUT4: high/low output
OUT3: high/low output
OUT2: high/low output
OUT1: high/low output
ARDUINO NANO
RAW |
For supplying a raw (regulated) voltage to the board |
VCC |
The regulated 3.3 or 5 volt supply |
GND |
Ground pins |
RX |
Used to receive TTL serial data |
TX |
Used to transmit TTL serial data |
2 and 3 |
Digital I/O pins. These pins can also be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value |
3, 5, 6, 9, 10, and 11 |
Digital I/O pins. They can also be configured to provide 8-bit PWM output |
10, 11, 12 and 13 |
Digital I/O pins. They can also be configured as SPI pins; 10 - (SS), 11 - (MOSI), 12 - (MISO) and 13 - (SCK) |
A0 to A3 |
Analog input pins |
A4 and A5. |
Analog input pins. They can also be used as IIC pins; A4 - (SDA) and A5 – (SCL). |
A6 and A7 |
Analog input pins |
Reset |
The microcontroller can be reset by bringing this pin low |
2 channel 5v 10A relay Module
- COM- Common pin
- NC- Normally Closed, in which case NC is connected with COM when INT1 is set low and disconnected when INT1 is high;
- NO- Normally Open, in which case NO is disconnected with COM1 when INT1 is set low and connected when INT1 is high.
- Terminal 2 is similar to terminal 1, except that the control port is INT2
- INT 1- Relay 1 control port
- INT 2- Relay 2 control port
CIRCUIT CONNECTION
Connections are as follows :
- Out1 of TTP224 to the Nano D11
- Out2 of TTP224 to the Nano D10
- Out3 of TTP224 to the Nano D9
- Out4 of TTP224 to the Nano D8
- Ground to the negative rail and Vcc to the positive rail
- I2C module Vcc to positive rail and ground to the negative rail
- I2C module SDA pin to Nano A4 and SCL to A5 Nano
- Nano 5v pin to the positive rail
- IN1 of relay module goes to D4
- IN2 of relay module goes to D5
- Vcc of relay module to positive rail and ground to the negative rail
CODE
Click to see the code or copy the link:
https://drive.google.com/open?id=1zgu_BTbgCzaSqHQe0o0rDVSx10Y3XdPv
WORKING
Upload the code and see the output.
If you are looking for applications like control AC lamp or High voltage DC device you need a relay, so let's do something simple to control Relay 2 channel
Touch Pad 1 and 2 to control Relay #1
Touch Pad 3 and 4 to control Relay #2