• No results found

Driverless Train Development and construction Emma Berglund Julia Törnqvist

N/A
N/A
Protected

Academic year: 2021

Share "Driverless Train Development and construction Emma Berglund Julia Törnqvist"

Copied!
23
0
0

Loading.... (view fulltext now)

Full text

(1)

TVE-E 17 001 juni

Examensarbete 15 hp

Juni 2017

Driverless Train

Development and construction

Emma Berglund

(2)

Teknisk- naturvetenskaplig fakultet UTH-enheten Besöksadress: Ångströmlaboratoriet Lägerhyddsvägen 1 Hus 4, Plan 0 Postadress: Box 536 751 21 Uppsala Telefon: 018 – 471 30 03 Telefax: 018 – 471 30 00 Hemsida: http://www.teknat.uu.se/student

Abstract

Driverless Train

Emma Berglund, Julia Törnqvist

As automation increases in train services, this project resulted in making a driverless train. The main purpose was to see how security can be increased. By using sensors, today's technologies and rebuild the stations with walls on the platforms, the safety can increase for the better. This project designs a railway system consisting of a train, boom barriers and a station. The mechanical parts were made from scratch to get the system to work beneficially. The use of Arduino as a micro controller where electrical components could be programmed, became the control of all subsystems. Ultrasonic- and IR-sensors were used to detect if obstructions were located on the rails and to detect the oncoming train at the railway crossing. To increase safety, a wall was built on the platform with doors to prevent people from tracing the tracks. The platform door opened and closed simultaneously with the door on the train.

As a result, all subsystems worked well separately. When connecting them with each other, some problems occurred. For example, door operations did not match up to 100 percent, which still was considered approved. The major problem was that the train became too heavy for the motor to drive it properly. As there was no time to implement a larger motor, the solution was to increase the voltage with two 9V batteries connected in series. The project demonstrated that an automated train system is to prefer, given its safety benefits. This model can not be materialized into reality as more sensitive sensors are required and the train systems are built more advanced, both mechanically and electrically.

(3)
(4)

Abstract

As automation increases in train services, this project resulted in making a driver-less train. The main purpose was to see how security can be increased. By using sensors, today’s technologies and rebuild the stations with walls on the platforms, the safety can increase for the better. This project designs a railway system consisting of a train, boom barriers and a station. The mechanical parts were made from scratch to get the system to work beneficially. The use of Arduino as a micro controller where electrical components could be programmed, became the control of all subsystems. Ultrasonic- and IR-sensors were used to detect if obstructions were located on the rails and to detect the oncoming train at the railway crossing. To increase safety, a wall was built on the platform with doors to prevent people from tracing the tracks. The platform door opened and closed simultaneously with the door on the train.

As a result, all subsystems worked well separately. When connecting them with each other, some problems occurred. For example, door operations did not match up to 100 percent, which still was considered ap-proved. The major problem was that the train became too heavy for the motor to drive it properly. As there was no time to implement a larger motor, the solution was to increase the voltage with two 9V batteries connected in series.

(5)

Contents

1 Introduction. . . 3 1.1 Background . . . 3 1.2 Objectives. . . 4 1.3 Limitations . . . 4 2 Components. . . 5 2.1 Ultrasonic sensor . . . 5 2.2 IR-sensor . . . 5 2.3 Micro-switch . . . 6 2.4 Micro servo . . . 6 2.5 Micro controller . . . 6 2.6 Motor . . . 6 3 Method . . . 7 3.1 Mechanical . . . 7 3.2 Electrical . . . 8 3.3 Design . . . 9 4 Results. . . 10 4.1 Mechanical . . . 10 4.2 Electrical . . . 11 4.3 Tests. . . 11 5 Discussion . . . 13 5.1 Mechanical . . . 13 5.2 Electrical . . . 13 5.3 Programming . . . 13

5.4 Advantages and disadvantages . . . 13

6 Conclusion . . . 15

6.1 Development and improvement . . . 15

1 Appendix . . . I

1.1 Code for the train . . . I

1.2 Code for the station . . . III

(6)

1

Introduction

Automations serves as important roles and functions on our communities. In particular, the automated train services. Many countries have already employed driver-less trains and it is only a matter of time before Sweden will do the same. Storstockholms Lokaltrafik has envisaged to introduce fully automated operations by 2025, as mentioned on their website.1 If this will succeed is a matter of money and politics which is

the disadvantage of automation. That it costs a lot to buy in and replace systems. A main benefit of an automated system is more safety. By having sensors and other automated technologies utilized by the system. Thus allowing for information of collected data to be transmitted between different areas of the system; the train, the track and the control center. And moreover, automated doors on platforms working in unison with the train will further increase safety by preventing any obstructions to interfere with the tracks.

