LM2956 Buck Converter, 12V, and 5V Single Channel Relay

Hi all,

I am working on a project which involves an LM2956, a 12V female jack, and a 5V Single Channel Relay module. I am planning to use the relay to power a solenoid lock as well but I am a bit confused as to whether I can split the power between the buck converter (which will power my ESP32 through its VIN) and the 5V relay through wiring, or is it actually risky?

All depends on your solenoid and 12V power supply. Which you didn't tell anything about..

Please post current ratings for both.

1 Like

My bad. The solenoid that I am planning to use is a 12V one 500mA with 0.6A current and power supply wise, I want to use a 12v 2A wall adapter (with maximum 24W) to power both the ESP32 and the lock itself.

Yes, you can power the ESP and relay from the buck.
However are you sure your 5V relay will work with the 3.3V ESP?

1 Like

Umm yeah supposedly if I have it connected by 5V right? But I was confused about the buck also taking the 5V pin as well so my original plan is to split the wiring between the buck converter (so it solely powers the ESP32 and such) and the 5V relay so they both use the 5V pin of the ESP32.

do you have any specs about "pull-in" current, starting current of your solenoid?

No. Connect the 5V buck output to the ESP Vin and also to the 5V on the relay module.

Umm yeah supposedly if I have it connected by 5V right?

Depends on the module, some work some don't.

1 Like

Unfortunately, in the description of the page/shop I am planning to buy it from, it doesn’t show the full specs such as the pull-in and the starting current. But, I can ask by the time their sales rep is online.

It's good to have the specs anyway. Your buck doesn't draw a lot to power esp and relay, so probably 2A supply is sufficient. You need to place "kickback" diode across your solenoid.

Like jim-p wrote, not all 5V relay modules are compatible with Esp 3.3V trigger signal.
Post a link to the one you are willing to use.

1 Like

Hmm ok, I guess wiring like this would work?

and this is the 5V Relay, I am planning to use:

Is this lock of the type that needs the current reversed in order to unlock? Or is it spring loaded and your solenoid is UNLOCKING the lock. How much time will you be applying power to the solenoid lock?

It is this one and I am planning to apply power to the lock for like 5-10 seconds

Ok, I thought do. Power to unlock. What type of door will this open? Metal or wooden? Do you have the striker plate for the door, so it can push back the locking pin when the door is closed?

1 Like

It does + the door is metal but for now, this is just a school project (so its leaning more towards a demo rather than something that is going to be used as of yet). Planning on mixing this with an actual application that involves firebase and 2x RC522 readers as well (one for in and one for out).

1 Like

The description says: "To drive a solenoid lock with an Arduino you will need a relay module fairly good power supply, as a lot of current will rush into the solenoid to charge up the electro-magnet, about 500mA"

So If that 500mA is the inrush current, your power supply is ok.

If that relay is "low-level trigger type", you shouldn't drive it directly from Esp. Use NPN transistor to drive it or use a relay that has high-level trigger or separate pins for coil .

1 Like

Thta's OK but you also need to connect the OUT- to the relay DC- AND the ESP GND

and this is the 5V Relay, I am planning to use:

It may or may not work with 3.3V I/O from the ESP

There is not enough information on the webpage.

1 Like

It may or may not work with 3.3V I/O from the ESP

There is not enough information on the webpage.

I’ll ask through their page and in person by the time I’m buying the materials I need.

Thta's OK but you also need to connect the OUT- to the relay DC- AND the ESP GND

Yeah of course. But, for COM, I’ll have that connected through my solenoids positive and for the negative is the NO of the relay?

Like this

1 last question since my barrel jack goes to +in/-in of my buck. Where do those 12v +/- connect to?

To the same point. Your buck has barrel input?