Fully Autonomous Train Ramp for Spontaneous Mobility | Rix Inclusive Research
The winning team from the Hackathon20 event at Rix Inclusive Research designed a fully autonomous ramp that allows people to move easily between a platform and a train carriage. People with disabilities usually need to request a ramp 24 hours in advance, but their design means that anyone can spontaneously travel by train, summoning the ramp from their phone. The designers even suggested that the ramp could be personalised using colours, LEDs and music.

A model of the ramp was produced by the team, and is shown below. The model shown below is in its unfolded configuration, which has a flat upper, and curved base, with retractable wheels so that the ramp does not roll when being used. However, the idea is that the ramp will fold up so that it is more compact for storage. The design uses two wheels, for simple mobility, that transport it to the required doorway on the train, and then unfolds to make the ramp.

A working model for the self balancing ramp is underway, with a prototype made from 3D printed parts available from Thingiverse.



The prototype uses two Nema 17 stepper motors, controlled via a Raspberry Pi with Stepper motor Hat:

Balance is maintained using a 6 axis accelerometer/Gyro.

I took this photo at London Kings Cross Station, which shows the current ramp used for accessing trains. It is quite big and fairly heavy, so requires an assistant to put it in place at the train door:

Stepper Motor Hat Failure
Unfortunately, and after many, many attempts, the stepper motor hat would not function and I could not even get it to turn a basic stepper. Many permutations of wiring were tried, and many version of code, but to no avail. I can only assume that it is faulty. It’ hard to say, since the documentation is so terrible. So I am now taking a different approach and using an Arduino together with a stepper shield and letting the Arduino do the robot balancing and leave the PI to do the rest.
I have designed a new longer body to accommodate everything. This is the new body on my old Prusa MK2.5S (which incidentally is temporarily retired as it developed many faults. So I bought a Prusa MK4S to replace it).

With the stepper motors attached. Next to it is the Raspberry Pi 4 and the wheels:

The RampBot has taken a slight turn, and now has legs that can fold. The idea was taken from the Raspibotics project at https://github.com/raspibotics/MABEL, as it occurred to me that the current version of the RampBot would be too tall to be of use, and that it needed to be able to ‘kneel down’ to make the platform useful. The body (and ramp) has yet to be developed, but the first prototype legs have been constructed:

Each leg has a stepper motor to drive it forwards and backwards, and a servo midway down the leg to allow the leg to fold. The dimensions are not quite right yet, but will be adjusted when the body of the device is constructed.
The current assembly of the RampBot has taken a slight sideways direction, as it turns out that the legs are not very stable. I have disassembled the legs and will possibly use a longer set screw with an extra locknut. Even when I tightened this down firmly, there was sill some play at the joint, which appears to be backlash in the servo gears. For the time being I’ll build the RampBot without legs and concentrate on just getting it to stand up.

The current state of the parts:

It’s 2025 and time to get this RampBot up and running properly! There have been many issues with hardware and software, so I’m going to make a fresh start with the stepper controllers and accelerometers. None of it has really worked very well so far …
Another big issue that has arisen is that there does not appear to be a controller that will fit onto the Raspberry Pi that will deal effectively with both stepper motors and servos. The steppers needs fine control, as do the servos. The original stepper hat that I tried (Waveshare) didn’t do anything, and I have yet to get it to work.
As the Waveshare hat did not work for me (will continue to pursue this at a later date when I have time) I decided to use my Arduino CNC Shield in the meantime just to get the robot balancing. It’s not an ideal arrangement, but appears to work. The pinout for this shield is below:

The MPU 92/65 that I had also did not work with the software that I intended to use, and would not calibrate (it wouldn’t even connect) though I could read the data directly. Instead of spending more time trying to get the MPU 92/65 accelerometer/gyro to work properly, I used a GY-521 accelerometer/gyro combo that I just happened to have lying around (as you do) and connected that up to the Uno, which worked correctly. It calibrated and I have added to the settings to the setup for the RampBot, so hopefully it will help to improve stability.
The current rig for testing the accelerometer and stepper motors is shown below. Once these are providing sensible data, I’ll reassemble the robot. So far things are looking pretty good, with sensible readings form the GY521. I have code for the motors written now and they appear to be working correctly, though I still need to set up the current limiters on the stepper modules. Don’t want to fry my precious steppers.

The stepper drivers are basic A4988 modules (as I had a bunch of them handy in my components box), and the stepper motors are NEMA 17s. Each stepper motor has a resolution of 200 steps – in other words, 200 steps per revolution. So, sending 200 pulses to the stepper motor would make it turn through 360°. Looking at this slightly differently, 360° divided by 200 steps gives a resolution of 1.8° for each step. The steppers are working nicely now, and when I get the jumpers form Amazon tomorrow, I’ll try higher resolutions (using microstepping modes).
Steppers, aside, the next thing to do is see if I can get the RampBot to stand up …
There were still some issues with getting this RampBot to stand up straight. As I was using the CNC shield for the stepper motor drivers, and the MPU6050 breakout, which both wanted to use pin 2 on the Arduino, I had to make a few changes to the setup, using the Y and Z axes on the CNC shield, rather than the original X and Y axes. It’s very close to balancing now, and just needs the steppers setting up correctly and the PID parameters tweaking.

The eagle eyed will notice that this is not actually connected to a power source … I just managed to capture it before it fell over 🙂