Using Reed magnetic switch with Arduino and Relay

  Рет қаралды 43,400

Robojax

Robojax

Күн бұрын

this video shows you how to use reed switch with relay to detect door or window opening to turn on ligh or Alarm using a relay.
You will learn how to use it without Arduino and with Arduino.
Get early access to my videos via Patreon and have your name mentioned at end of very videos I publish on KZbin : robojax.com/L/?...
download code from :
roboJax.com/lea...

Пікірлер: 59
@danceindia
@danceindia 4 жыл бұрын
Hey Great Video, I wonder if you have any tutorial for adding SMS on this action with GPS location? Thanks
@robojax
@robojax 4 жыл бұрын
Thank you. I have got the module with but never got a chance to make video. If I get time, I will try to make video on that.
@geeuk
@geeuk 2 жыл бұрын
Thank you brother. Your video helped me.
@robojax
@robojax 2 жыл бұрын
You are welcome. The best thank you for me is to subscribe to my channel. Thank you.
@rudyvlog2897
@rudyvlog2897 2 жыл бұрын
You still change the relay set-up from nc to no sir Youve said earlier that without changing relay set- up you will be able to turn on the light when reed switch being triggered by magnet? I think it is not possible, relay no/nc set-up still need to be changed.
@jeffersonjeff1994
@jeffersonjeff1994 4 жыл бұрын
You explain really well🙂
@robojax
@robojax 4 жыл бұрын
I am glad you found it useful. I've got over 400 videos, check them out kzbin.infovideos
@hendriokysafata2779
@hendriokysafata2779 2 жыл бұрын
permission to ask sir, if we want to make an object fall timer using a magnetic sensor, what is the program code like?
@PanayiotisMavrokefalos
@PanayiotisMavrokefalos 4 жыл бұрын
Great tutorial!!! Am trying to add another reed switch in the loop but am not sure how the code has to be changed so when both reed switches have a magnet it would turn on the light.
@robojax
@robojax 4 жыл бұрын
I have defined pins for the reed switch and pin for output (relay) and explained in code. Just define another pin for 2nd reed switch and another for the output. Watch the video 2 or 3 times I have not left anything unclear. You should be able to do it.
@PanayiotisMavrokefalos
@PanayiotisMavrokefalos 4 жыл бұрын
@@robojax I got it i had to use the || expression to tell the code that when both of these are active then activate the lamp thank you.
@rolandopanganiban333
@rolandopanganiban333 2 жыл бұрын
Nice👍,... Sir what if. I have one reed switch to determine that the servo motor is already at the position of 90° and then it will go back to 0° posistion automatically in the time i wanted?. What codes i use? I already make the code to to arduino to control it by the IR remote to rotate to 90°... and now sir,. I want the servo automatic to go back to zero...i need your help Sir
@robojax
@robojax 2 жыл бұрын
hello, I have I tones of videos on servo. Search for servo on my channel. Here is how to find Specific KZbin Video in a channel bit.ly/findKZbinVideo
@adamelkoumy5141
@adamelkoumy5141 6 жыл бұрын
Shokran . Thank you for the video :)
@robojax
@robojax 6 жыл бұрын
You are welcome.
@johnnybuoy9551
@johnnybuoy9551 3 жыл бұрын
what's the Current rating of these common Reed Switches? Can I use them directly between power source and light bulb without any Relay? In short how much Current can they bear?
@robojax
@robojax 3 жыл бұрын
they use different types of reed switches. but it is at the level of 1-10mA and even won't turn ON and LED.
@amirmosharaf3382
@amirmosharaf3382 5 жыл бұрын
nice , thank you . Did you put the relay in the null path ?
@robojax
@robojax 5 жыл бұрын
what is is UNLL path?
@pawelhalarczyk6975
@pawelhalarczyk6975 4 жыл бұрын
been on your website the adds on top of the screen stops you from reading or looking for anything really annoying hence I left, very interesting clip do cheers
@robojax
@robojax 4 жыл бұрын
can you take the screen shot and share it it? When visiting the page, just press "Print Screen" on your keyboard, then visit this website snipboard.io/ and press paste it (Ctrl+V) and this website will make a page for it automatically. Then share the link back so I look at it. I am sorry for that.
@adamelkoumy5141
@adamelkoumy5141 4 жыл бұрын
The code is located in lesson # 18.
@robojax
@robojax 4 жыл бұрын
where?
@rinku2004ful
@rinku2004ful 6 жыл бұрын
Nice help sir. Sir i m facing a prob related with arduino uno, actually i want to connect arduino with l298n motor controller, 2 reed switch and a ldr sensor. But i m unable to connect with arduino. Plz help me.
@robojax
@robojax 6 жыл бұрын
You have to make your project work with the L298N motor controller first. Once it works and you were able to control the motor. Then make another project with reed switch. and make sure it works. then combine both. Share you code in this page codeshare.io/ and once you posted the code, we I can make comment or edit it for you to make it work.
@robojax
@robojax 6 жыл бұрын
Please reply here. I understand you want to do the following: working with two reed switches n a motor controller. My project is based on:------ ======================= If reed switch1 is true If reed switch 2 is false Then Motor will round clockwise Else Motor will round counter clockwise. ========================= So have do you have code for the motor controller? Please post your the code for your motor codeshare.io/ and then once you post it, that website will have a URL (website address) and post it here. Please use reply under this comment (please do not post new comment under the video) so your all your comments are together and easy to follow. Once you posted your code, I will fix it so it can work with the reed switch.
@rinku2004ful
@rinku2004ful 6 жыл бұрын
Robojax -. Ok sir
@robojax
@robojax 6 жыл бұрын
Post code for motor control and I will help you.
@rinku2004ful
@rinku2004ful 6 жыл бұрын
Robojax :- sir i m trying to write code but stuck on nested if statement. Acctually i want to check light sensitivity by ldr n if ldr returns 1 then check another condition which is if (reed1=1 && reed2=0) then motor controller plays a roll to move dc motor clockwise n if if (reed1=0 && reed2=1)then motor controller plays a roll to move dc motor counter clockwise . But i wrote a code using nested if statement but isnt working.
@CengizGoren
@CengizGoren 4 жыл бұрын
Very good thank you
@robojax
@robojax 4 жыл бұрын
You are welcome.
@PBanduni
@PBanduni 2 жыл бұрын
Sorry sir but NC stand for *normally close* not a normally connected. And NO normally open it is currect.
@robojax
@robojax 2 жыл бұрын
Thank you
@PBanduni
@PBanduni 2 жыл бұрын
@@robojax don't mind sir
@Mykhyn777
@Mykhyn777 5 жыл бұрын
Can a very small magnet make the switch work?
@robojax
@robojax 5 жыл бұрын
small or large doesn't matter. Strength of magnet is important. You would have to try specific magnet.
@dilshankasthuriarachchi4737
@dilshankasthuriarachchi4737 2 жыл бұрын
Hi sir could you please tell me how to make reed switch control car?
@robojax
@robojax 2 жыл бұрын
Hello, you should have a car ready to work. then use the battery power of the car go throw the relay. in this video I've shown a bulb, you replace the bulb with your car and instead of connecting to AC connect it to the car battery. very simple.
@dilshankasthuriarachchi4737
@dilshankasthuriarachchi4737 2 жыл бұрын
@@robojax NO sir i want you to knoe how to make a arduino based 4wd car using magnetic reed switch? so what would i need to make this project?
@sbarifvlogs335
@sbarifvlogs335 3 жыл бұрын
how can i use 4 reed switch with one arduino for for doors?
@robojax
@robojax 3 жыл бұрын
just replicate and define 4 pins for input, 4 pins for output and 4 relays. on the same code. watch it more than one time so you learn.
@idea-fateh1979
@idea-fateh1979 5 жыл бұрын
goooooooooood job
@robojax
@robojax 5 жыл бұрын
Thank you.
@alikasim290
@alikasim290 6 жыл бұрын
i used the module relay with arduino and lcd 2*16 when the load connected to relay the lcd display strange symbols without load every thing well
@robojax
@robojax 6 жыл бұрын
Relay has nothing to do with the LCE1602. The error is somewhere else.
@azlinda0719
@azlinda0719 3 жыл бұрын
Hi can this be connected to UV-C light bulb? around 16W
@robojax
@robojax 3 жыл бұрын
it just turns ON and OFF a load. so load can be anything.
@azlinda0719
@azlinda0719 3 жыл бұрын
@@robojax I see, do you have a clear circuit diagram anywhere?
@robojax
@robojax 3 жыл бұрын
yes when you purchase my Arduino course from Udemy, all videos have circuit diagram bit.ly/rj-udemy
@azlinda0719
@azlinda0719 3 жыл бұрын
@@robojax instead of using the magnetic reed switch that you used, can i use the magnetic door sensor?
@muhammadzar3002
@muhammadzar3002 5 жыл бұрын
do anyone know how to put this on water meter?
@robojax
@robojax 4 жыл бұрын
I don't think so.
@manasimakote42
@manasimakote42 6 жыл бұрын
can u provide circuit diagram of all this
@robojax
@robojax 6 жыл бұрын
Sorry when I prepared the material for this video, I did not draw it because many components have not symbol in the drawing program. I will see if I can draw it. I will inform you once I did.
@manasimakote42
@manasimakote42 6 жыл бұрын
what if I want to use Reed sw as ip to PLC and at o/p i need to turn on bulb , as PLC operate on 24 v
@novin8280
@novin8280 5 жыл бұрын
Message:Hi friend, can U help to me about reedswitch for Arduino. I whant to build wind anemometer. I have arduino nano, reedswitch yust like on this video . I tipe code for anemometer, but something is wrong, arduino cant red info from reedswitch. My code: #include #include LiquidCrystal_I2C lcd(0x27, 16, 2); extern volatile unsigned long timer0_millis; unsigned long new_value = 0; float RoundsSum=0; float PreviousReading=0; float CurrentReading; float RPM=0; float AirFlow=0; int MeasureTime=6000; void setup() { Wire.begin(); lcd.begin(16,2); lcd.backlight(); Serial.begin(9600); } void loop() { for (int i=0; millis()
@robojax
@robojax 5 жыл бұрын
You have to test your code without LCD and just display the information on Serial Monitor. Then use LCD. This way you have smaller code to find . I can't figure this out as this was the first time I heard the word "anemometer" and I have no access to the device.
Hall Sensor Switch Demo and Code for Arduino
8:36
Robojax
Рет қаралды 31 М.
#18 Add a Relay Module to your Arduino project - Hints, Tips & Traps
16:52
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 969 М.
Violet Beauregarde Doll🫐
00:58
PIRANKA
Рет қаралды 53 МЛН
У ГОРДЕЯ ПОЖАР в ОФИСЕ!
01:01
Дима Гордей
Рет қаралды 7 МЛН
Throwing Swords From My Blue Cybertruck
00:32
Mini Katana
Рет қаралды 11 МЛН
The Very mojor Repairing Of Broken Differential Gear Ring By Very Brilliant Mechanic…
34:47
How does a reed switch work?
3:19
Innovative Components
Рет қаралды 113 М.
How to use 4 channel Arduino Relay Shield (with code)
11:00
Arduino Reed Switch (magnet sensor) with LED
2:39
Robotic Nation
Рет қаралды 14 М.
SparkFun Arduino Comparison Guide
8:31
SparkFun Electronics
Рет қаралды 1,1 МЛН
Using Sensors with 5V Relays on the Arduino
5:04
Circuit Basics
Рет қаралды 204 М.
How to  use HC-SR501 Motion sensor for Arduino with code
8:46
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 969 М.