Powering arduino and accessory with a single battery?

Hi all, I have an Arduino Mega and a Solenoid Lock.

The Solenoid lock requires a 12V power supply, so I am using a 3S Lipo and a 5V relay switch so that the Arduino can send a signal to the relay to trigger the Solenoid.

However, to power the Arduino, it would be great if I could use the same 3S Lipo instead of getting a 9V battery.

Am I correct that I can connect the:

+Red wire of the 3S lipo to the VIN of the Arduino
+Black wire of the 3S lipo to the GND of the Arduino
+Split the red wire of the 3S lipo so that it also goes to the 5V Relay(for the Solenoid Lock)
+Take the GND wire of the Solenoid Lock and connect it to the GND of the Arduino

For reference, here is what the setup looks like if I use a 3S Lipo for the Solenoid Lock and a separate power source for the Arduino: Control 12VDC Solenoid Door Lock Using A Relay On Arduino - YouTube

I hope this makes sense...

Thank you!

Attach schematics.
From Your poetry It sonds like You intend to feed the relay coil directly from the controler. That seldomle works because relay coils need more current than the controler is designed to deliver.

Links to the relay please.

Thank you for the reply! Haha I laughed when you said “poetry”, and I appreciate you still taking the time to read the post…I guess my explanation was not as clear as I imagined when typing it up…

Attached is a schematic - please forgive me if it is a bit unorthodox as it’s my first time creating a digital schematic.

Here is the 5V Relay I am using: https://www.amazon.com/gp/product/B06XHJ2PBJ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Here is the Solenoid Lock I am using (requires 12V): https://www.amazon.com/gp/product/B01MATMUQN/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

I am trying to have the voltage of a 3S Lipo power the Arduino and also have the same 3S Lipo power the 5V Relay at the same time. This way, I don’t have to use one battery for the Arduino and one battery for the 5V Relay. So, I’m thinking I can just connect the red wire of the 3S Lipo to the Arduino VIN and also connect the same red wire (by splicing the wire) to the 5V relay.

The left schematic is what I am doing now (2 power sources - 1 is USB and 1 is the 3S Lipo. If I proceed with this configuration, I will have to replace the USB power with a 9V battery). The right schematic is what I am thinking of doing (only a 3S Lipo powers everything). I just don’t want to try it out without confirming with the far wiser folks on the forums because I need it for a project by Friday…and if I accidentally blow up my Arduino board then I am fried!

Best to use a 5V step down converter to power the Arduino from the battery, connected directly to the 5V pin. Pololu has a good selection of reliable converters.

That is much more efficient that going through the RAW connection, which simply dissipates excess battery voltage as heat.

Thank you! I can try to order a step down converter. If I don’t use a step down converter and simply plug it in using the raw setup in the proposed diagram in the image I attached, is that theoretically ok (even though it generates heat)?