No video

Testing a capacitive proximity sensor

  Рет қаралды 25,312

Curious Scientist

Curious Scientist

Күн бұрын

In this video I am testing a capacitive proximity sensor. I show you how to wire it up with a microcontroller and how to control a stepper motor with it. At the end of the day, it is just a switch, so the coding part does not differ in this sense (you have to poll the pin or use interrupts). Only the wiring needs a bit attention due to the higher voltages.
Schematics and source code: curiousscienti...
Please don't forget to subscribe!
If you want to support my work, please consider buying the parts using my affiliate links:
curiousscienti...

Пікірлер: 54
@isidoromaich7226
@isidoromaich7226 3 жыл бұрын
It was very clear explanation. This devices are used everywhere from garage doors to production lines at factories.
@CuriousScientist
@CuriousScientist 3 жыл бұрын
Thank you! Yes, they are extremely widespread. I am also planning to use them in some future projects, but they are not that cheap and they are also a bit bulky. Sometimes a tiny limit switch does a "better" job due to its size.
@7alfatech860
@7alfatech860 3 жыл бұрын
Thanks for the video. I just decided to pick one up from your link and will give it a try on my milling machine.
@CuriousScientist
@CuriousScientist 3 жыл бұрын
Thanks! I hope you'll have fun with it! I will publish a few more videos using this thing, I just need to get some more free time to be able to work on it.
@jacksmith-se8lo
@jacksmith-se8lo 3 ай бұрын
Hi can you tell me what is the reference of the sensor and is there an eddy current sensor with similar properties?
@CuriousScientist
@CuriousScientist 3 ай бұрын
Hi! You can find the product on my website under the Parts & Tools section, in the Motors and related circuits subsection! I also shared an inductive sensor on the exact same page. Cheers!
@danezu791
@danezu791 4 ай бұрын
so what is the accuracy of capacity sensors? If I want to measure a variation of distance 0.5mm would it work or an inductive would be more accurate?
@CuriousScientist
@CuriousScientist 4 ай бұрын
This is not a distance sensor but a proximity sensor. I guess their accuracy depends on the model, so I would suggest you check the datasheet of the product before buying it.
@danezu791
@danezu791 4 ай бұрын
did not expect you would be answering so promptly, my respect for your communication with the followers. I do not want to measure the distance but to detect proximity whithin a certain distance which in sense is a kind of distance measurement but indirectly. So if I intentionally calibrate the sensor to detect the obect at 3 cm, what is the minimum distance the sensor will not detect the object? Will I still detect it at 3.5 cm? Thank you!
@CuriousScientist
@CuriousScientist 4 ай бұрын
One of my principles is to try to communicate with my viewers as well as possible. So yeah, I am trying. The sensitivity of these sensors is quite good, and typically, you can adjust it with a potentiometer with a high accuracy. Unfortunately, I don't have the exact numbers, but if you can wait a day or two, I can measure it for this specific sensor. Otherwise, I still recommend referring to the datasheet.
@danezu791
@danezu791 4 ай бұрын
@@CuriousScientist I appreciate that, don't worry, I looked up online for acurracy of 0.1mm sensors but I think it is not called like this. It is either resolution or something else. Data sheets would provide the range of detection but that is something different.
@popapoco
@popapoco 3 жыл бұрын
Hello great video , just wondering if this proximity sensor can be triggered by magnetism thank you
@CuriousScientist
@CuriousScientist 3 жыл бұрын
Hi and thank you! Not _this_ exact one, because this is a capacitive one. But there are similar, inductive proximity sensors. Same housing, same switching principles, but the sensing is done on inductive/magnetic basis. But if you want to sense something magnetic, or based on magnetism, I also suggest you to look at Hall-sensors. They are very cheap and they also detect magnetism, so the presence of a magnetic field can trigger them.
@inovante
@inovante 2 жыл бұрын
How do you think , how to count a non-slitted object ? for example clay bricks which hasn't space between themselves , just a small deepening.
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Probably you would need something mechanical that is in contact with the bricks and can detect the small gaps.
@ismetbuyukunal
@ismetbuyukunal 5 ай бұрын
your project looks great. i have a question. can i use this for my laser machine to keep the distance constant in the z axis? if so, what changes should i make in the arduino code. thank you in advance for the information.
@CuriousScientist
@CuriousScientist 5 ай бұрын
Thanks! Sure you can. I have no idea how your code looks like, so I cannot really advise anything.
@arisnoorsetyo6270
@arisnoorsetyo6270 2 ай бұрын
the object in the non-metal sensor is there or not...example wood, plastics, and object non metal etc
@CuriousScientist
@CuriousScientist 2 ай бұрын
I have no idea what you are trying to say, sorry.
@arisnoorsetyo6270
@arisnoorsetyo6270 2 ай бұрын
@@CuriousScientist Can the sensor be used to sensor wood or plastic?
@CuriousScientist
@CuriousScientist 2 ай бұрын
Yes. Capacitive sensors work with all non-metallic materials.
@arisnoorsetyo6270
@arisnoorsetyo6270 2 ай бұрын
@@CuriousScientist thank very much Mr @CuriousScientist
@Orsini27
@Orsini27 2 жыл бұрын
Great video. Does the proximity sensor work underwater? I'm developing an underwater gripper and would like to add a proximity sensor to it.
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Thanks! I believe that capacitive sensors would not work, but I can be wrong. You might want to try magnetic proximity sensors, they should work under water. However, they would require magnetic material for detection.
@Orsini27
@Orsini27 2 жыл бұрын
@@CuriousScientist I've been trying to deal with this. Firstly i thought sonars would do but I found out there aren't any sonars that could be fitting in my gripper and also could work underwater. Gave up on sonars and went to proximity sensors and i'm trying to find an inductive or capacitive sensor that could work underwater but getting a bit hard. Maybe i'll only detect magnetical material, let's see. Thanks for the help!
@jahanfrench2166
@jahanfrench2166 3 жыл бұрын
Know anything about how how using a capacitive sensor and instrumentation amplifier can be used together?
@CuriousScientist
@CuriousScientist 3 жыл бұрын
I think you don't need any additional circuit for this device as it has everything built in.
@jahanfrench2166
@jahanfrench2166 3 жыл бұрын
@@CuriousScientist what about software for data or a computer? Is that needed?
@CuriousScientist
@CuriousScientist 3 жыл бұрын
What exactly do you mean? This runs without any additional things. No software is needed for a proximity sensor.
@daniellehenderson5272
@daniellehenderson5272 Жыл бұрын
Hey I am trying to build a circuit with a hall sensor, arduino uno, a motor and a push button switch. When the button is pushed, the motor should turn on and then when the hall sensor detects the magnet, the motor should turn off. Another press of the button should the reverse the direction that the motor spins. If I want the motor to turn off when the sensor detects a magnet do I need to use a PNP sensor?
@CuriousScientist
@CuriousScientist Жыл бұрын
Hi! You have to program the logic anyway, so it doesn't matter if you have a PNP or NPN switch. You'll determine the behavior in the code.
@daniellehenderson5272
@daniellehenderson5272 Жыл бұрын
@@CuriousScientist thanks so much for your reply. If I use a NPN sensor, does this mean that when the magnet is brought close, the signal will be LOW?
@daniellehenderson5272
@daniellehenderson5272 Жыл бұрын
and do I need to configure the hall sensor as an INPUT_PULLUP?
@CuriousScientist
@CuriousScientist Жыл бұрын
@@daniellehenderson5272 Hi. If I am not wrong, the NPN proximity sensors go LOW when you detect something with them. You do not need to fiddle with the INPUT_PULLUP option. Also, you might need an additional circuit for your sensor if the operating voltage is more than 5 V. You cannot directly connect a 12 V or 24 V proximity sensor's output to your Arduino's GPIO pin...
@daniellehenderson5272
@daniellehenderson5272 Жыл бұрын
@@CuriousScientist thank you that is very helpful!
@petersobotta3601
@petersobotta3601 2 жыл бұрын
Hi, I would love to know how to do this with acceleration and deceleration. runSpeed() does not seem to allow this function which is crazy for an Acceleration library. Is it possible to have a gradual start and stop speed initiated by a sensor input where you can't use runToPosition()? You code explanations are brilliant BTW! Thanks
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Hi! You should read the very well written documentation of the library. RunSpeed() intentionally doesn't have acceleration. You should use run() if you want acceleration. Also, check my more recent videos where I have better code written using this library.
@petersobotta3601
@petersobotta3601 2 жыл бұрын
@@CuriousScientistThanks for the reply. I tried a straight swap, run() for runSpeed() but and it didn't make any difference. I have read the documentation but it's not easy to follow without example code for a newbie. I intend to watch all you videos, Any help is much appreciated. Thanks
@CuriousScientist
@CuriousScientist 2 жыл бұрын
What exactly is not working? Maybe I can help easily.
@petersobotta3601
@petersobotta3601 2 жыл бұрын
@@CuriousScientist That's awesome of you! Thanks. I basically just need to run my motor in either direction depending on a sensor input, exactly like you are doing with the prox sensor but I need acceleration to keep the transitions smooth. Swapping runSpeed() for run() didn't seem to change anything.. should it work that easy or do I need to change something else too? I'm using your code, the same as in this video.
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Acceleration also needs target position instead of speed. So you will need to use the move() or moveTo() functions to determine a target position. You should give some larger number as a target than the number of steps required to reach the end stop switch. Then, when the switch is reached, you stop using the stop() function which will decelerate to zero, then give the same (slightly larger) target with an opposite sign and let the motor run in the opposite direction. Obviously, you should have another limit switch on the other side. Actually, the code I used in this video should help you: kzfaq.info/get/bejne/lcuei9uUp7qzlIE.html You just need to modify a few conditions and it is done.
@joshfromtexas
@joshfromtexas 2 жыл бұрын
Can you do a 5 minute version of this video?
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Yes, and no. I could, but I don't have the time and resources to fulfill requests for free. Also, my philosophy is to explain everything as carefully as possible. If you can't cope with my lengthy videos, speed them up, or skip parts of it.
@kaakos9273
@kaakos9273 3 жыл бұрын
you have misspelled the link to your website (t>h) nice videos dude keep on :)
@CuriousScientist
@CuriousScientist 3 жыл бұрын
Hey, thank you very much! I fixed it now, it should work.
@_Osman_Dag_
@_Osman_Dag_ 2 жыл бұрын
schneider-electric-capacitive-proximity-switch-xt230a1fal2 , Have any of you examined the electronic circuit of this product ?
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Hi! I checked the datasheet and it looks like a normal switch. It is an industrial equipment and it works at higher voltages.
@_Osman_Dag_
@_Osman_Dag_ 2 жыл бұрын
@@CuriousScientist I had read the datasheet. I know . I had questions about the electronic board inside the Plastic Round tube. I meant this.
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Oh, I see! Unfortunately, I cannot help with that, I never encountered that piece of hardware.
@blitz4974
@blitz4974 Жыл бұрын
that is a inductive sensor I bought the wrong sensor coz I thought this was the capacitive one
@CuriousScientist
@CuriousScientist Жыл бұрын
Nope, the LJC18A3-H-Z/BX is a capacitive one.
Useful gadgets for stepper motor projects
33:03
Curious Scientist
Рет қаралды 8 М.
The Inductive and Capacitive Sensor | Different types and applications
9:12
Mechatronic Neheyler in English
Рет қаралды 140 М.
小蚂蚁被感动了!火影忍者 #佐助 #家庭
00:54
火影忍者一家
Рет қаралды 53 МЛН
哈莉奎因以为小丑不爱她了#joker #cosplay #Harriet Quinn
00:22
佐助与鸣人
Рет қаралды 10 МЛН
Kids' Guide to Fire Safety: Essential Lessons #shorts
00:34
Fabiosa Animated
Рет қаралды 11 МЛН
The Most Important Circuit for our Electrical Future?! (PFC) EB#55
11:26
Sinking and Sourcing PLC Inputs with PNP NPN Sensors
17:31
Tim Wilborne
Рет қаралды 157 М.
Capacitive proximity sensor with Arduino Uno R3
12:07
Passion Tech KLM
Рет қаралды 939
How to Use the Inductive Proximity Sensor
7:06
Ludic Science
Рет қаралды 76 М.
SparkFun Engineering Roundtable 9-24-12: Capacitive Sensing with Chris Taylor
9:42
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3 МЛН
Using NJK-5002C Hall Proximity Sensor with Arduino code
14:14