Mattéo Pozzo di Borgo
Microengineering — between electronics, embedded systems and fabrication.
← Project timeline
CPNV project

Automated marble run

An automated module controlled by a Siemens PLC, built into a large marble run shared by the whole class.

Period
23 – 30 Jan 2024
Context
Engineering preparatory year · CPNV — MCT, module M2 “Simple system”, a short introduction to automation
Team
Pair project
Status
Completed
Siemens PLCLadderTIA Portal3D printingState machineInventor
The automated marble run module
The marble run module

Key points

  • Required lateral movement and lift of the marble, in 20 s ± 5 s
  • Transfer mechanism with two grippers tracing a figure-of-eight path
  • Module integrated into the shared run of the whole class
  • 100 marbles out of 100 in the reliability test

Context and goal

Each pair had to build a frame in which a marble moves fully automatically. The specifications required a lateral movement and a lift, all within 20 s ± 5 s.

At the end, the modules of the whole class were stacked and connected to form one continuous run: the marble travels through everyone's devices.

What I did

  • Designed and built the lateral transfer mechanism, with two wheels driven by the same motor. On each wheel, the lower end of the gripper rod is fixed to the wheel, and the middle of the rod slides in a guide placed above the centre of the wheel. As the wheel turns, the tip of the gripper traces a figure of eight: it picks up the marble, lifts it, drops it into the neighbouring gripper and returns to its starting position. The second gripper makes the same movement in the opposite direction and drops the marble at the module's exit.
  • Designed the parts in CAD and 3D-printed them
  • Programmed the PLC in Ladder with TIA Portal: state machine, faults, control of the stepper motors, sensors and exit solenoid
  • My teammate Romain Schröder took care of the lift module and the wiring diagram

Tech

Siemens S7-1200 PLC · TIA Portal · Ladder · motor · sensors · CAD · 3D printing

Specifications

RequirementRequiredAchieved
PathAt least one change of direction and one motorised liftA lift module and a direction-change module
Run time20 s ± 5 s, i.e. between 15 and 25 sMet
ReliabilityAt most 1 failure in 100 marbles, i.e. 99 %100 marbles out of 100, i.e. 100 %
Required hardwareCPU 1212C, safety relay, emergency stop, KTP400 displayIntegrated
Link between modulesMarble held at the exit until the module below is readyHolding solenoid and dry “Wait” contact

State machine and programming

The client required a four-state machine, shown on the display: Stop (machine off), Wait (waiting for a marble), Busy (a marble is inside the module) and Default (fault). Pressing the emergency stop, or a marble that has not come out after 25 s, triggers the fault: the module stops immediately and only restarts after acknowledgement with the Set button.

The modules are stacked and linked by a dry contact: when it is closed, the module below is in Wait. Until then, a solenoid holds the marble at the exit.

State machine diagram: Stop, Wait, Busy and Default, with their transitions

Hardware

FunctionComponent
ControlSiemens S7-1200 CPU 1212C PLC, KTP400 Basic display, Ethernet switch
SafetySchneider XPSAC safety relay, emergency stop
Motion2 QSH4218 stepper motors (lift and direction change), driven by TMC2208 boards
Exit holdTAU-0730 solenoid
Sensing3 photoelectric sensors, 1 light barrier, 1 inductive sensor
Mechanics28 PLA-printed parts, 10 machined shafts, gears, PMMA plate, item profiles

Reliability and review

At first, we wanted several direction-change modules and a switch to create a loop. The direction-change module turned out to be much larger and more complex than expected. We kept only one, and the lift module was simplified.

In the final test, the module completed 100 marbles out of 100, after one last printed part was replaced on the day of the hand-in. For a next version, we noted improving the rails and the connections between modules, reducing friction in the lift module and adding a switch.

Result

A working module that meets the required cycle time, successfully integrated into the class's shared run.

What I took away

My first taste of industrial automation: programming in Ladder, synchronising sensors and actuators, and designing a module that has to interface with everyone else's.