Using TTP223B touch module and relay to control AC/DC load with Arduino
Вставка
- Опубліковано 4 сер 2024
- Learn Arduino in 30 Minutes (video): robojax.com/L/?id=135
This video shows you how to turn AC load like bulb ON and off using TTP223B touch module with a relay.
This demonstration and code will shows how to use it with Arduino and without arduino.
You will also learn how to connect if your relay is different.
The last section of the video shows you how to control the time, the AC bulb or load is ON.
The best thank you for me is to not skipping ads and Subscribing 🔔 to my channel, and clinking 👍 the video. It is greatly appreciated. 🔔 😊.
I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊 .
Jump to different chapters of this video:
00:00 Introduction
01:13 Wiring explained
07:06 Code explained
08:21 Demonstration with Arduino
Get the code for this project: bit.ly/2LGayjJ
******Purchase items used in video *****
Relay from Amazon USA: amzn.to/3p1n0iL
Relay from Amazon Canada: amzn.to/2Lru1Kp
TTP223B from Amazon USA: amzn.to/3a8yE6y
TTP223B from Amazon Canada: amzn.to/2WdY22o
Related Videos:
4 channel touch with relay: • Arduino code for 4 cha...
Watch Touch counter video: • Robojax Touch Counter ...
Watch 16 Ch Touch keypad video: • How to use 16 Channel ...
Learn Arduino in 30 Minutes (video): robojax.com/L/?id=135
Tutorial by Ahmad Shamshiri form Canada
****************************
Learn Arduino from a proven instructor with 100s of projects, code, wiring diagram in structured course in one place. Purchase Arduino Course at Udemy.com : robojax.com/L/?id=153
****************************
If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link paypal.me/robojaxTV
Get early access to my videos by becoming my Patreon and and have your name mentioned at end of very videos I publish on UA-cam: robojax.com/L/?id=97
If you want to learn Arduino from proven instructor on **Udemy**: bit.ly/rj-udemy
Follow me on Facebook robojaxTV
Follow me on Twitter: / robojaxtv
Follow me on Instagram: / robojax
Tutorial by Robojax.com
Get other projects code and learn Arduino
robojax.com/learn/arduino
#robojax #robojaxToueh #robojaxRelay - Наука та технологія
thanks man for tutorial, very appreciate your work :)
Nice sir
I have a lot of respect for the people of India. Great videos. Greetings from México.
Thanks. I am Persian Canadian.
hola una pregunta .. esa informacion no se puede grabar al touch sensor ? osea se puede despues que hacemos esa configuracion sacar la placa arduino ? o solo funciona con la placa de es a manera ?
Hi Robojax, I stick a TTP223B sensor to a piece of glass and would like to have that glass act as a switch. The problem is when the sensor touches with the glass (without my finger touching the sensor or the glass) it sends a high signal to the Arduino board. I have also tried connecting the signal pin of the sensor to an analog pin in the arduino and the Arduino reads 1023. I have also tried connecting the GND of the Arduino board to my house's ground but it still sends a high signal when the sensor touches the glass. Do you think this is the way the TTP223B should work or is there something wrong with the sensor? Thanks.
HI, Interesting. This module uses capacitive touch to detect touch. So the surface area where you are supposed to touch determine the proximate value for the capacitor and it has been calculated to work that way. When any other object comes in contact with that plate (touch area or electrode), it changes the capacitance of the electrode and as a result it triggers the touch detection. So if you can, you should draw the schematic diagram of this module and find out the which resistor or capacitor to change and it will work.
here the datasheet for this module: infusionsystems.com/support/TTP223.pdf
and you can see it says: Sensitivity can adjust by the capacitance(0~50pF) outside.
In the setup without the Arduino board, the touch sensor works just like a push-on button, now if I want to make the touch sensor work just like a regular on-off switch do I need the Arduino to do that?
Yes you do need Arduino to so it keeps the status of your touch. Watch this video and you will learn that. ua-cam.com/video/Nqh1vYQEEjs/v-deo.html
Thanks for the info.
I have watched your full explanation which has been done very clearly. I wish to use this without Micro controller Adruino and in the direct mode...I want to act the touch pad as toggle switch..i.e....touch to on and again touch to off...with any time of gap between on and off. Just like we switch on some load and switch it off whenever we wish. Once again, you can switch it on by touching it and switch it off as and when needed..is it possible by adding any component to this PCB...???
without Arduino Microcontroller (MCU), you can't do it. When you touch without MCU, it turns ON and when remove your finger, it turns OFF.
@@robojax
Yes, I have purchased a wrong item...This board can't be remodelled somehow..????
I should have enquired and seen many videos before buying it. Actually, I should have bought the Brown Coloured PCB wherein provisions for 2 jumpers are there...Which help in using the board in 4 configurations plus it has a slot for extra condenser also for sensivity adjustments. Price is more or less same...The company which supplied me hasn't given any support... That's very bad...😢😢😢
sir i wanna on output with help of sensor and when I sense again sensor the output will be off, mean latch krvana h , and 1 bar sense s on or dobara sense s off, was that possible?
Look here. Exact same code ua-cam.com/video/Nqh1vYQEEjs/v-deo.html
Hello,
My electronic assembly and your code (I copy / paste) code does not work. I use a Velleman VMA305 and it does not work. It's the problem ?
Also, you use which component (values ?/Model?) on the breadboard between + and - ? . Thanks for your help.
Does the module light turns ON? if not check wires. if yes. than check your relay by connecting the input of the relay to instead o connecting to touch module, connect it to GND to see if it turns ON (or to 5V if your relay is high trigger).
The component has been explained at 5:38 and it is a capacitor to filter noise. But it is should not affect the module.
Thank you very much, but i read only because... I'm hard of hearing, not like everyone else, but like many people. Thank you for your answers
can you dim also the ac with a capacitive sensor
this is just switch. and switch means ON and OFF. Here is Arduino based dimmer ua-cam.com/video/zJQf6bNodhE/v-deo.html and yes you can use the touch switch to make the light dim. Very interesting project.
Does this sensor feels nearby finger (I mean without physical touch) or it has to be physically pressed?
I didn’t want to reply, but then I said let’s repeat the title: touch
Sir, in your first step when you cut one of the two wires to connect in the relay be sure you cut the right wire. This is important for safety reasons. One wire is ground and one wire is hot. the ground wire should never go through a switch or relay, otherwise you can end up with dangerous voltage on the appliance when it is turned off. You can tell which wire is ground because it is always marked somehow. On a lamp cord if you look closely you will see or feel small ridges on the ground wire side. This is connected to the wide pin/spade on the plug so you cannot plug it in wrong. Cut the smooth side of the cord only, to be safe.
Thank you for the comment. For most loads it does NOT make any safer whichever you cut see here snipboard.io/ujC2dH.jpg
what is the difference of module version ttp223b and ttp223?
the chip is the same, because the blue module was introduced later (I believe) they distinguished themselves with "b".
THAnkyou
you are welcome.
Hi, thank you very much for your lesson. My circuit works great. Is it possible for you to provide the arduino code for the circuit with 2 capacitive switches, 2 relays and 2 lamps with one arduino board? Thank you so much for your help. Svetlana
You are welcome. Here is touch for 4 channel with relay ua-cam.com/video/4kVhG0OpCf8/v-deo.html The best thank you for me is to not skippin the ads and Subscribe 🔔 to my channel, like 👍 the video and do not skip the ads.. It is greatly appreciated. 🔔 😊.
I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊 .
How do I check if my ttp223B or relay module is working and has no faults because even after proper connections it isn't working
if you don't get any value on Serial monitor and connections are okay, then the module is bad.
Can I use Power Module transformer 220V AC - 5V DC to get 5V from 220V source?
Yes you can. But your comment is int he wrong video. You should watch this video ua-cam.com/video/-JD3E7e0RAE/v-deo.html
@@robojax thanks for the reply. Now I have new problem. The relay only turn on once and doesn't turn off when I touch capacitive touch switch again. If i add 10 microfarad capacitor will it fix this issue?
Can you please let me know the model of your relay.
Also do we really need two power sources if we only need to drive a 5v motor?
Hello,
I added link to the 5V relay in the description of video. No you don't need second power source. the same 5V can be used to power them.
here the links to purchase. relay has no model. it is called 5V relay module
Relay from Amazon USA: amzn.to/3p1n0iL
Relay from Amazon Canada: amzn.to/2Lru1Kp
TTP223B from Amazon USA: amzn.to/3a8yE6y
TTP223B from Amazon Canada: amzn.to/2WdY22o
@@robojax thank you for the info. BTW i think your videos and content are very well put together and understood.
Best Regards
Anthony
i have a small doubt that, can we press a touch sensor for long time
Yes you can. As soon as your finger touches, the switch/relay will activate. Once you remove finger, switch/relay will get disconnected. So if you keep for long period of time, the switch will stay ON until you remove finger.
Robojax Thank you very much for u r reply
Will it work through glass
it is touch and you have to touch the module. If you put it behind glass, then you won't be able to touch.
Sir my touch work is not properly working one time touch relay many time connect and disconnect bulb light biking speedily I use 50 volt and 22 uf capcator please solve my problem
the problem is not the capacitor. Change the delay in the loop. if dalya(200), change it to dalay(500) or more to get better result.
@@robojax thanks sir
But I use without arduino so how can I delay change a
When I touch so pulse not Gernet properly and relay green led not off problem suddenly duering the touch the pade and
Some time I touch pade it work proper
inside loop() just put delay(500) or more value snag.gy/AHhRpV.jpg
WHERE IS CIRCUIT DIAGRAM?
Wiring explained. No diagram.