0%
0%

# Automatic reverse with two trailers

Remote controlled vehicle with two trailers is going reverse and steers automatically

Similar projects worth following
662 views
Reversing a trailer is not an intuitive task. Not only It requires constant steering correction, but also steering to the opposite direction. In control theory it is called an "unstable system", because driving with zero steering input will cause trailer angle to keep growing. In this project I built a car platform powered by two stepper motors, and attached two trailers, each with a bearing, two skateboard wheels and most important, a potentiometer to measure trailer angle. a control rule is applied to set the required steering angle (turning radius) in order to keep the car+two trailers triplet in a coordinated turn according a command received from a remote control held by the user. Control loop is running at 20Hz, each time calculating geometry from trailers angle and system parameters to generate steering command. Motor commands are generated using a frequency generation algorithm running at 3Khz.

Mechanical design

my main goal in this project was to demonstrate the automatic steering correction for a car driving reverse with a trailer.

for that I needed a powered car with a trailer where I can measure the angle between them.

I designed A car using some very basic elements:

aluminum frame to hold the motors

two stepper motors (nema 17)

Poly carbonate plate to hold the electronics

608zz bearing

M8X30 bolt as axle

a single turn potentiometer to measure the trailer angle

3D printed parts

Steering

As you can see in the the pictures, I use stepper motors to drive each of the wheels. in order to control the steering angle I needed to drive each motor with a different velocity according the rule:

Control

to control the vehicle I need to compute the desired steering angle according the measured trailer angle and required driving angle (from remote control). the key feature of the problem is that for every trailer angle there is a steering angle that applying it will keep the trailer angle constant.

actually, it is not that simple since this is not a stable system, so even to keep the trailer in a constant angle requires constant corrections. this what makes the problem difficult to a human driver but easy to an automatic one.

from here it is just some math to get the numbers.

I start with the kinematic model of a single trailer as shown in the picture below:

where:

By measuring the trailer's angle, I can calculate the coordinated turning radius

and the steering angle required to  keep the trailers angle constant:

now here is the interesting part, steering angle larger than that will

cause the trailer angle to decrease and vice versa.

so a simple control rule will be:

where K is again factor that I tuned until receiving best performance.

the arduino constantly measures the trailer's angle ( as an analog voltage on the potentiometer) and calculates the steering command as mentioned above.

### ReverseWithTrailer.rar

Software for car and remote control

RAR Archive - 4.44 kB - 01/27/2018 at 09:15

### TrailerAssy.STEP

3D model car + trailers assembly

step - 4.69 MB - 01/27/2018 at 09:04

• ### It is now a member of the line followers family

yuval lombrozo09/21/2018 at 08:45 0 comments

I have upgraded my car with an IR sensor array at the rear trailer and added some steering algorithms so that now I do not use a remote control but it is autonomously following a line while pushing the two trailers

Share

## Discussions

Adam Lange wrote 05/16/2020 at 03:01 point

Very cool! Good job!

Are you sure? yes | no

deʃhipu wrote 01/26/2018 at 10:52 point

This is an awesome practice for control theory! Really nice!

Are you sure? yes | no

## Similar Projects

Project Owner Contributor

### hamsterBot

Ian Cummings

Project Owner Contributor

### Star Wars Slave I Bi-Copter

Project Owner Contributor

### RAPTA - Autonomous Humanoid Leg

Rupert Young

Project Owner Contributor

### Self Balancing Platform

Anirudha pratap Singh

# Does this project spark your interest?

Become a member to follow this project and never miss any updates