1.1

Background

According to a technology report from 1976, Automatic Train Control in Rail Rapid Transit, the first auto-mated train emerged in New York in 1961.2 The train system had a relatively low level of automation. The

train protections were automatically but the train operations were manual. The train was under the control of the driver who regulated speed, station stopping and door control. The automated part was accomplished by wayside signals to prevent collisions and some parts of the railway were equipped with time signals for over speed protection.

Since then, there has been further developments in this industry, thereupon more than 30 countries are implementing automated trains today.3 Figure 1.1bellow illustrates some of the different types of automa-tion operaautoma-tions. Each grade of automaautoma-tion are different from one another as they have different degree of automated functions.

Technical development has enabled a train system that can monitor, drive and control the entire operation process. The parts that makes this possible are;

Automatic Train Protection (ATP). This part is responsible for basic safety. For example; it avoids collisions by applying brakes automatically. A train with ATP corresponds at least to the degree GoA1.

Automatic Train Operation (ATO). This is a system of a complete automatic train piloting with driverless functionalites. The ATO do all the functions of the driver except for door closing. This corresponds to the degree GoA2. A newer variant of ATO with the computer doing the closing operation, only needs a train attendant for any emergencies. That system corresponds to the degree GoA3.

Automatic Train Control (ATC). This performs fully automatically operations with means no driver need-ing. This system also includes route settings and train regulation. A train with ATC corresponds to degree GoA4, which have Unattended Train Operation (UTO).

The implementation of automated systems allows optimizing of train traffic by increasing the average speed and the running time of trains. The reason this is possible is mainly sensors which also increases the secu-rity. Thanks to extremely sensitive sensors, objects in front of the train can be discovered long before the human eye. As a train has a braking distance between 600 and 1500 meters, sensors world reduce the risk of accidents considerably.

1 http://www.sll.se/verksamhet/kollektivtrafik/aktuella-projekt/Roda-linjen/Nyheter/2016/03/Utredningsrapport-helautomatisk-drift/

2https://www.princeton.edu/ ota/disk3/1976/7614/7614.PDF 3https://motherboard.vice.com/en

(7)

Figure 1.1: A picture of the different degrees taken from International Association of Public Transport, UITP.

1.2

Objectives

The objective of this project is to convey how important and effective it is to integrate today’s technologies. This to increase the safety and further streamline rail traffics of our future automated trains.

The aim is to design a functional railway system demonstrated by a train, a boom barrier and a station. Each areas of the system is unique, designed to fulfill their purposes in insuring that the system is fully functional as a whole.

1.3

Limitations

(8)

2

Components

During the project, several electrical components were used, such as different sensors, micro servos, micro controllers and a motor. They can be seen in figure1.2and1.3. This along with a battery, resistors, diodes and a transistor. The batteries used were at 9V and the resistors at 1kΩ and 800Ω. The diodes used were LED diodes in the colors of red and white. The transistor was of type PNP which means it gives a Positive-Negative-Positive type of configuration.

Figure 1.2: A picture of the components, where; 1:Ultrasonic, 2:IR, 3:Switch, 4:Servo, 5:Controller.

2.1

Ultrasonic sensor

To be able to detect objects in front of the train, an ultrasonic sensor named HC − SR04 was used. This sensor uses sonar to determine distance to objects from 2cm to 400cm. The sensor have four pins; Ground, VCC, Trig and Echo. The measurement starts with receiving a pulse of high (5V) to the Trig, which will ini-tiate the sensor to transmit out 8 cycles of ultrasonic burst at 40kHz. When the sensor detects the reflected ultrasonic, it will set the Echo pin to high (5V) and delay for a period, width. To obtain the distance, the width of the Echo pin is measured.

2.2

IR-sensor

(9)

2.3

Micro-switch

Micro-switch with instantaneous switching contacts was used to tell when the doors on the train and station should open. The terminals on the micro-switch are; N O that is normally open, N C that is normally closed and COM that is common. The terminals used were N O and COM . When the contact is pressed down it will connect the terminal N O to terminal COM for a moment and a signal can be detected.

2.4

Micro servo

For the door operation and the function of the boom barriers, micro servos was used. The servo, SG92, can rotate 180 degrees and have a torque at 1 kg-cm. The servo have three pins; ground, VCC and signal. It allows control of the angular position, velocity and acceleration.

2.5

Micro controller

In order to control all the components of the system, an Arduino as a micro controller was chosen. Arduino is a programmable circuit board with an easy to use hardware and software. The board named Arduino Uno was chosen and it has 14 digital inputs and outputs.

