2:47 AM
1 hour later…
4:03 AM
1 hour later…
5:13 AM
6:13 AM
@AhtishamAshraf Ha, firstly one important thing to confirm. When you said: "I have tested the relay with the light bulb powering with 3.3 V...", did you mean that (1) You did test the relay with a 3.3V power light bulb (***Question:***Is this "light bulb" just an ordinary LED?). Did you test the light bulb as a fake electromagnetic lock?
I mean, before you tested the real electromagnetic lock, you tested the waters by first testing a light bulb. Actually this is almost the same thing I suggested earlier: (1) Put aside the lock, (2) Instead of the real lock, use a 12V powered LED with a 1kΩ as a "fake lock", and see if the RFID card can operate on this fake lock smoothly, many many times as you like, not just "You can only live once"?
3 hours later…
8:58 AM
I tested with the ordinary LED using the raspberry 3.3 V Power and the RFID and about the Second one i am implementing the (b) unlocking the door, the Power cable is connected to the Closed Relay and it is passing the current constantly and as soon as i scan the RFID it opens the Circuit and the Current Stops and the Door Opens. I have tried either Ways using NO and NC but still the same. @tlfong01
9:18 AM
@AhtishamAshraf Ha, so you seem to have explored almost all the possibilities. So let me confirm: (1) You used the fake door lock (ordinary status/indicator/hobbyist LED, in series with current limiting resistor (perhaps 470Ω, but not important/relevant). powered by Rpi's 3V3 rail.
(2) And you confirmed the following: "... the Power cable is connected to the Closed Relay and it is passing the current constantly and as soon as i scan the RFID it opens the Circuit and the Current Stops and the Door Opens...."
I think I understand 90% of what you say in (1) and (2) above. Now I think there are at least two possibilities: (1) 12V powered door lock in "door closed" state, current passing from 12V+ through relay's COM and NC to door lock, ... , then when RFID reader caused Rpi to switch off relay and lock, creates Back EMF which corrupts Rpi's software, therefore need to reset to restart program.
I am thinking aloud, so not that organized, and I am slow in writing and thinking, so any casual errors and typos could not meet this chatroom's no more editing after 3/5 minutes limit. In other words, many of my errors stay permanent, ... :(
PS - I know very little about the door lock you are using. My experience is only with plain, bare bone solenoid type lock. So I might miss something important. You might like to skim my new references on locks and let me know if your lock looks like any of them. No hurry though. Ah, locking down jogging/supper time. I need to go. See you later. Cheers. PS - You might like to skim my other answer on Back EMF to get a rough idea of what might be going on inside your lock.
2 hours later…
11:37 AM
1 hour later…
1:02 PM
@AhtishamAshraf (1) For Back EMF, as I suggested in the very beginning, use total optical isolation wiring, as described in my answer in "How to use JD-Vcc jumpered relays""". (2) A related trouble maker is EMI, and you might like to try the four methods described in Appendix C of my answer to "What is Back EMF?".
Ref 15 suggests how to reduce noise (Back EMF and EMI) has more references, especially Ref 8, 9 in grounding using decoupling capacitors.
I have more troubleshooting suggestions: (1) (a) Instead of the RFID Lock program, write a small python program to test if disconnecting 12V lock power can disturb python program, (1) the small test program does the following: loop indefinitely, every 0.5 sec, print time at Thonny output shell.
1 hour later…
2:39 PM
@AhtishamAshraf I read the spec of the lock I referenced and found something that I didn't know that I didn't know. As I said earlier, I only knew about simple, plain, bare bone, solenoid that door lock, and the moving part, a stick like thing is not powerful at all, and I can use a finger to stop the movement. But for the lock, There is no moving part at all, all magnetic, and the lock force is 1,200 lbs!
So my wild guess is that only 12V, 250mA might have built a very strong magnetic field. And when Rpi and RFID reader read the RFID card, they switch off the lock current, and so the big magnetic collapsed suddenly, cause big Back EMF and EMI, therefore disturbed. One more suggestion is this: move the lock 10 ft from Rpi and see if there is any improvement, or problem disappeared..
« first day (2 days earlier) ← previous day next day → last day (28 days later) »
Transcript for
Apr27
Apr '2128
Apr29
Discussion between tlfong01 and Ahtis…
Imported from a comment discussion on raspberrypi.stackexchang...