No video

How to use a 12 Volt Proximity Sensor with an Arduino

  Рет қаралды 44,117

DuctTape Mechanic

DuctTape Mechanic

Күн бұрын

Пікірлер: 50
@kwacz
@kwacz 2 жыл бұрын
instead of the relay you can just use a voltage divider as a level shifter to get the voltage down to the proper voltage for the arduino digital input pin 5 or 3.3 volt depending in which arduino you use.
@DuctTapeMechanic
@DuctTapeMechanic 2 жыл бұрын
A optocoupler would also work
@meloconza7718
@meloconza7718 3 жыл бұрын
this input_pullup function was new to me, verry usefull , thanks a lot
@DuctTapeMechanic
@DuctTapeMechanic 3 жыл бұрын
Yes its a great function. Before I knew about it, I used to use actual pullup resistors to achieve this. Thanks for watching!
@AlexPrivett
@AlexPrivett 3 жыл бұрын
I am designing and building a laser cutter, this was exactly what I was looking for, thanks for uploading.
@DuctTapeMechanic
@DuctTapeMechanic 3 жыл бұрын
Thanks for watching!
@etiennedejager5821
@etiennedejager5821 2 жыл бұрын
Very well explained. Thanks. I just bought an arduino uno and a proximity sensor. I would like the buzzer however to only go off when something passed by the sensor every say third time. Basically have the arduino count the amount of times the sensor is triggered and buzz when it reaches the set amount like with every third item. Is that possible and how would you do that? Would you do a video on that for us?
@alo1236546
@alo1236546 2 жыл бұрын
Npn sensor will pull ground when activate. Direct connet pull up input arduino.
@markmeme28
@markmeme28 Жыл бұрын
thank you I have a small question what should i do to make a counter to count the number of metals ?
@DuctTapeMechanic
@DuctTapeMechanic Жыл бұрын
Check out my video "Speed bag punch counter" in which I use this same sensor in a counting application
@markmeme28
@markmeme28 Жыл бұрын
@@DuctTapeMechanic thank you 🙏🏻
@jawadmazher5621
@jawadmazher5621 4 жыл бұрын
That's really cool! What do we do if we want the sensor to beep before the object gets too close, do we just get a stronger sensor or can this be controlled with Arduino code?
@DuctTapeMechanic
@DuctTapeMechanic 4 жыл бұрын
Thanks. This sensor has a screw on the top which allows for some variation of the sensitivity but a better sensor would be the way to go.
@scottbechdolt6586
@scottbechdolt6586 9 ай бұрын
Hi, I don't understand what you meant by connecting to the anode if you want the relay to do the opposite. Anode of what? . Does a coil have an anode?
@DevilFreakShow
@DevilFreakShow Жыл бұрын
If i want to take count of pulses of a rotating shaft of motor and show or store it on my server what can i do should i use something else ?
@JimBeshears
@JimBeshears Жыл бұрын
Be careful with cheap sensors unless the application isn't critical. They usually have EMC and temperature drift problems.
@DuctTapeMechanic
@DuctTapeMechanic Жыл бұрын
Thanks for the heads up. I mostly use them for non vital "fun" projects
@JimBeshears
@JimBeshears Жыл бұрын
@@DuctTapeMechanic nice job on the video also!
@justlutfi2890
@justlutfi2890 3 жыл бұрын
you can simplify using BC547
@DuctTapeMechanic
@DuctTapeMechanic 3 жыл бұрын
Yes that will probably work. I recommend us pc817 for an alternative way to do this
@qqmayakashi
@qqmayakashi Жыл бұрын
Is there a way to control the sensitivity of the proximity sensor using arduino code? if not what should i find to be able to do it?
@DuctTapeMechanic
@DuctTapeMechanic Жыл бұрын
You can adjust the sensitivity on the sensor itself using the set screw
@sye7969
@sye7969 2 жыл бұрын
have you also connected the arduino board to laptop/pc along with the battery ? does it cause any harm ?
@BigBang11n70
@BigBang11n70 Жыл бұрын
Hi Man, nice video! Does it work the same way for a 24v light barrier sensor if you get a 24V relais? Cheers
@thomas3236
@thomas3236 3 жыл бұрын
Thanks, that was really helpful.
@fadelcmd9969
@fadelcmd9969 3 жыл бұрын
Hi, can you tell me what kind of part that you use or maybe you can send me the link to buy that part. Cause I need that so much, I need to connect my capacitive sensor to the arduino. Btw thank you for making the videos, it helps me a lot.
@DuctTapeMechanic
@DuctTapeMechanic 3 жыл бұрын
Its called a 12v dpdt relay. Thank you for watching. www.amazon.com/Electromagnetic-Socket-Mechanical-Indicator-LY2N-J/dp/B07SYYP41M/ref=mp_s_a_1_7?dchild=1&keywords=DPDT%2BRelay&qid=1604236771&sr=8-7&th=1&psc=1
@toddmaggio2032
@toddmaggio2032 2 жыл бұрын
Thank you for sharing your knowledge. My question is whether it is possible for a sensor to reverse the current in a circuit any time it detects a target. And if so how can it be done?
@DuctTapeMechanic
@DuctTapeMechanic 2 жыл бұрын
Just hook up the dpdt relay with a cross pattern this will reverse polarity when something is detected. You don't even need an Arduino. Just go from sensor to dpdt relay to dc motor (I presume)
@farahnasir5023
@farahnasir5023 4 жыл бұрын
😎 cool
@kevinpiot7317
@kevinpiot7317 Жыл бұрын
What is the relay for?
@DuctTapeMechanic
@DuctTapeMechanic Жыл бұрын
Just a rudimentary way to interface the 12 volt sensor with the arduino a PC817 optocoupler would be a more elegant choice
@mftest100
@mftest100 2 жыл бұрын
Hey, great video - I've missed this, (I am a total beginner) what is the purpose of building in the relay ? Hope you can enlighten me :-)
@DuctTapeMechanic
@DuctTapeMechanic 2 жыл бұрын
Good question. The relay acts as a switch. Basically when the sensor is triggered (something is detected) it "turns on" the relay which in turn grounds out the arduino pin. And the pin going to ground can be coded for (i.e. sensed by the arduino). The relay helps integrate the sensor with the arduino while keeping them electrically isolated, a more elegant (more proper) way to do this would be to use a PC817 optcoupler instead of a relay (but this does work). I was kind of working with what I had at the moment.
@mftest100
@mftest100 2 жыл бұрын
@@DuctTapeMechanic Tx very much - I had thought of the PC817, because I have seen that on other project - much obliged for your very relevant feedback - Michael
@iamax8307
@iamax8307 2 жыл бұрын
How can I use this to make the buzzer louder as object gets closer? Welp
@mohammedkhallaf6478
@mohammedkhallaf6478 4 жыл бұрын
What if I want to use an analog sensor?
@DuctTapeMechanic
@DuctTapeMechanic 4 жыл бұрын
Perhaps you could try using a optocoupler pc817
@DuctTapeMechanic
@DuctTapeMechanic 4 жыл бұрын
Dividing the voltage with resistors would work as well
@nizarfahimi
@nizarfahimi 7 ай бұрын
What is the function of the relay in this project?
@DuctTapeMechanic
@DuctTapeMechanic 7 ай бұрын
In a nutshell, it serves as a voltage isolation mechanism. There are probably a lot of better ways to do it. Just what I thought of at the time.
@nizarfahimi
@nizarfahimi 7 ай бұрын
​@@DuctTapeMechanicwhen connecting the output of the sensor does the voltage need to be stepped down?
@nizarfahimi
@nizarfahimi 7 ай бұрын
​@@DuctTapeMechanicwhat power source did you use in the video?
@jaredyuri3884
@jaredyuri3884 3 жыл бұрын
hi, I have a retroreflective NPN sensor and have the same diagram like yours proximity sensor , but after many attempts it doesn't work at all
@DuctTapeMechanic
@DuctTapeMechanic 3 жыл бұрын
If you get me the part number maybe I can look up the wiring schematic to get a better idea of your problem.
@jaredyuri3884
@jaredyuri3884 3 жыл бұрын
@@DuctTapeMechanic for first Thank you for your answer and the part number is : Omron e3jk-rn12
@rajarshigiri1664
@rajarshigiri1664 2 жыл бұрын
I am trying to build a proximity sensor project where if you are too far away from your ba while travellin it buzzes or sends a notification. will this be possible in audrino or I need rasberry and what kind of proximity sensor should i use for that?
@Erkontekservices
@Erkontekservices 3 жыл бұрын
great job can you send me a code sir
@DuctTapeMechanic
@DuctTapeMechanic 3 жыл бұрын
Code is in the video
The Inductive and Capacitive Sensor | Different types and applications
9:12
Mechatronic Neheyler in English
Рет қаралды 140 М.
PC817 Adapter Module Optocoupler  with Arduino - zonemaker.com
3:00
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 36 МЛН
Кадр сыртындағы қызықтар | Келінжан
00:16
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 42 МЛН
How To Use Inductive Proximity Sensors
9:43
GBWM
Рет қаралды 5 М.
How to Use an Oscilloscope
12:32
SparkFun Electronics
Рет қаралды 1,1 МЛН
Testing a capacitive proximity sensor
24:56
Curious Scientist
Рет қаралды 25 М.
Sensor Industrial de 24V 12V a Arduino
5:07
Delta Training
Рет қаралды 33 М.
Sensors - which one to use
17:06
Electronoobs
Рет қаралды 1,3 МЛН
How to Use the Inductive Proximity Sensor
7:06
Ludic Science
Рет қаралды 76 М.
Arduino Uno Tachometer RPM using 3144 Hall Effect Sensor
13:59
Clockatronic
Рет қаралды 104 М.
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 36 МЛН