2.6

Motor

The motor used is named DG01D and it is a 48:1 geared DC motor. The motor have two rotating shafts where two wheels easily can be attached.

(10)

3

Method

The train, station and the system for the railway crossing were made from scratch. The designs were made in CAD before the parts of the train systems were made. One of the CAD drawings can be seen in figure

1.4. The materials used were plastic and metal to get a formation that was eligible. To get the train to move forward and to get the different functions to work, a couple of sensors together with three Arduino were used.

Figure 1.4: CAD drawing of the train.

3.1

Mechanical

All parts except of the railway and the electrical components were built in the workshop. The locomotive and the carriage were made of thin metal that were bent and welded to give the train its form. This can be seen in figure1.5. The constructions were attached to two bottom plates together with the plastic wheels that were lathed. To get the wheels to roll easily, bearings were used as wheel hubs. The door operates by sliding from side to side made possible by the help of two rails. The sliding of the door was powered by a micro servo in order to pull open. A spring attached on the other side of the door to utilize closing operation.

The floor of the station were built out of wood material and the wall was made of plastic. The door was constructed in a similar way as the door on the carriage.

The boom barriers were made out of metal and were attached directly on two servos; one for each side of the railway. The warning lights were constructed with red and white diodes. The railway crossing sign were attached on a post made of stainless steel. To improve the design, holes were made in the post to pull the cables through it.

(11)

3.2

Electrical

The electrical part was divided into three systems programmed on each of the Arduino. These systems were; the train, the station and the railway crossing.

Train

This system controlled the motor, the battery, the ultrasonic sensor, one micro-switch, two diodes and a micro servo. Everything was connected and soldered on a circuit board. Before soldering a circuit diagram was drawn that is presented in figure1.6. When powered, the engine starts and two diodes located on the front of the train became lit simultaneously. When the ultrasonic sensor located on the front detects any obstructions, the engine responds by shutting down immediately. The micro-switch mounted on the side of the train gets activated when pressed upon arrival at the station. Commanding the engine to shut down and the door to open. After a programmed delay the door closes and the engine starts.

Figure 1.6: The circuit of the train system.

Station

(12)

Railway crossing

The Railway crossing controls boom barriers by utilizing an IR sensor, two micro servos and six diodes. The IR-sensor is responsible for detecting on coming trains which then enables the boom barriers to close. The warning lights consists of one white and two red diodes each. The white diodes is programmed to flash constantly unless when the IR-sensor detects an on coming train, then the two red diodes will be flashing instead. The circuit of the system can be seen in figure1.8.

Figure 1.8: The circuit of the railway crossing system.

3.3

Design

(13)

4

Results

The final result of the system is presented in figure1.9. The functions of all parts were tested and validated before the implementation. When all subsystems worked, some tests were performed on the entire system. A few modifications were required before getting a functional system.

Figure 1.9: The final system.

4.1

Mechanical

Building the mechanical system from the ideas and designs gave a final result that was wanted. The train became a little bit heavier than expected. Which resulted in the chosen motor not having the power to drive the train at the desired speed.

(14)

4.2

Electrical

Train

A test of the system was done before mounting, showing the electrical part worked as planned. The distance range was chosen to 15 cm. After the implementation another test was made that unfortunately resulted in the 9V-battery failed to drive the train. The solution was connecting two 9V batteries in series which turned out to work.

Station

The station managed to operate the door successfully using the servo. The programmed delays made the platform door move reasonably consistent with the carriage door. The location of the station was changed a couple of times in order not to interact with the ultrasonic sensor.

Railway crossing

The IR-sensor worked well before implementation. When detected, the warning light started to flash red and then the barriers went down. During a test containing all subsystems, the IR-sensor had problem detecting the train. After several tests, the most optimal distance for the IR-sensor to measure the on coming train could be determined to 10 cm.

4.3

Tests

Ultrasonic sensor

This test was made to determine the range of the ultrasonic sensor. The set-up was the train on the railway and an obstacle to place on the rails. By changing the settings of the range before each test, an interval of operating distances could be determined. The results of the test can be seen in table 1.1. The first column is the range of the sensor, the second indicates if there was a collision and the last is the distance between the train and the obstacle on the railway when it was stopped.

Range [cm] Collision Distance [cm]

10 X 12 X 13 1.0 14 2.5 15 3.0 18 9.0 20 12.0

(15)

Micro-Switch

The test on the micro-switches were mainly about their location. By provisionally attaching them to different places on the train and station, the final location could be determined. The test was carried out by allowing the train to enter the station and let the switches interlock. The final result is a switch placed where the platform starts and the other in the middle of the train.

