I see! Now I get it. So:
- I place a strong magnet in the bottom of the pendulum (behind the frame);
- place the electromagnet beneath it, in the center attached to the wall;
- place a hall effect sensor attached to the wall, also in the center
The black rectangle is the electromagnet, that small red thing is the hall effect and the ball is the strong magnet.
So, when the pendulum reaches the center, the hall effect sensor senses it. After a short delay (giving time for the pendulum to move slightly away from the center) I activate the electromagnet which will kick the pendulum magnet. This works in both directions!
Is this what you mean? I like it. Very simple!
Or did I get something wrong?