This Model Roller Coaster Can Simulate a Real One

With a motor and an ESP32, this eight-foot-tall model roller coaster emulates the physics of a larger roller coaster.

Over the summer and fall, Jon Medenhall set out to create a realistic roller coaster model that would not only look cool, but also simulate what a real one would do if his project were scaled up. The entire system fits onto a large table and measures an nearly eight feet tall and ten feet long. Best of all, every aspect of the train's movement can be precisely controlled with an ESP32 and Raspberry Pi via WiFi.

Electronic components

The train itself was pretty simple to design. It houses a single ESP32 that receives commands from a Raspberry Pi over WiFi and then converts the incoming data into movements for the brushless DC motor to perform. Absolute positioning was achieved by placing a small magnet adjacent to the ESP32 and making a hall-effect sensor measure when it is close by. Power for the train comes from a LiPo battery pack that gives current to both the ESP32 and the motor.

Medenhall approached this project with the future in mind, namely, the ability to add other trains in the future. Because of this, he made a transfer station in which a track is moved with a pair of stepper motors so that up to two trains can be swapped out for one another.

Constructing the train

The front of the 3D-printed roller coaster's train looks quite similar to one found on an actual roller coaster. It contains three rows of four seats each along with a bumper that protects the imaginary passengers from a collision. The rear of the train, however, is what contains all of the electronics. The ESP32 was attached to a custom-made PCB while the motor was screwed onto the side. The PCB also contains the motor driver and power management circuitry, which makes for a very small footprint. Finally, the entire assembly moves along the track with a gear that slots into the grooves below for accurate propulsion. A set of bearings along the sides and below the rail prevent the train from slipping off of the track.

The transfer table

As mentioned before, the transfer station allows for up to two individual trains to be housed and swapped out at any time. A section of track sits above a pair of parallel rails and it gets moved linearly to match up with two storage track sections. The stepper motors below are able to home by moving the track until a limit switch at the rear is activated.

Building the track

Part of the reason for why this project took so long to create was due to the massive number of 3D-printed parts. Each track section had to be individually design and printed along with its inner grooved rack component. The sides are lined with a smooth plastic strip that helps to prevent the train from getting stuck at any point along its travels. For an extra effect, the ramp portion has an LED strip along its side that indicates the upwards direction of travel and could even be modified in the future for more exciting animations.

Wireless control

The last portion of this project was coordinating how everything should move together and be controlled. To do this, Medenhall designed a simple web application that runs on the Raspberry Pi and can be accessed from any device. By pressing one of a dozen other buttons, anything from homing the train to making it run can be accomplished.

Making it run

As seen in his demonstration video on YouTube, Medenhall's 3D-printed roller coaster project is incredibly fun to watch. Viewers can observe at it slowly travels up to the first hill and then quickly drops where it then makes its way around a couple of loops and finally comes to a stop at the base. The whole sequence is given by a series of animation frames so that different parts of the coaster can be modified at will.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles