# Electromagnet for secret door

Hi,
I have a secret door disguised as a mirror without any suitable handle. I plan to attach a neodymium magnet to the door and an electromagnet to the door frame. The electromagnet should have two functions: hold the door closed and when a right password is entered it will change polarity of the electromagnet and it will push the door open.
I have no previous experience with such things. I plan to use "holding" electromagnet like this one. Is it suitable for switching polarity?
What strength of the electromagnet would you suggest? And what about the neodymium electromagnet?
Does the strength of the magnet add? Such as 10kg electromagnet and 5kg permanent magnet will work the same as 5kg electromagnet + 10kg permanent magnet? Or is one combination better than the other one?
Thanks

Smajdalf:
Hi,
I have a secret door disguised as a mirror without any suitable handle. I plan to attach a neodymium magnet to the door and an electromagnet to the door frame. The electromagnet should have two functions: hold the door closed and when a right password is entered it will change polarity of the electromagnet and it will push the door open.
I have no previous experience with such things. I plan to use "holding" electromagnet like this one. Is it suitable for switching polarity?
What strength of the electromagnet would you suggest? And what about the neodymium electromagnet?
Does the strength of the magnet add? Such as 10kg electromagnet and 5kg permanent magnet will work the same as 5kg electromagnet + 10kg permanent magnet? Or is one combination better than the other one?
Thanks

Your electromagnet will have an iron core, and the neodymium magnet will attach itself to the iron core, so the electromagnet has no reason to hold the door, the neo magnet will hold it fine.

Then the electromagnet will have to be energized with DC current to repel the neo magnet and your experimentation will have to determine the current necessary to repel the neo magnet and open the door.

Paul

Another possibility which may possibly need less power.

• use a magnet that gets moved out of position using a servo.
• use servo to rotate magnet to reverse polarity.

Makes sense about both magnet combinations being the same.

Force of the magnet holding itself in place has to be overcome by the servo, lots of mechanisms involved. If you want to include a servo it makes more sense to use the servo to open/close the door. Magnet to hold it close, servo pushes it open (needs good strength to overcome magnet & weight of the door).

Solution in #1 makes more sense, and is what I was thinking of as well reading the OP.

No electro/mechanical devices required if you use a magnet to hold it shut and a stronger hand-held magnet to open it.

actually the mechanism I was referring to is incredibly strong while holding. Might need a nudge (spring) to open. In any case you may be right easier to just use a solenoid to push open... small magnet to hold in place. Always think outside the box for solutions.

Paul_KD7HB:
Your electromagnet will have an iron core, and the neodymium magnet will attach itself to the iron core, so the electromagnet has no reason to hold the door, the neo magnet will hold it fine.

I did not think about this. The door have “latching” hinges and currently it already weakly hold closed - it is easy to open it. I wanted to have the electromagnet mains powered as a fail safe. When something goes wrong and the door refuse to open it may be disabled by removing power from outside (it is not meant as a real protection). For this reason I want to rely on an electromagnet to keep the door closed, not some latching mechanism.

So my requirements are:

1. When mains power is available keep the door closed (ideally strong enough it cannot be opened without a brute force).
2. When a password is entered somehow the door will open.
3. When mains power fails release the door to work (nearly) as before.

Since it would be difficult to add another mains powered electromagnet to the door I prefer a permanent magnet there. To meet my requirements the permanent magnet should be week. I still hope strength of the magnet and electromagnet add. Would 2kg permanent magnet + 20kg electromagnet work as expected? Or is there a risk the much stronger electromagnet will demagnetize (or magnetize to reverse polarity) the neodymium magnet instead of opening door? And what about tiny 0.1kg magnet and 20kg electromagnet?

Maybe a Polymagnet could work for you. No continuous power needed, just turn with a servo/motor mechanism when opening is desired.

I still think a servo or motorized system is best. You can always design a mechanical release as a failsafe.

I did something very similar to this last Easter for our annual Easter Egg game. My kids are all adults so the game just has to get more complex every year. Lately the games have been based on escape rooms.

