Basic concept

In addition to the hardware interrupts for detecting ball position in the sensors, the Arduino is pushed almost to its limit with various other responsibilities:

The standard size particle accelerator uses an FEP tube around 1m long.  FEP is highly transparent and has similar very low friction to PTFE.  The next largest size tube up was used to securely align the two ends of the FEP tube to form a loop with almost no discernible join.  All electromagnets, and other components slide over the tube.

Accurately and reliably detecting the steel ball at high speeds is important.  Infrared LEDs and phototransistors were selected for this task, and the output pulse turned into a digital signal via a schmitt trigger.  Even at a constant speed, the round shape of the ball could result in different IR beam occlusion durations dependent on the ball's rolling position in the tube when viewed cross-sectionally.  For that reason, it was decided to estimate ball speed as the time difference between two fixed point IR beams, rather than the occlusion duration of a single IR beam. The physical housing for the LED/phototransistor pair required many iterations to reliably shield from ambient light, be precisely located, and easily assembled/disassembled.  Eventually the following 3d printed half shell design was developed. 

The central hole allows the whole shell to pivot to allow for tube movement, or different sized radii of the overall design.

The design of the electromagnet system is critical to performance, with particular attention being paid to reducing the gaps in the magnetic flux path (eg. Air, plastic etc).  The FEP tube chosen was as thin as practical.  While winding the coil directly over the FEP tube would minimise the flux path, it was awkward to achieve as repositioning coils along the tube became difficult, so it was reluctantly decided to use thin wall bobbins.  A range of existing commercially available bobbins/solenoid coils designs were reviewed for compatibility with tube size, however no suitable match was found and a custom designed bobbin was required. Rather than 3d print bobbins, which would requires several mm wall thickness, a custom bobbin was CNC machined with approximately 1mm wall thickness.   Overall, the electromagnet system consists of bobbin with winding, ferrite toroid, steel laminations, the PCB's used to hold the components together, and the steel ball.   Using a ferrite ball was considered to avoid the braking currents flowing due to Lenz's Law, however, cost-effective ferrite balls could not be procured.  Home made ferrite balls were attempted, however, they proved to be difficult to create with sufficient surface smoothness to allow consistent rolling.  

The disassembled electromagnet

The photo below shows the electromagnet assembly between two red PCB's.

The Output board includes a dedicated logic level MOSFET for each of up to six electromagnets, and interfacing electronics from the Arduino.  The electronics decode the 3 wire output address bus from the Arduino.  A LED bar graph shows which electromagnet is operating, and the sequential progression of the bar graph pulse assists in ensuring correct configuration and operation.  A parallel circuit triggered from the output address bus connects to strobe LEDs to indicate when each electromagnet is energized.  The LEDs are housed in aluminium light pipes, cut at an angle such that the LED’s light enters into the main tube, and is reflected internally at the critical angle.  This lighting effect adds to the aesthetic appeal and looks great in the dark.

The Arduino software was carefully developed so as to be accurate and fast.  The hardware interrupts avoided use of polling techniques, and floating point calculations were avoided to the greatest extent possible.

Optional extras developed include

A vacuum system consisting of pressure sensor, vacuum pump, solenoid valve and pressure fitting.  The pump and solenoid can be controlled by the user input system.  The screen can graph the air pressure in the tube, allowing experiments to be performed on how air pressure affects ball movement.  The Output board also includes two MOSFETS to switch the pump and solenoid valve.

An optional extension kit allows the unit to double from 3 to 6 electromagnets.  The tube length can double to 2m or more to make an effective exhibit for an entire class of students.  The input board’s connection to the Arduino has a three wire address bus, allowing up to 8 particle detectors.

A glow-ball was developed by spray painting primer onto a steel ball.  It was then spray painted with  with glow paint, before a final spray of clear lacquer.  Short of utilising a magnetic levitation system during painting, only one side of the ball could be painted at a time.  Each side would need to dry, before coating the other side.  Some balls developed a rim of paint where they rested in holes during the spraying, making this process somewhat low-yield.  The video below shows the spectacular effect of the glowing rotating ball.

Testing

The overall design and documentation was Beta tested on an enthusiastic son (approx. 14 years old) and father.  They could solder but didn’t profess to have any electronics experience.  The pair successfully completed the kit.

