I enjoyed your video. One clarification if you don't mind, (I am so sure you are aware of this but for some of the viewers...) If you solve the equation you wrote on the whiteboard for time (t) for a fixed voltage high detected at the I/O pin you'll see that it is proportional to the capacitance, but at 7:12 you mention that this time spits out the time constant tau or the value for RC. If you are only after the change in capacitance to detect a touch then it isn't very important, but if you are trying to measure the capacitance you can't just divide the time measured by the value of the resistor unless the point at which the I/O pin goes high is about 63.2% (one time constant) of the positive supply rail. If it is anything else - then the change in capacitance will still be proportional to the change in time, but unless it is 63.2% or so, the proportionality constant will not be exactly 1/R. For example, if the I/O pin goes high at 86% of the rail then the proportionality constant will be 2/R. Without looking up the Vh for the Pro-mini I/O I can confidently say that it won't be specified to any kind of precision. I'm guessing that the cap sense library you mentioned handles all the baselining and environment (slow) tracking and the delta thresholding you'd need to make this work all as a good touch sensor, if not a good actual capacitance measurement device.
Your video is like a breath of fresh air - a novel solution, well explained. I liked the way you used physical demo, chalk and oscilloscope. Questions about your demo; Is that 100 uS per division on the scope? Ie what is the approx rise time before and after directly touching the copper electrodes? Do you think this method would detect any difference in a 1.5 liter jar filled vs partially filled with alcohol, if the copper strip were placed say 1/4" from the jar and running top to bottom? Tkx
Question - I have this toy that turns on and off by cap touch, but it automatically shuts off after a while and I want it to stay on indefinitely. Is there a way to add a circuit to simulate a person touching it so it will stay on ?
Good morning Chris, thank you for your video. I ask you 2 pieces of information: to avoid accumulation of potentially destructive electrostatic charges for the arduino pins (even when the arduino is completely off), can a high value resistor between the sensor electrode and GND / grounding be useful? Furthermore, for the connections to the electrodes about 40 cm long, is it preferable to use coaxial cables or with shield? Thank you very much for your work!
Super awesome. However, I was expecting he would eventually tell us which material made the best capacitive touch button after seeing that he was testing them all himself. I that guess gives me a question a I can hunt down myself.
I need something exactly like this. But don't know anything about programming that little module. But I might need to change the time constant around a bit to to get the detection I need by possibly changing the fixed 1 meg resistor to a variable resistor by getting a one or two meg potentiometer and just hook it up as a variable resistor. Easily done by just hooking up the wiper of the pot to just one of the other legs of the pot. I don't see the 'code' that was said in the video to be posted here. But even if it was, I don't know how to program this thing. I could buy one of the modules but would need help to load the code in there. And info on where to hook up the LED because lighting up an LED is exactly what I need to do for my project. Does the LED need a current limit resistor depending on the color of the LED? I need more info because I want to do this. Thank Chris if you read this and offer to help me!!
You are wrong. There is no delay in resistance, it's just a capacitor discharge load resistance, it's value is so big(1 to 10m) because the human capacitance is very low( in pF range).
7:20 I dont think its ''spitting out tao''. If we're talking about the capacitiveSensor library i think it spits out an arbitrary number that's just been incrementing in the while loop while the recieve pin waits to be high again. Great vid.
That's a good idea. I might have to start collecting parts! Maybe I could use a picture/picture frame,and make it look like it belongs on the wall. I'm not concerned with the various RF signals,This place has metal siding,and is fairly Faraday-cage-like already. Despite that,the Wifi,cellphones,etc. all work fine.
Yes it would be sensitive to how much pressure you apply to the contact plate. The reason, however, reveals two inaccuracies in the description, which are worth discussing. The first inaccuracy is the claim that the change in time is all about changing capacitance. In reality, the connection with the body when you're touching the plate adds a complex circuit consisting primarily of a variable resistance in series with a capacitance. When you touch the contact plate lightly, you connect the capacitance of the body through a very high resistance. As you apply more pressure, you reduce the contact resistance between the contact plate and your body. The lower the resistance, the higher the charging current drawn by the capacitor. Now you would think that the higher total resistance would increase the time constant and therefore increase the time for the input pin to rise to the voltage of the output pin, but that's not what happens, which is the second inaccuracy. While the total time constant does actually increase with higher contact resistance, that is not what is important in this case. Remember that we have the fixed resistance in the circuit AND the variable resistance of the contact of the body to the plate. The input pin is connected to the junction of these two resistances. When the contact resistance is high - with a light touch - the maximum possible charging current into the capacitance is reduced. This means that the voltage drop across the fixed resistance caused by the lower charging current is lower, so the input pin rises to match the voltage at the output pin much faster than with a lower contact resistance. It turns out - and I suppose this is technically a third inaccuracy, if only by implication rather than by direct statement - that the capacitive touch effect is more about changing resistance than changing capacitance when you're actually touching the plate. As you approach the plate - before you touch it - you add another small but variable capacitance in series with an extremely high contact resistance, complicating the circuit still further, and and resulting in two different modes of operation, but that's another story!
I like this idea. The landlord is gonna shitbrix if I cover the walls in conductive paint though. Hmm. Will regular latex paint stick to the conductive paint layer? I could cover the conductive paint with regular paint,and hope nobody notices. :) A 10x10 grid of "buttons" on the wall would be super handy!
@@TheRno0o The delay is a way of us detecting how much capacitance there is. If there is higher capacitance, there will be a longer delay. Because the capacitor is always the same, it will be the same each time. When your finger comes close, it starts to act as a capacitor. Because there is more capacitance, it makes the delay longer. So now if we switch the wire from low to high, or high to low, it will take longer than normal for the pin to go whatever the other pin went. This little delay is taken advantage of, and for you to understand this you kind of need to understand how a microchip works. Basically it will send the pin high, and it will detect the delay. When you put your finger on the capacitor, and you switch the pin to High, it will take longer for the other pin to go high, because there is more capacitance, because your finger has capacitance. So when you move your finger up, there is more capacitance, and it takes longer, and this extra delay is detected by the microchip, and it assumes that the extra delay is the fact that we touched it. Hopefully that makes sense
He says the voltage may be at 2.5v and it may be a 0 or 1 in the arduino sensing pin, but the hard found out truth is that Arduino goes to a 1 at just 0.6v, not 2.5 volts. I found this out the hard way. I could not believe a .6v was tripping the circuit. But it was. Even .5v I could get it to trip. Be aware of that, because if you are not, it is the last place you would look. Everyone says between 2 and 3 volts is the 0 or 1 threshold switch area and that is just not true.
The material itself acts as a capacitor, and your body ALSO acts as a capacitor, connected in parallel, both capacitances would sum up to a greater total capacitance, as explained in the video
I enjoyed your video. One clarification if you don't mind, (I am so sure you are aware of this but for some of the viewers...) If you solve the equation you wrote on the whiteboard for time (t) for a fixed voltage high detected at the I/O pin you'll see that it is proportional to the capacitance, but at 7:12 you mention that this time spits out the time constant tau or the value for RC. If you are only after the change in capacitance to detect a touch then it isn't very important, but if you are trying to measure the capacitance you can't just divide the time measured by the value of the resistor unless the point at which the I/O pin goes high is about 63.2% (one time constant) of the positive supply rail. If it is anything else - then the change in capacitance will still be proportional to the change in time, but unless it is 63.2% or so, the proportionality constant will not be exactly 1/R. For example, if the I/O pin goes high at 86% of the rail then the proportionality constant will be 2/R. Without looking up the Vh for the Pro-mini I/O I can confidently say that it won't be specified to any kind of precision. I'm guessing that the cap sense library you mentioned handles all the baselining and environment (slow) tracking and the delta thresholding you'd need to make this work all as a good touch sensor, if not a good actual capacitance measurement device.
Great idea with roundtable. Looking forward to more stuff from you guys.
Thanks Chris, you beats my grad school professors :)
please keep up these awesome videos!
the wall idea is a pretty cool idea, Id like to see that
add a diode in parallel with the resistor, you don't need slow fall times.
Your video is like a breath of fresh air - a novel solution, well explained. I liked the way you used physical demo, chalk and oscilloscope. Questions about your demo;
Is that 100 uS per division on the scope? Ie what is the approx rise time before and after directly touching the copper electrodes?
Do you think this method would detect any difference in a 1.5 liter jar filled vs partially filled with alcohol, if the copper strip were placed say 1/4" from the jar and running top to bottom?
Tkx
I'm loving these Roundtables!!!!
Great explanation. Thanks so much!
Really good explanation! Thank you :)
whats up with the sinusoidal noise in the demo?
Nicely paced too.
Excellent explanation!
Question - I have this toy that turns on and off by cap touch, but it automatically shuts off after a while and I want it to stay on indefinitely. Is there a way to add a circuit to simulate a person touching it so it will stay on ?
Good morning Chris, thank you for your video. I ask you 2 pieces of information: to avoid accumulation of potentially destructive electrostatic charges for the arduino pins (even when the arduino is completely off), can a high value resistor between the sensor electrode and GND / grounding be useful?
Furthermore, for the connections to the electrodes about 40 cm long, is it preferable to use coaxial cables or with shield? Thank you very much for your work!
I think that the equation for charging is wrong. It should be v = v0(1-e-t/rc)
Super awesome. However, I was expecting he would eventually tell us which material made the best capacitive touch button after seeing that he was testing them all himself. I that guess gives me a question a I can hunt down myself.
Cow skin its a very good conductive material, it smells bad after one day but otherwise very good, even better than carbon nanotubes.
Very good explained
hi thats great i loved your attention to detail thanks alot
I need something exactly like this. But don't know anything about programming that little module. But I might need to change the time constant around a bit to to get the detection I need by possibly changing the fixed 1 meg resistor to a variable resistor by getting a one or two meg potentiometer and just hook it up as a variable resistor. Easily done by just hooking up the wiper of the pot to just one of the other legs of the pot. I don't see the 'code' that was said in the video to be posted here. But even if it was, I don't know how to program this thing. I could buy one of the modules but would need help to load the code in there. And info on where to hook up the LED because lighting up an LED is exactly what I need to do for my project. Does the LED need a current limit resistor depending on the color of the LED? I need more info because I want to do this. Thank Chris if you read this and offer to help me!!
Thanks for the video. Can you please share the code and library link?
Pretty comprehensive!
You explain very clear and good. Thanks for the video, i learned a lot in so little time!
You are wrong. There is no delay in resistance, it's just a capacitor discharge load resistance, it's value is so big(1 to 10m) because the human capacitance is very low( in pF range).
Yeah, but he's shorting stuff for people who are new to this to understand better.
does the distance from where you touch from the connectors give different values?
nice explanation... Thx for the teaching
Anyway to use this as an interrupt?
Thank :) That an amazing explanation.
V(t)=Vo(t)*(1-exp[-t/tau])
Vo(t) ----> initial voltage
...otherwise...great video.
Mike come on!!! whe all know about that!! stop listening to Dude Perfect :D
I'm pretty sure it's possible to do this with raspberry pi, but I'm relatively new and don't know which pins to use. Any help?
Very helpful, thank you.
Thank you so much.. this vid is helping me alot
The capacitance should also change when you get near the metal sheet.
Great vid dawg
does anyone know how to contact this guy?
Very nice video.
Thanks for video! Really helpful!
Thank you for this video :-)
7:20 I dont think its ''spitting out tao''. If we're talking about the capacitiveSensor library i think it spits out an arbitrary number that's just been incrementing in the while loop while the recieve pin waits to be high again. Great vid.
I'm not very fluent in C++, where did you find this? I guess it's incrementing by 1 every cycle? cheers!
@@33Initiative Hi there. I was referring to the How it works section on this document. playground.arduino.cc/Main/CapacitiveSensor/
Thanks
great explanation thank u
does anyone know approximately the freq of the send signal?
VERY VERY NICE
So, did the ink work?
Thanks for the video :D
Like y Suscribed 🙏
That's a good idea. I might have to start collecting parts!
Maybe I could use a picture/picture frame,and make it look like it belongs on the wall.
I'm not concerned with the various RF signals,This place has metal siding,and is fairly Faraday-cage-like already. Despite that,the Wifi,cellphones,etc. all work fine.
I'm wondering is it sensitive to how much pressure i commit?
Yes it would be sensitive to how much pressure you apply to the contact plate. The reason, however, reveals two inaccuracies in the description, which are worth discussing. The first inaccuracy is the claim that the change in time is all about changing capacitance. In reality, the connection with the body when you're touching the plate adds a complex circuit consisting primarily of a variable resistance in series with a capacitance. When you touch the contact plate lightly, you connect the capacitance of the body through a very high resistance. As you apply more pressure, you reduce the contact resistance between the contact plate and your body. The lower the resistance, the higher the charging current drawn by the capacitor. Now you would think that the higher total resistance would increase the time constant and therefore increase the time for the input pin to rise to the voltage of the output pin, but that's not what happens, which is the second inaccuracy. While the total time constant does actually increase with higher contact resistance, that is not what is important in this case. Remember that we have the fixed resistance in the circuit AND the variable resistance of the contact of the body to the plate. The input pin is connected to the junction of these two resistances. When the contact resistance is high - with a light touch - the maximum possible charging current into the capacitance is reduced. This means that the voltage drop across the fixed resistance caused by the lower charging current is lower, so the input pin rises to match the voltage at the output pin much faster than with a lower contact resistance.
It turns out - and I suppose this is technically a third inaccuracy, if only by implication rather than by direct statement - that the capacitive touch effect is more about changing resistance than changing capacitance when you're actually touching the plate. As you approach the plate - before you touch it - you add another small but variable capacitance in series with an extremely high contact resistance, complicating the circuit still further, and and resulting in two different modes of operation, but that's another story!
I like this idea. The landlord is gonna shitbrix if I cover the walls in conductive paint though. Hmm. Will regular latex paint stick to the conductive paint layer? I could cover the conductive paint with regular paint,and hope nobody notices. :)
A 10x10 grid of "buttons" on the wall would be super handy!
"I got 99 problems.. but a switch ain't one" below the scope me thinks
what a great vedio
Why do you delay the time?
I mean the resistor + Capacitor why do I need to delay the time?
@@TheRno0o The delay is a way of us detecting how much capacitance there is. If there is higher capacitance, there will be a longer delay. Because the capacitor is always the same, it will be the same each time. When your finger comes close, it starts to act as a capacitor. Because there is more capacitance, it makes the delay longer. So now if we switch the wire from low to high, or high to low, it will take longer than normal for the pin to go whatever the other pin went. This little delay is taken advantage of, and for you to understand this you kind of need to understand how a microchip works. Basically it will send the pin high, and it will detect the delay. When you put your finger on the capacitor, and you switch the pin to High, it will take longer for the other pin to go high, because there is more capacitance, because your finger has capacitance. So when you move your finger up, there is more capacitance, and it takes longer, and this extra delay is detected by the microchip, and it assumes that the extra delay is the fact that we touched it. Hopefully that makes sense
Cool!
TQ very much for ur great explanation I appreciate it:)
The input needs a register, or Arduino destroyed by static.
In your country no static ?!
That works a lot like paddle inputs on the Atari 2600.
He says the voltage may be at 2.5v and it may be a 0 or 1 in the arduino sensing pin, but the hard found out truth is that Arduino goes to a 1 at just 0.6v, not 2.5 volts. I found this out the hard way. I could not believe a .6v was tripping the circuit. But it was. Even .5v I could get it to trip. Be aware of that, because if you are not, it is the last place you would look. Everyone says between 2 and 3 volts is the 0 or 1 threshold switch area and that is just not true.
i can do this with valve
👐😚😚 bester Mann!
1-e, not just e
One mistake though. The "capacitor" is your body, not the little bit of material you're touching.
The body itself is not a capacitor. A capacitor has 2 plates or 2 bodies with a diaelectric between them.
The material itself acts as a capacitor, and your body ALSO acts as a capacitor, connected in parallel, both capacitances would sum up to a greater total capacitance, as explained in the video
Yes, I think Luciano has it right. @@lucianosaldivia5917
I have an incredible idea!!! Your friend could simply go buy a light switch for less than $1 probably. Done. Simple. Genius.
fantastic explanation!