I have a board "mks robin nano ver 3.1" and I want to make a leveling sensor similar to BL Touch but simpler than that.
For this purpose, I made a coil, which is empty in the middle, and I put a plastic rod with a magnet in it, a worm track, and a magnet around the coil.
Naturally, when gravity is applied to it, the force of attraction between the magnet around the coil and the magnet attached to its inner rod attracts each other and the rod stays in place.
Now if I connect a voltage of 5 volts to the coil (it consumes a current of about 600 milliamps), it becomes a magnet and pushes that inner rod down.
I have no question about the switch part that is connected to the Z-stop socket, its mechanism is separate and has been solved.
My question is exactly how to use the three-pin port of this board (BL Touch) or maybe somewhere else! I will command this coil to energize and magnetize it after issuing the leveling command of this axis so that the pin is thrown out.
I would greatly appreciate it if you could guide me to finalize this and also let me know if there are any adjustments I need to make in Marlin as well.