top of page

Ladder Logic-Controlled Theme Park Ride Using OpenPLC

Winter/Spring 2025

Early Testing Video

Ride Operating

Project Summary

This ride control system was built for the 2025 Ride Engineering Competition, a national challenge hosted at Ohio State University where 20 student teams design and operate functional theme park rides built to real-world safety and operational standards — with candy starbursts as the patrons (riders).

Our team’s ride, Abandon Ship!, is a stepper motor-driven flat ride inspired by stormy seas on pirate ships, using a dual-lead screw and planetary gear mechanism to lift and tilt a rotating platform. The entire attraction operated autonomously during a simulated 6-hour show day, complying with ASTM F2291-24 standards and meeting strict requirements for height, orientation, acceleration, and emergency stopping.

I served as Controls Team Lead, designing and implementing the entire ride control system using OpenPLC and an Arduino Mega 2560. Every motor behavior — from jogging and homing to ride sequencing and fault recovery — was programmed using Ladder Logic, running on an open-source runtime system.

Key features of the system included:

  • Emergency Stop Safety Circuit: A dual NPN MOSFET design required both hardware (manual E-Stop) and software (PLC logic) to authorize motion, enforcing real-world fail-safe principles.

  • Autonomous Ride Cycling: Once started, the ride automatically executed lift, spin, and tilt routines with pauses for simulated loading and unloading.

  • Comprehensive FAT/SAT Test Plans: Over 100 functional tests were created to validate safety interlocks, ride motion, and fault handling.

  • Physical Operator Panel: Buttons, indicators, and override switches were wired for full local control, with input handled through the Arduino’s digital I/O.


All wiring, logic programming, and panel integration were done in-house. To implement stepper control, I extended the Arduino runtime with a custom C++ file using FastAccelStepper for smooth coordinated motion. Limit switches and position feedback ensured safe transitions and proper ride reset behavior.

​

The project was ranked 1st Place in Control System Design, awarded for its safety architecture, realistic ride logic, and creative use of open-source industrial automation tools. It was one of the most rewarding hands-on engineering projects I’ve done — combining electrical engineering, PLC programming, systems integration, and themed entertainment design into a single experience.

Choosing the Control System

Selecting the control system was one of the most critical decisions in our engineering process — impacting everything from hardware layout to software design and long-term reliability. We aimed to strike a balance between industry relevance, precision control, and practical constraints like budget and team scalability.

While traditional micro PLCs offered compelling advantages in safety and industrial authenticity, the cost of entry — including proprietary software licenses and I/O modules — placed them outside our financial reach for this year’s build. Instead of compromising on system complexity, we turned to OpenPLC, a powerful open-source platform that supports IEC 61131-3 ladder logic and integrates seamlessly with Arduino microcontrollers.