Further work under development

Numerous folk suggested the ball should be able to shoot the ball out from the tube, to facilitate student understanding of projectile motion and make the project more versatile.  Note that the low speed and high-drag nature of a sphere present a very low safety risk.  Potential designs using completely mechanical switching arrangements were dismissed as out of keeping with the project's purpose as a particle accelerator model. 

A custom CNC milled acrylic fitting inserted between the two tube ends was used as the forked path.  Care was taken to cut the tube ends perpendicularly to the tube's axis, and o-rings were used to avoid the tube separating from the fitting.  Even with these precautions, it is relatively difficult to ensure the ball's smooth transition from FEP tube to acrylic fitting – some degree of randomness to the ball motion is introduced, perhaps due to imperfections at the interface, or perhaps due to different rolling friction.

Image shows cross sectional drawing of the acrylic fork prior to machining

The ball will naturally stay on the exterior track of the fork due to centrifugal forces.  It makes more sense to only switch the ball onto an inner track for exiting when needed, than to reliably have to switch the ball to the inner track for every revolution.

A number of designs for switching the ball to the inner fork where prototyped.  A neodymium permanent magnet offered high field strength, but the kinetic energy gained approaching the magnet is lost when departing the permanent magnetic field.  In practice, the magnetic field gradient proves so steep that it was very difficult to stop the ball becoming stuck in the position closest to the magnet.  Numerous spacing and geometries were attempted, some being better than others.  At one stage a servo mechanism physically rotated the permanent magnet at a similar rotational speed to the ball, however, this just delayed the arrival of the departing magnetic field gradient, not avoided it.

An alternative concept for avoiding the departing magnetic field gradient is by physically switching an alternative magnetic path at the appropriate time, but mechanical switching is not ideal given the intended high speed operation.  An electrically driven counter magneto motive force could be used to switch the magnetic field, but this would require an electromagnet of comparable field strength to the permanent magnet, meaning that one might as well avoid the permanent magnet altogether.    I'm not aware of any solid state way to switch a permanent magnetic field using a low switching energy, and thus permanent magnets were shelved.

The following scientific paper proved an excellent resource for understanding the design of electromagnets capable of changing steel ball movement.

   Progress In Electromagnetics Research M, Vol. 32, 245–256, 2013

   MAGNETIC GUIDING OF A MOVING FERROMAGNETIC SPHERE

   Darryl S. Jessie, and Michael P. Bradley

Based on the paper, I used FEMM (http://www.femm.info/wiki/HomePage) to simulate the magnetic field (and ball forces) at each cross section of a taco-shaped electromagnet.  To achieve the necessary magnetic force to overcome the centrifugal force, a sizeable pulse current was required.  A photo flash  circuit was adapted.  After an initial charge of over 150V, the storage capacitor was released when the ball passed through the switching zone.  Some success was achieved, but reliability was poor.  Potential causes include irregular motion due to the FEP-acrylic interface, and/or poor start or duration timing of the electromagnetic pulse.

Simulation of an earlier version of the electromagnet.

The current version of the steel core (before coil windings applied)  and acrylic fork fitting... The taco-like steel core slides over the acrylic.

The completed assembly

A video (actually shows the previous design of the electromagnet)


Additional technologies developed during the project

To experiment with flipping the ball out of the tube I needed some other tech to help examine the ball location at high speeds... in the absence of a high speed video camera, I built up a flash rig.  A digital camera was set to long exposure mode, the lights are turned off, then the Particle Accelerator's arduino triggers the flash at the time of interest (eg. electromagnet pulse).  In that way, I can see where the ball was at the critical time.

Where I'm up to right now...

A quality high speed camera like a Chronos would be helpful to allow investigation into the root cause of the variability.  To fund the camera, the DIY kit (without the ability to fling the ball out) is now available on a current Kickstarter campaign.

Appreciate everyone's input and suggestions, and of course backing the kit on Kickstarter.

Update 1st September 2019

CERN just reached out to me so it's great to have contacts there - they're even going to chip in for the current Kickstarter campaign.  Am keen for everyone's ideas on experiments that can be done with this model, please see https://physics.stackexchange.com/questions/499653/experiments-for-a-model-particle-accelerator