One of the eggs in this game was held to the ceiling with an electromagnet very similar to, if not the precise one you showed from E-Bay. I glued a small supermagnet (stripped from an old DVD drive) to the inside of a plastic egg, and when energized, the electromagnet held the egg in place. The kids had to find a clue that when opened, sent an MQTT message to a NodeMCU that was controlling the power supply in the attic that was energizing the electromagnet. Opening the clue box dropped the egg. At least every time we tested it. There was a small glitch that I hadn't tested. On the day of the game the magnet was energized for so long that there was enough residual magnetism in the electromagnet that the egg wouldn't drop. In later experiments I determined that reversing the polarity for a second was more than enough to force the egg to drop. I just used a DPDT relay for that- nothing fancy or permanent.

Hope this helps.

Take a look at magnetic child safety latches. The ones I had once upon a time were not visible from the outside and the latch would tilt or lift when a magnet was placed in the right place.

SteveMann:
(...) Hope this helps.

Interesting info, thanks!

wolframore:
I still think a servo or motorized system is best. You can always design a mechanical release as a failsafe.

Why do you think servo/motor is better than electromagnet? The magnet seems (mechanically) much easier and tidier solution. And I cannot imagine a mechanical failsafe hidden inside that enables opening of the mechanism from outside.

Indeed you probably need a backup solution in case the system fails (no communication, power outage/battery empty).

A small magnet should hold it close quite well, as backup maybe a second stronger magnet nearby so you can use that - with a third magnet you place on the outside - to open the door by hand.

You can use a solenoid to latch the door. With the right one ... one that extends when powered and is pulled back with a spring ... the door will open when power fails.

The magnet one has the "downside" that you always can open it with a stronger hand held one ... although at some point ... on a mirror ... it might shatter your dreams ... and your mirror.

Speaking of shattering. Neodymium magnets are a ceramic and therefore extreme fragile. Make sure you cover the surface with a layer of rubber or preventing it otherwise to have physical contact with it's counterpart or you will risk it shattering if its closing too fast.

Some time ago I received the electromagnet from China and time to report back.

The electromagnet has about 30 Ohm resistance and 60 mH inductance according to my DMM. When applied 12V it gets quite warm shortly which is not surprising - it is dissipating about 5W. What is worse I am quite disappointed with the strength of it. There is no chance for it to lift 20kg. Maybe 1 kg. I wonder if it is "normal" or it is due to China crap.
With distance the power is decreasing very quickly. I didn't try to measure it exactly but it seems it is decreasing faster than for permanent magnet. If it were able to open the door it would be only a few mm.
And the last important "feature": with permanent magnets weak one and strong one repulse each other quite strongly - I believe their power add. But it is not true for the electromagnet - while it repulse a weak magnet it is overpowered by a strong magnet (slightly stronger than the electromagnet). There is about no force between the strong permanent magnet and the electromagnet when added together with the same polarity.

Please tell us the material you used to test the magnet lifting power? Should be the softest iron you can find and the lifting test is with the iron firmly against the electromagnet, not some distance away.

All magnetism operates the same way, no matter where it originates.

IS the current going to the magnet correct for the 30 ohm resistance and your 12 volts? Is the 12 volts regulated?

Paul

I have no idea how soft or hard the iron I was testing is but all metal surfaces I have tried gave roughly the same feeling (i.e. fridge, scissors, a random metal box). Either the quoted strength value is for super soft special iron under ideal conditions or the electromagnet is defective.

And yes, I use a regulated DC 12V 1A power supply. It should not be source of the problem.

And I think electromagnet is not the same as permanent magnet. I know little about such thinks but I guess the electromagnet is a coil wound around some soft iron core to multiply the strength. When a stronger magnet is nearby it overpowers the relatively weak field from the coil and "steals" the core. OTOH permanent magnet is not "cheating" by including metal core to boost own power - the field of the weak magnet is the same regardless of presence of the strong one. Does it make sense or it is silly?

Smajdalf:
(it is not meant as a real protection)

I’m not sure what the point of using an electro-magnet is then. A few neo mags to hold it closed under normal conditions should work if protection isn’t necessary. And if protection becomes a concern, add a dead bolt and a 12 guage on the inside. Then power loss is of no concern at all. And neither is someone coming through the door.

@DangerToMyself: The original idea was to keep the door closed so it cannot be opened easily. Ideally not by a bare hand (the door has no handle). Since most of the surface of the door is a mirror it is super easy to break it if someone decides to "open" it violently.
When a password is somehow presented the magnet should release the door and originally I wanted to push them opened slightly - so it can be opened more easily (again - no handle). So a passive solution with permanent magnets alone is no sufficient.
The electromagnet I have is not suitable for this task either. I am considering my options and when (if) I make a progress I will update this thread.