I'm pretty new to electronics but have been trying and researching a lot recently. Mostly for creating simple circuits for escape room puzzles.
I've been looking into voltage dividers and yesterday I tried the following circuit:
From one 12V power source I created a parallel circuit where one part goes through a voltage divider circuit to drop it down to around 5V. That 5V then supplies the power to a 5V relay (KY-019) and also goes to the signal input of the relay via a button. The other 12V goes through the relay to a maglock.
The idea is that if I press the button, the relay gets 5V, opens up and releases the 12V maglock.
Now I know this specific circuit makes no practical sense, since I can leave the relay part out and trigger the maglock via the button directly. The goal was to get some experience with voltage dividers as I've ran into situations where I needed different voltages in one project quite often.
But it does not work, and I can't figure out why. The divider works, the lock gets 12V and the relay gets 5V. But the moment I press the button the voltage to the relay is cut in half. Giving 2.5V to the relay's + and 2.5V to the relay's S. Since the button and + are wired in parallel they should both remain 5V right?
Is the relay itself interfering with this or is there some math I'm missing? I read that voltage divider circuits are good for triggering but bad for supplying load. Is that what's happening here and if so, why? I'd really like to know what I'm missing.
Also, are there any changes I could make to get this to work? Or is it conceptually doomed? A lot of my projects require different voltages and I've been able to manage with step-up and step-down modules but being able to use a simple voltage divider circuit could be quite handy sometimes.