On the dowel there are 5 steel nuts which are pulled towards the electromagnet. Gravity makes them return, but TBH it's not reliable enough. I'm working on a new version with small return springs and a wider swing for the striker.
The electromagnet is pulsed to control how hard to strike.