Connecting raspberry pi to 12v electric lock
Ask QuestionAsked todayActive todayViewed 13 times1
I am trying to connect a 12V AC/DC lock to my Raspberry PI 3B+ so I can control it using python3 on the raspberry pi. Does anyone know anything I can do.
Here are my parts:
Electric lock: https://www.jaycar.com.au/12v-ac-dc-door-strike-release/p/LA5078 Relay board: https://www.jaycar.com.au/arduino-compatible-5v-relay-board/p/XC4419 Raspberry Pi 3B+raspbianpythonshareedit follow close 2flag asked 3 hours agoAiden1111 bronze badge New contributor
- What have you actually done? You probably won’t be able to reliably control a 5V relay module from the 3V3 Pi. – joan 3 hours ago
- Ah, let me see. Your door lock is an “Electric Strike”. You cannot control it using any relay! (1) Electric strike – Wikipedia en.wikipedia.org/wiki/Electric_strike (2) Electric Strikes – Openers-Closers openers-closers.com/source/ELECTRIC%20STRIKES_2018.pdf – tlfong01 1 hour ago
- So It is impossible for me to control that door lock with a raspberry pi? @tlfong01 – Aiden 53 mins ago
- Ah, not at all. For us hobbyists, check out this 12V door lock catalog for those using “solenoids“, not “electric strikes”: aliexpress.com/w/wholesale-12v-door-lock.html. – tlfong01 37 mins ago
- And because a 12V door lock is just a 12V solenod with a “tail”. So what you need to mess around it use a 5V relay to control the solenoid (Example, ZYE-1 12V solenoid). You may find the schematic below helpful: raspberrypi.org/forums/…. Cheers. – tlfong01 30 mins ago
- And this shows the real thing: raspberrypi.org/forums/…. You see that I do not start with using Rpi python GPIO to control the relay. I use a NE555 timer to control the relay. Only I after I make sure how N555 can control the relay, then I replace NE555 by Rpi GPIO. So if you newbie fry things, you only fry a cheapy 555, not the expensive Rpi. And actually using 555 in the prototyping stage is faster that using python. Cheers. – tlfong01 25 mins ago
- And this YouTube shows how you can use the cheapy solenoid to fake a lousy door dock: youtube.com/watch?v=kYSmZUaBNzA&feature=youtu.be. – tlfong01 19 mins ago
- And you can search “KY019 relay tlfong01” in rpi.org.forum to find 100+ posts on how to use Rpi python to control different kinds of relays. Or start with this post: raspberrypi.org/forums/viewtopic.php?f=37&t=77158#p1323061 Happy program programming. – tlfong01 12 mins ago
1 Answer
Aiden, the Pi is 3.3V, so on first glance the relay board may not work reliably. However the wiring should be straight forward, just do a search on raspberry pi gpio and relays.shareedit follow flag answered 2 hours agodave1111 bronze badge New contributor
- any idea how to connect the relay board so I can control the lock with the raspberry pi? @dave – Aiden 2 hours ago
Categories: Uncategorized