Use the I/O on the MiniZed with custom driver circuitry to control electromagnets.
Read up about this project on