wESP32 and 12v door locks

User avatar
ExtrasensoryNoob
Posts: 10
Joined: Mon Mar 21, 2022 1:25 pm

wESP32 and 12v door locks

Postby ExtrasensoryNoob » Mon Mar 21, 2022 1:50 pm

I have two motorized door locks. To open they take 12V and the specs say: 250mA max inrush, 10mA max holding.

I have a wESP32. It uses PoE and V+ provides 12V with 12.95+ W of power (1.079A).

What's a good way to have the wESP32 open the door locks? I need to control them individually and at the same time. I think I can run them directly from V+, but I need a way to switch it.

I have some 4 channel optocouplers: LTV-846 (datasheet attached). My understanding is each IC will be in the range of 50-600% CTR. I have 25 and could screen them. I'm a noob, but I think this means if I run the optocoupler LED at 25mA, the best I can hope for with 600% CTR is 150mA on the output side. Is this good enough for the door locks? The 250mA says "inrush" but I'm not sure how the optocoupler would handle that.

If that won't work, can you please suggest parts that would work?
Attachments
LTV-816_826_846.pdf
(1.01 MiB) Downloaded 391 times

rpiloverbd
Posts: 101
Joined: Tue Mar 22, 2022 5:23 am

Re: wESP32 and 12v door locks

Postby rpiloverbd » Tue Mar 22, 2022 5:35 am

You can use a 12V relay module.

User avatar
ExtrasensoryNoob
Posts: 10
Joined: Mon Mar 21, 2022 1:25 pm

Re: wESP32 and 12v door locks

Postby ExtrasensoryNoob » Tue Mar 22, 2022 5:34 pm

Thanks. True, a ready to use 2 channel module sounds pretty easy. Do you have a recommendation? There are a number of cheap mechanical relays that are easy to find, but I'd like to pay extra for quality and long life. I tried to find a solid state relay, but many have a load rating that is too high, eg 24-240V.

I briefly looked at using a relay directly, that seems to need some supporting electronics and got over my head pretty quick. I could probably figure it out in time, but a module is much easier.

I read a little that an optocoupler could work by also using a mosfet or "buffer". I suppose that's not the simplest way, though it's neat. EDIT: turns out it seems this is what a solid state relay is doing internally!

Can it be done with a transistor? I tried reading up on that but they are used for many things and it's hard to find relevant info.

EDIT: I ended up going with PVD1354NPBF. The output supports 0-100V and 550mA, seems like it should work!

rpiloverbd
Posts: 101
Joined: Tue Mar 22, 2022 5:23 am

Re: wESP32 and 12v door locks

Postby rpiloverbd » Thu Mar 24, 2022 11:06 am

The SSR that you've mentioned can provide 550mA load current. Doesn't your 12V solenoid doorlock have a higher current requirement? Kindly check.

User avatar
ExtrasensoryNoob
Posts: 10
Joined: Mon Mar 21, 2022 1:25 pm

Re: wESP32 and 12v door locks

Postby ExtrasensoryNoob » Sat Mar 26, 2022 12:25 pm

The door locks are motorized rather than using a solenoid. The only specs I have for the door locks are: 250mA max inrush, 10mA max holding.

User avatar
ExtrasensoryNoob
Posts: 10
Joined: Mon Mar 21, 2022 1:25 pm

Re: wESP32 and 12v door locks

Postby ExtrasensoryNoob » Sun Mar 27, 2022 2:50 pm

I've got the SSRs wired up, they seem to work great! Well, I don't have the door locks so I can't test with those (it will be months yet), but the relays are working like they should -- super easy to use. I've used optocouplers in the past for logic level signals, these SSRs seem like the next step. It's really neat to be able to control higher current circuits this way.

Justincase
Posts: 1
Joined: Tue Mar 03, 2026 7:24 pm

Re: wESP32 and 12v door locks

Postby Justincase » Tue Mar 03, 2026 7:25 pm

Any luck?

User avatar
ExtrasensoryNoob
Posts: 10
Joined: Mon Mar 21, 2022 1:25 pm

Re: wESP32 and 12v door locks

Postby ExtrasensoryNoob » Thu Mar 05, 2026 4:11 pm

Yes, thanks! The SSRs have been working well. The doors are locked normally and I give them 24V when they need to be unlocked. The door locks were expensive (Accurate M8859E), but they work very well and everything is wired (through an "electrified hinge").

My computer controls everything and tells the ESP32 to lock or unlock the door, so I can do all sorts of logic. The inside handle is always operable and I have reed switches on the doors. When the door is locked and you go out, I have the door stay unlocked for X minutes, so you don't get locked out. I have motion sensors out there, so I can keep the door unlocked until there's no more motion. Or any other logic!

I plan to use the same door lock in an addition, for a WC accessible from outside, near a pool. I know for sure you are in there when motion is triggered and the door is closed, so the door will lock automatically (plus lights and fan). I know you haven't left until the door is opened.

There is a version of the door lock with "authorized egress" which is contact closure that tells me when the inside handle has been used. That's neat and I thought I needed that for the WC, though now I can't remember why. Seems the reed switch and motion sensor is sufficient.

Who is online

Users browsing this forum: No registered users and 4 guests