Comparison video of a Newton's Cradle without magnetic assistance:

This project was thrown together in a couple hours with a few parts I had lying around. I bought the electromagnet a long time ago thinking it would be cool to incorporate into a project, and I've finally found a use for it.

The design is simple. I have the electromagnet pulse via MOSFET in order to sync up when the rightmost metal ball reaches near the electromagnet (cleverly hidden inside the cardboard box). The LED was included simply to help visualize the electromagnet pulsing for my own benefit. I used trial and error to get the timing correct (though if I was ambitious enough I could have used something like an inductive sensor).

In order to set it up I had to start the cradle in motion to time up with the pulsing, and I could gradually and slowly move the cradle to the left in order to extend the range of motion (and lessen the sound of the metal ball hitting the cardboard). If I moved it far enough away gradually I was able to make it such that the ball would not hit the cardboard, but it would eventually fall out of sync. To keep it going indefinitely it had to make some small contact with the box. To mask the noise I played music on the background to sell the effect.

This was an interesting way to spend an evening, and I got a kick out of having my friends try to figure out why it wouldn't stop. However, two hours of a Newton's Cradle clacking is a great way to induce a headache.

really really bored
const int led = 2;
const int magnet = 3;

void setup() {
  pinMode(led, OUTPUT);
  pinMode(magnet, OUTPUT);

void loop() {
  digitalWrite(led, HIGH);    //turn on LED
  digitalWrite(magnet, HIGH); //turn on electromagnet for 80ms  
  digitalWrite(led, LOW);     //turn off LED
  digitalWrite(magnet, LOW);  //turn off electromagnet for 550ms