IR-sensor

By allowing the train to pass the sensor, a range could be determined. It was tested between 8 and 16 cm which can be seen in table1.2.

Range [cm] Detecting 8 out of range 10 only the train 12 only the train 14 disruption from surroundings 16 disruption from surroundings

Table 1.2: Tests to determine the optimal range for the IR-sensor.

Delays of the doors

The purpose of the test was to get the doors to operate simultaneously. First, a delay was determined after the switch was pressed. This to make the train stop with its door consistent with the platform door. Trying without a delay resulted in the train stopped before the carriage reached the station. Another test with a delay of 3 seconds resulted in the train drove past the station before stopped. Several tests between 0 and 3 seconds were made where the optimal delay could be determined to 0.55 seconds. A second delay at 1 second was programmed before the door opened.

(16)

5

Discussion

5.1

Mechanical

The mechanical parts work without any major problems. Coming up with a solution for the train’s door took some time, a problem given by not having enough space inside. In the final construction, the door was sliding side to side between two rails. Using a spring as a way to pull back the door after it has been released from the servo, worked well for the automated closing of the door. At the station, it was decided to use the same solution for the door opening.

The function of the door system was impaired when tested together with the micro servo. The servo did not quite manage to open the door smoothly and the opening process was a bit abrupt. No better solution was found for this mechanical fault, being a minor issue this was considered approved.

The materials used have been easily workable, with the exception of the stainless steel which proved difficult to work with. As a result more time was needed. Why the stainless steel was used is because the material came with the right diameter when purchased, which was perfect for it’s purpose.

5.2

Electrical

Some modifications have been required for the electrical sensor components. The measuring range on the ultrasonic sensor needed to be modified as to avoid detecting the train station acting as an obstruction. Same goes with the IR sensor, the position of the sensor needed to be modified so that it is able to detect the train. If the range were programmed to high, the sensor detected more of the surroundings which resulted in the boom barriers reacting even when the train was not approaching.

Another problem faced was finding a micro servo with the right angle rotation. Trying with a continuously rotating servo with 360 degrees angle did not get the desired effect. It was hard programming because it is not intended to stop at specific angles. Replacing it with a 180 degrees rotational servo turned out to work better.

5.3

Programming

The only problem regarding the programming was the railway crossing. It was desirable to let the barriers be down for a moment before the train pass. It took some time from the IR-sensor detected to the barriers went down and since Arduino can not iterate parallel sequences it wasn’t possible. Instead, the barriers only went down for a short period while the train passed.

To determine the delays on the door operations, a lot of tests were performed. The purpose of the delays was to let the doors open and close at the same time. The programmed delays did not match the doors perfectly but were still considered enough to be approved. A delay was also programmed to simulate the passengers boarding.

5.4

Advantages and disadvantages

(17)

The automated doors controlled by the train system on platforms can prevent future accidents at train stations. They act as barriers for passengers, only opening for them to give them access when boarding the train. Most importantly restricting them with access to the rail tracks. There have been incidents where passengers have stepped off the platforms onto the rail tracks, one of many examples is to retrieve a dropped key. As to avoid potential dangers, like an electrocution as the tracks can still be energized, the doors at futures platforms must be close in the absence of trains.

Most trains have an average braking distance of 600 to 1500 meters. Sensors can be programmed and im-plemented to detect objects in the trains paths much quicker than the human eyes can allow. Ultrasonic sensors can be a solution to increase the braking times of trains in spite of the long braking distance.

(18)

6

Conclusion

This project demonstrates that there are practical and safety benefits with an automated train system. Although our model can not be made to materialized into reality as it required a control center and more sensitive sensors. The safety of our future trains can be increased with the use today’s advanced technolo-gies. Passengers can be protected by automated doors at train platforms. The trains can be programmed to operate in conjunctions with boom barriers and most importantly with human operators.

6.1

Development and improvement

The project would be interesting to develop by implementing a control center. One can also expand the railways to accommodate multiple trains that can interact with each other.

(19)

1

Appendix

1.1

Code for the train

include <Servo.h> // Libary for servo Servo myservo; define EchoPin 7 define TrigPin 8 define MotorPin 13 define LedPin 12 define SwitchPin 2

int maximumRange = 10; // Maximun range needed int minimumRange = 0; // Minimum range needed

long duration, distance; // Duration used to calculate distance int pressSwitch = 0;

int pos = 0;

