Development of a Parking Assistance for Model Vehicle
Abstract
A model vehicle has been developed further in order to perform automatic parking. Ultrasonic sensors and STM32 F4 Discovery microcontroller have been mounted. The driving assistant system can find the parking place then parallel parking is performed. The backward motion of the vehicle is carried out along two circular paths, which is followed by corrections of the position and orientation.
Full text
Recent Innovations in Mechatronics (RIiM) Vol. 3. (2016). No. 1-2. DOI: 10.17667/riim.2016.1-2/2. Development of a Parking Assistance for Model Vehicle Ákos Cservenák Robert Bosch Department of Mechatronics University of Miskolc Miskolc, Hungary [email protected] Abstract— A model vehicle has been developed further in order to perform automatic parking. Ultrasonic sensors and STM32 F4 Discovery microcontroller have been mounted. The driving assistant system can find the parking place then parallel parking is performed. The backward motion of the vehicle is carried out along two circular paths, which is followed by corrections of the position and orientation. Keywords—mechatronics, parking assistant, microcontroller, ultrasonic sensor, autonomous vehicle I. INTRODUCTION This paper deals with the further development of a model vehicle to perform automatic parking. Nowadays the driver assistant systems are widely used in high-class cars and also in middle-class ones, which can prevent the accidents [1] – [9]. Path of vehicle can be planed utilizing its kinematics. Due to its sizes microcontrollers are easy mountable on model vehicle. The main controller of the vehicle under development is an STM32F4 Discovery microcontroller [13] - [14]. Ultrasonic sensors, electronic speed controller (ESC) and steering servo have been mounted [10] - [12]. The program of the driving assistant has been written in C language using [15] - [19]. The autonomous vehicle can find the parking place then it moves along two circular arches in backward. Corrections are performed automatically, i.e., achieving parallel orientation and finding middle position. II. KINEMATICS OF PARALLEL PARKING Fig. 1. Limited movement of vehicle Fig. 2. Planning of path based on movement of rear axis The vehicle can move along designed path. Due to nonholonomic constraints the motion of the vehicle is determined by the planes of the wheels in ideal cases. A circular path is shown with constant 30° steering angle in Figure 1. The planned parking path, which consists of two arches, is illustrated in Figure 2. Geometrical sketches are needed for the path planning. Between the middle points of rear axis has been drawn a straight line. The parking involves two arches having opposite curvatures, and the joint point of two arches is determined in the planning process. The best location for this joint point is situated on the side line of the parked vehicle. The angle of steering wheels along the arches can be obtained using triangles (see Figure 2). The parking involves the following 4 steps: Finding parking place and stopping near the front vehicle Backward movements along two arches, approaching rear vehicle Parallel correction Finding middle position Rear vehicle Front vehicle Parking vehicle Parking vehicle Forward direction:
Recent Innovations in Mechatronics (RIiM) Vol. 3. (2016). No. 1-2. DOI: 10.17667/riim.2016.1-2/2. III. UNITS FOR FURTHER DEVELOPMENT THE MODEL VEHICLE The original model vehicle is commercially available, which can be seen in Figure 3 before further development. Fig. 3. The model vehicle before development The original motor controller was a mechanical speed controller, which cannot be applied for slow motion. Therefore an electronic speed controller (ESC) type Reely ESC 420 has been mounted, which can be seen in Figure 4. Fig. 4. Electronic Speed Controller (ESC) An electric motor with higher nominal voltage, higher motor turns and lower no-load speed is better applicable for slow motions. A Graupner Speed 500E DC motor was mounted in the vehicle, which has 12V nominal voltage and 12000 1/min no-load speed (Figure 5). Fig. 5. Graupner Speed 500E DC motor The electronic system of car is supplied by LiPo accumulator (LRP brand 4600 Hyper Pack type), it is preferable due to its very low self-charge and high-capacity (see Figure 6). Fig. 6. 4600mAh Capacity, LiPo type accumulator An ultrasonic sensor is used for sensing of environment. Due to price four HC-SR04 type ultrasonic sensors (Figure 7) have been mounted on the front, on the rear and on the side of car. Fig. 7. HC-SR04 Ultrasonic sensors The brain of the electronic system is a STM32 F4 Discovery type microcontroller, which can handle the signals of sensors as inputs and can control the ESC and steering servo as outputs. The microcontroller has an ARM based CPU, and it is illustrated in Figure 8. Fig. 8. STM32 F4 Discovery microcontroller IV. PROGRAMMING The steering servo and the ESC can be controlled by PWM signals. Before implementation the necessary PWM signal was tested with an RC (Radio-Controlled) system, the measured values are displayed on an oscilloscope shown in Figure 9. The distance between two pulses is 20ms, so the PWM signal is 50Hz.
Recent Innovations in Mechatronics (RIiM) Vol. 3. (2016). No. 1-2. DOI: 10.17667/riim.2016.1-2/2. Fig. 9. The PWM signal on oscilloscope for servo or ESC The width of a pulse can be changed between 1 and 2 ms, which are referring to the right and left steering angles. The zero steering angle is at 1.5 ms when the vehicle is moving along a straight line. The pulses and the steering angles are illustrated in Figure 10 and Figure 11, respectively. 1ms 1.5ms 2ms Fig. 10. Servo middleand far positions (a) Left steering (b) Middle steering (c) Right steering Fig. 11. Steering servo angles When the driving motor is also controlled by pulse 1ms, 1.5ms and 2ms, the vehicle is in backward motion, stopped, and forward motion, respectively. The ultrasonic sensors work with the following I/O signals: • The input of sensor signal: 10µs TTL trigger signal • The output of sensor signal: TTL PWL signal (5V->0V) The flow chart of parallel parking can be seen in Figure 12. In the first step the microcontroller checks the correct measurement of sensors. When any sensor is incorrect, or measures too big distance, the parking will not start. If the parking has been started, the car searches free parking place, then moves near the front vehicle. If the car has arrived near the front vehicle, it starts to move backward along two arches, shown in Figure 2. A parallel orientation correction is needed close to rear vehicle. If the car is in parallel orientation, the microcontroller finds middle position, and if it is necessary, the car will move to middle position. START Forward Forward Backward, right arch Backward, right arch Have all sensors measure correct? Y N Y N Y N Y N Is this a free park place? Have the vehicle arrived near front vehicle? Have the vehicle left the front vehicle? STOP Backward, left arch Forward, left arch Is the vehicle not too far (40-45cm) to rear vehicle? Y N Y N What direction has the vehicle? Forward, right arch Straigth Right Left Forward Which vehicle is closer to parking vehicle? Backward Middle position Closer to front vehicle Closer to rear vehicle Is the vehicle close (<10cm) to rear vehicle? Fig. 12. The flow chart of parking V. RESULTS Fig. 13. The autonomous vehicle
Recent Innovations in Mechatronics (RIiM) Vol. 3. (2016). No. 1-2. DOI: 10.17667/riim.2016.1-2/2. The autonomous vehicle can be seen in Figure 13. The steps of parking are illustrated in Figure 14. Fig. 14. The last 3 steps of parking VI. CONCLUSIONS A model vehicle has been developed further in order to perform automatic parking. The STM32F4 Discovery microcontroller, the ultrasonic sensors, the electronic speed controller (ESC) and the steering servo can control the motions of vehicle automatically. The path of vehicle was planned using kinematics of the parking model vehicle. The present parking assistant systems can be developed further for perpendicular or in garage parking. Other driver assistant systems, e.g. lane follower, adaptive cruise control development are also planned. ACKNOWLEDGEMENT This research was carried out in the framework of the Center of Excellence of Mechatronics and Logistics at University of Miskolc. REFERENCES [1] VDA, Verband der Automobilindustrie e.V.: Automation From Driver Assistance Systems to Automated Driving, 2015. [2] Meiyuan Zhao: Advanced Driver Assistant System, Threats, Requirements, Security Solutions, Intel Labs, 2015. [3] O. Gietelink, J. Ploeg, B. De Schutter, M. Verhaegen: Development of advanced driver assistance systems with vehicle hardware-in-the-loop simulations, Vehicle System Dynamics, vol. 44, no. 7, pp. 569–590, 2006. [4] John Golias, George Yannis and Constantinos Antoniou: Classification of driver-assistance systems according to their impact on road safety and traffic efficiency, Transport Reviews, VOL. 22, NO. 2, 179-196, 2002. [5] Sungwoo Choi, Clément Boussard, Brigitte d’Andréa-Novel: Easy Path Planning and Robust Control for Automatic Parallel Parking, Preprints of the 18th IFAC World Congress Milano, 2011. [6] Ankit Gupta, Rohan Divekar: Autonomous Parallel Parking Methodology for Ackerman Configured Vehicles, ACEEE International Journal on Communication, Vol 1, No. 2, 2010. [7] Young-Woo Ryu, Se-Young Oh, and Sam-Yong Kim: Robust Automatic Parking without Odometry using an Evolutionary Fuzzy Logic Controller, International Journal of Control, Automation, and Systems, vol. 6, no. 3, pp. 434-443, 2008. [8] SH. Azadi, Z. Takerkhani: Autonomous Parallel Parking of a Car Based on Parking Space Detection and Fuzzy Controller, International Journal of Automotive Engineering, Vol.2, Number 1, 2012. [9] Kleber de Oliveira Andrade, André Carmona Hernandes, Marcelo Becker: A RULE-BASED CONTROLLER SIMULATION FOR AN AUTONOMOUS PARALLEL PARKING OF A CAR-LIKE ROBOT USING LASER SENSORS, ABCM Symposium Series in Mechatronics - Vol. 5, Section VII - Robotics Page 1042, 2012. [10] Conrad.com-Conrad Electronic International GmbH & Co.: Electronic Drive Regulator ESC-420 Instruction Sheet, 2008, http://www.produktinfo.conrad.com/datenblaetter/225000249999/236975-da-01-en-ELEKTRON_FAHRTREGLER_ESC420.pdf [11] Graupner GmbH & Co.: Graupner SPEED 500 E Elektromotor [12] Raspberry PI Bolt: Ultrahangos távolságmérő Raspberry PI-hez, http://www.rpibolt.hu/termek/ultrahangos_tavolsagmero_raspberry_pihez__ajandek_extrak.html [13] STMicroelectronics: STM32F4DISCOVERYDiscovery kit with STM32F407VG MCU, http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419 [14] STMicroelectronics: STM32F405xx, STM32F407xx Datasheet, http://www.st.com/st-webui/static/active/en/resource/technical/document/datasheet/DM00037051. pdf [15] Darren Sawicz: Hobby servo fundamentals, 2008, https://www.princeton.edu/~mae412/TEXT/NTRAK2002/292-302.pdf [16] STMicroelectronics: STM32F3 and STM32F4 Series Cortex®-M4 programming manual, http://www.st.com/web/en/resource/technical/document/programming_ manual/DM00046982.pdf [17] STMicroelectronics: Description of STM32F2xx Standard Peripheral Library, http://www.st.com/st-webui/static/active/en/resource/technical/document/user_manual/DM000238 96.pdf [18] Tilen Majerle: Library 42Control RC servo with STM32F4, http://stm32f4-discovery.com/2014/10/library-42-control-rc-servostm32f4/ [19] Uwe Becker: Quellcode "C" Librarys und Beispiele für ATMega und STM32F4 CPUs: 72-HC_SR04-Library (STM32F4), http://mikrocontroller.bplaced.net/wordpress/?page_id=32