(Click Below to Visit OpenPLC's Website)

openPLC-min.png

By pairing OpenPLC with the Arduino MEGA 2560, we maintained a structured, standards-aligned programming environment while retaining full flexibility over hardware customization.

This combination allowed us to:

  • Implement a ladder-based control logic similar to what’s used in real-world ride systems

 

  • Simulate and debug rungs visually before uploading to hardware

 

  • Extend functionality through an Arduino “extension” script, enabling PWM motor control via FastAccelStepper.h


We evaluated options using a decision matrix, scoring based on safety, predicted reliability, innovation, feasibility, and cost. While the PLC scored highest in safety and industry alignment, the Arduino + OpenPLC solution earned the top overall score for offering professional-grade capabilities without exceeding our budget.

Rather than a workaround, this system empowered us to design a robust, fault-tolerant control architecture with features like E-Stop interlocks, limit switch feedback, maintenance mode toggles, and automated sequencing — all running on real-time ladder logic.

In short, this was not the easiest option — it was the smartest option for what we wanted to achieve: a reliable, transparent, and scalable control system that met competition requirements while building real-world engineering skills.

The Electrical System

After deciding on our ride mechanism, we knew there would be 2 stepper motors to lift the planetary gear assembly, 1 to spin the assembly, and 4 limit switches to monitor the position of the assembly, along with any buttons, LEDs, or other ways to have the operator interface with the ride.

To start, I began making some rough sketches of how we might organize the electrical system, knowing the max current we're allowed to pull from the wall is 15 Amps.

circuitdraft-min.jpg

A key feature of our control system design was the use of two N-channel MOSFETs wired in series to control power to the ride’s three stepper motors. This configuration forms a redundant safety interlock, ensuring that motors can only receive power when both physical and programmatic safety conditions are met.

2mos-min.jpg

​
 

  • MOSFET 1 is gated by the physical E-Stop button located on the operator interface panel. When pressed, the button immediately pulls the gate low, cutting +12V power to the motors and initiating a Category 0 stop — a rapid, hard shutdown designed to protect both riders and equipment in emergency scenarios.

 

  • MOSFET 2 is controlled by the Arduino’s internal safety logic, allowing the system to issue a programmatic E-Stop based on conditions like limit switch activation, fault flags, or internal state inconsistencies. This gives the software full authority to shut down motor power in response to detected issues — even if the physical button has not been pressed.


By wiring these two MOSFETs in series, both gates must be high (+5V) for power to be delivered to the motors. This means:

  • A physical E-Stop alone will immediately remove power.

 

  • A software-detected fault alone will also remove power.

 

  • Only when neither form of E-Stop is active can the system operate normally.


This hardware-level fail-safe ensures that even in the event of software glitches or partial mechanical failures, the ride cannot enter an unsafe motion state. It also closely mirrors the kind of redundant safety layering seen in real-world industrial control systems — providing both manual and automated intervention paths for fault handling and ride recovery.

2mos2-min.jpg

Going from the wall outlet, we used a 12V 10A AC to DC Convertor that goes to a 10A in-line fuse and then to a manual toggle switch before going to a fuse block.

switch-min.png
fuseb-min.jpg

Branching off of the fuse block was a 12V to 5V DC convertor, which would be used for the limit switches, LEDs, and buttons. The 12V power for the stepper motors and the Arduino came directly off the fuse block. Prior to each stepper motor was a stepper motor driver (3 total).

min.png
stepp-min.png
stepcont-min.png

Simple normally open limit switches were used for all the buttons on the Operator Control Console, except for a real normally closed E-Stop Button and a turn-key switch. LEDs were used for indicating the state of the ride in various ways, and the housing box for the console was laser cut out of wood.

panel-min.png

Designing the Ladder Logic

OpenPLC consists of the Editor, which runs on my laptop, and the Runtime, which runs on the Arduino. The editor lets you choose one of five IEC 61131-3 languages which can be organized into different file structures. It also comes with a default library of common function blocks like TON timers.

Now let's take a look at the ladder diagram. Towards the top are all the variables. Local variable can be mapped to different digital inputs and outputs of the Arduino.

inout-min.png

Local variables can also be used internally in the diagram for the control logic.

locvar-min.png

External variables can be used for interacting with an Arduino extension file.

Due to the limitations of controlling PWM ports with openPLC (scan cycles being too slow for PWM), we use an Arduino extension file which shares variables with any “external” variables in the ladder logic. That way, we can take advantage of the “fastaccelStepper.h” library to control the stepper motors. This library utilizes Arduino's internal hardware timers to produce PWM signals, which can run in parallel with the ladder logic and not get bogged down.

external-min.png
extensionifile-min.png

The order in which all of these files will interact over a scan cycle is:​​​

​

  1. Upon startup - variables are initialized and Arduino setup() function runs

  2. Ladder Diagram Reads Inputs

  3. Ladder Diagram Computes Logic Rung by Rung (20ms cycles time)

  4. Ladder Diagram Writes Outputs to physical GPIO pins as well as external variables

  5. Arduino Extension file runs for one loop and then is blocked until next time ladder diagram has finished running

  • Due to this blocking, we had to use “accelstepper.h” instead of the typical “stepper.h” library because it sets internal hardware timers, meaning functions like move() and moveTo() only need to be called a single time to execute the motor’s movements

Another feature of the OpenPLC Editor is the simulation tool, which make debugging much easier.

debug-min.png

Now getting into the logic itself, the first and most important part was getting the ESTOP functionality working as intended.

If the ESTOP button is pressed down (0 detected at gate)
OR
If PROG_ESTOP is outputting a 0 to 2nd MOSFET gate

When we press the physical ESTOP, we also activate the programmatic ESTOP so that we can control the recovery process.
 

EStop1-min.png

If we’re able to reset (the physical EStop button has been pressed) AND we’ve released the physical EStop AND we’re in maintenance mode, then we will see the white RESET_LED begin blinking.

By pressing the reset button, both the EStop LED and Reset LED will be deactivated and our Arduino will allow current to flow through the 2nd transistor.

The motors now have power and the arduino is told an EStop is no longer in place

The CAN_RESET flag is also set to 0 so that the next time an EStop occurs, the operator will have to follow the same steps remove the fault

Homing will be allowed from here on out
 

EStop2-min.png

Whenever both types of EStops are active, this will allow us to reset the next time we release the physical EStop button (sets the CAN_RESET flag to true)

Both EStops being active imply that the physical EStop had to have been pressed, and the physical button being pressed will be indicated with a solid LED_ESTOP

EStop3-min.png

When we have just recovered from an E-Stop and pressed reset to give the motors power, the CAN_HOME flag will become true.

As long as we’re in maintenance mode, the ready LED will begin flashing more rapidly than when we recovered from the EStop, indicating it is ready to home.

When we press the start button, we can begin the homing sequence. The homing sequence lowers each side of the whole planetary gear mechanism. When one side detects hitting a limit switch, that side's motor stops while the other side's motor continues lowering the mechanism. Then, once the other side's limit switch is hit by the mechanism, we know it is perfectly level, and both sides are raised slightly to a "home position". All movements involving stepper motors also include a portion of the Arduino extension file to communicate with the variables in the ladder diagram, which is the case here.

homing1-min.png
homing2-min.png
homing3-min.png
homingfull-min.png
homing4-min.png

When the turn-key switch is in maintenance mode, there's also the functionality of being able to jog the motors every direction manually. Maintenance mode is also required for reseting EStops as well as for Homing.

jog1-min.png
jog2-min.png

After homing is complete, the operator must turn the key to Auto Mode, hold down the reset button, and then press the start button. This will begin the automated ride cycle.

autostart-min.png

The auto sequence will loop using a combination of signals from the extension file and Ladder Logic TON timers to control how long each segment of the ride cycle takes.

auto1-min.png
Auto3-min.png
Auto2-min.png

Due to the nature of the competition requiring riders only being switched out every once in a while, we added a "stop after cycle" button along with a typical "soft stop" button. Unlike an EStop, these will not cut power to the motors. The soft stop will lower the ride back down to its home position no matter where it is during its automated cycle. The stop after cycle button will allow the full cycle to complete, but will not begin another one after that.

In either case, resetting faults and re-homing the mechanism is not required, and the operator can simply use the usual startup procedure for Auto Mode to get the ride running again.

You may also notice the very last rung in the logic involves checking if the two upper limit switches made contact with the ride mechanism. This is an unsafe position and will induce a programmatic EStop that must be recovered from in maintenance mode to return to normal operation.

soft1-min.png
soft2-min.png

Factory and Site Acceptance Testing

To ensure the control system met both functional expectations and safety requirements, we developed and executed a full set of Factory Acceptance Tests (FATs) and Site Acceptance Tests (SATs) in accordance with ASTM F2291 and industry best practices. These testing procedures are commonly used in real-world industrial settings to validate programmable logic systems before and after integration into the final installation.

​

We documented each FAT/SAT result with a pass/fail status, comments, and optional photos or logs, using a consistent template modeled after industry commissioning packages.

FAT – Factory Acceptance Testing:
Our FATs were performed during development in a controlled, lab-like environment to verify that the ladder logic, input/output wiring, and fault-handling behavior functioned as intended. We created over 100 test procedures to systematically validate every rung of logic in the OpenPLC program, including:

​

  • Motor direction and step pulse handling

  • Limit switch detection and safety interlocks

  • Emergency stop interrupt logic

  • Jog, home, and auto-sequence behaviors

  • LED indicators for system status and faults

  • Communication between ladder logic and the Arduino Extension File


Testing at this stage made extensive use of OpenPLC’s variable forcing and simulation tools, which allowed us to emulate real-world sensor input and track digital output behavior in real time without physically activating hardware. This was especially useful for simulating edge cases like limit switch failures or emergency stop mid-cycle.

SAT – Site Acceptance Testing:
Once the ride was fully assembled on location, we ran a second wave of tests in its operational context to confirm that all systems interfaced correctly under real-world mechanical and environmental conditions. These SATs verified all functionalities and accurate fault handling and recovery procedures per ASTM F2291.

​

Sign-Off and Documentation:

For both FATs and SATs, each test case included a dedicated sign-off area. Depending on the phase, these were signed by various stakeholders — including the software integrator, an authorized engineer/safety reviewer, and leadership representative — to mimic the multi-party signoff process typical in commissioning real-world attractions. This ensured accountability and documented that each subsystem met functional and safety benchmarks before proceeding.​

The Results

At the 2025 Ride Engineering Competition, our team was awarded First Place in Control System Design, with 152.33 points, a 30 point lead over the next closest team in the category.

This recognition reflects the technical depth and real-world rigor we brought to our system — including:

​

  • Implementing Ladder Logic using OpenPLC, aligned with IEC 61131-3 standards

  • Designing a redundant E-Stop architecture using dual-MOSFET cutoff logic

  • Creating a detailed and structured process for Factory and Site Acceptance Testing (FAT/SAT)

  • Integrating hardware-software communication between Ladder Logic and a custom Arduino Extension File

  • Following ASTM F2291 guidelines for control system safety and documentation


While we placed 6th place overall, the Control Systems category reflects the months of effort spent not only building a reliable ride system but also designing a complex control system and validating it like a real-world attraction.

result1.png
result2.png
result3.png

If you're interested in seeing the previous year's Ride Engineering Competition (2024), we won 2nd place overall

​

(Click below)

Gallery

gall6-min.jpg
newgal4-min.jpg
newgal3-min.jpg
newgal5-min.jpg
gall5-min.png
newgal1-min.jpg
gall3-min.jpg
Gal2-min.jpg
gall4-min.jpg
newgal1-min.jpg
newgal2-min.jpg
gall14-min.png
gall1-min.jpg
bottom of page