void setup() {

// This section defines the pins to inputs or outputs: Serial.begin (9600); pinMode(TrigPin, OUTPUT); pinMode(EchoPin, INPUT); pinMode(MotorPin, OUTPUT); pinMode(LedPin, OUTPUT); pinMode(SwitchPin, INPUT);

myservo.attach(9); // Let servo attach pin 9 myservo.write(-90); // Set servo to angle -90 }

void loop() {

// This section calculates the distance from the ultrasonic sensor:

digitalWrite(TrigPin, LOW); delayMicroseconds(2);

} digitalWrite(TrigPin, HIGH); delayMicroseconds(10);

digitalWrite(TrigPin, LOW);

duration = pulseIn(EchoPin, HIGH);

(20)

// If the sensor detect: else {

Serial.println(distance);

digitalWrite(MotorPin, LOW); // Engine off digitalWrite(LedPin, LOW); // Led off }

// This section controls the switch-sensor

pressSwitch = digitalRead(SwitchPin); if(pressSwitch == HIGH) // If detected {

delay(550);

digitalWrite(MotorPin, LOW); // engine off delay(1000);

myservo.write(180); // rotate servo 180 degrees delay(5000);

} myservo.write(-180); // rotate servo -180 degrees delay(1000);

(21)

1.2

Code for the station

#include <Servo.h> // Libary for servo Servo myservo;

#define switchbutton 2

void setup() { Serial.begin(9600);

pinMode(switchbutton, INPUT); //Define switch as input myservo.attach(8); // Let servo attach pin 8

}

void loop() {

// This section controls the door operation: int switchbutton_on = 0;

switchbutton_on = digitalRead(switchbutton); myservo.write(180);

if (switchbutton_on == HIGH) { delay(1000);

myservo.write(-180); // Rotate the servo -180 degrees delay(5000);

myservo.write(180); // Rotate the servo 180 degrees }

(22)

1.3

Code for the railway crossing

#define ir_sensor A0 #define led 13 #define led2 12 #define whiteled 11 #define led3 7 #define led4 6 #define whiteled2 5

#include <Servo.h> //Library for servo Servo myservo;

Servo myservo2;

void setup() {

// This section defines the pins to inputs or outputs: Serial.begin (9600); pinMode(led, OUTPUT); pinMode(led2, OUTPUT); pinMode(whiteled, OUTPUT); pinMode(led3, OUTPUT); pinMode(led4, OUTPUT); pinMode(whiteled2, OUTPUT); pinMode(ir_sensor, OUTPUT);

myservo.attach(9); // Let servo attach pin 9 }

void loop() {

// This section controls the warning lights and the boom barriers: int val; val = analogRead(ir_sensor); if (val > 10) { digitalWrite(whiteled, LOW); digitalWrite(whiteled2, LOW); {digitalWrite(led,HIGH); digitalWrite(led4,HIGH); delay(400); digitalWrite(led,LOW); digitalWrite(led4,LOW); delay(400); { digitalWrite(led2, HIGH); digitalWrite(led3, HIGH); delay(400); digitalWrite(led2, LOW); digitalWrite(led3,LOW);

{myservo.attach(9); // attaches the servo on pin 9 delay(15);

(23)

} else { digitalWrite(led,LOW); digitalWrite(led4,LOW); {digitalWrite(led2,LOW); digitalWrite(led3,LOW); {digitalWrite(whiteled, HIGH); digitalWrite(whiteled2,HIGH); delay(1100); digitalWrite(whiteled, LOW); digitalWrite(whiteled2 LOW); delay(300);

{myservo.attach(9); // attaches the servo on pin 9 delay(15);

References

Related documents

Generally, a transition from primary raw materials to recycled materials, along with a change to renewable energy, are the most important actions to reduce greenhouse gas emissions

För att uppskatta den totala effekten av reformerna måste dock hänsyn tas till såväl samt- liga priseffekter som sammansättningseffekter, till följd av ökad försäljningsandel

Från den teoretiska modellen vet vi att när det finns två budgivare på marknaden, och marknadsandelen för månadens vara ökar, så leder detta till lägre

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Generella styrmedel kan ha varit mindre verksamma än man har trott De generella styrmedlen, till skillnad från de specifika styrmedlen, har kommit att användas i större

Närmare 90 procent av de statliga medlen (intäkter och utgifter) för näringslivets klimatomställning går till generella styrmedel, det vill säga styrmedel som påverkar

I dag uppgår denna del av befolkningen till knappt 4 200 personer och år 2030 beräknas det finnas drygt 4 800 personer i Gällivare kommun som är 65 år eller äldre i

På många små orter i gles- och landsbygder, där varken några nya apotek eller försälj- ningsställen för receptfria läkemedel har tillkommit, är nätet av