2

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+

8
  • What have you actually done? You probably won't be able to reliably control a 5V relay module from the 3V3 Pi.
    – joan
    Jul 26, 2020 at 10:55
  • 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
    Jul 26, 2020 at 12:54
  • So It is impossible for me to control that door lock with a raspberry pi? @tlfong01
    – Aiden
    Jul 26, 2020 at 13:07
  • 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
    Jul 26, 2020 at 13:22
  • 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
    Jul 26, 2020 at 13:30

3 Answers 3

2

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.

1
  • 1
    any idea how to connect the relay board so I can control the lock with the raspberry pi? @dave
    – Aiden
    Jul 26, 2020 at 11:59
2

The 5V rating refers to the coil; 12V refers to the solenoid door lock rating.

Here's how to set up the hardware:

schematic

simulate this circuit – Schematic created using CircuitLab

2

Use a transistor as a switch and use 12V across that transistor. This is the safest way. Measure the relay resistance first to choose your transistor.

Not the answer you're looking for? Browse other questions tagged or ask your own question.