I have an electromechanical 7-segment clock display with each segment controlled by an electromagnet. A segment is 'on' depending on the polarity of the last pulse to its electromagnet.

Can anyone advise how I could control the electromagnets via the GPIO pins so they turn on/off, as required, once a minute to change the time?

I imagine relays would need to be used. It's complicated because the polarity to each electromagnet needs 'swapping' to turn it on/off.

There are 28 electromagnets in all (7 x 4).


1 Answer 1


You will need H-bridges if you want to reverse the polarity. You can save quite a bit by organizing your solenoids in a matrix (e.g. 4*7) and using a half-bridge for each row/column, an detailed in this answer:

enter image description here

  • 1
    +1, ingenious idea. Nice you found it again.
    – Janka
    Aug 20, 2018 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.