Steering Control of A Battery Operated Car

International Journal of Emerging Technology in Computer Science & Electronics (IJETCSE) ISSN: 0976-1353 Volume 13 Issue 4 –MARCH 2015. Steering Cont...
Author: Abel Lambert
1 downloads 0 Views 217KB Size
International Journal of Emerging Technology in Computer Science & Electronics (IJETCSE) ISSN: 0976-1353 Volume 13 Issue 4 –MARCH 2015.

Steering Control of A Battery Operated Car G.Joselin Retna kumar#, Shaurya Aryavir, Himanshu Kejriwal, Paaneri Moitra, Apurupa Putcha, J.Shealyn Jerusha #

Assistant Professor,Department Of Electronics And Instrumentation Engineering, SRM University, TN, India Students, Department of Electronics and Instrumentation Engineering, SRM University, TN, India

since the black becomes a few shades lighter by light falling on it. The direction and colour feature are rarely used in real time system for higher complex process. The edge feature has a drawback like it can’t eliminate impacts of high intensity change [9].

Abstract-The world is changing rapidly and so is technology.Since those days when everything was manually operated, we have come a long way. The advancements and the innovations in the field of automobile industry have given birth to battery operated cars, which are considered to be the future. In this paper, a system is proposed for steering control of a small sized singleseated, battery operated car. Thesystem consists of two unitsDecision making unit(DMU) and Control System Unit(CSU).DMU consist of a camera for capturing the image of the lane. The image is then processed in MATLAB and the output is fed to the CSU. The CSU consists of a microcontroller and the remote of the car. CSU takes the desired control action to keep the car within the lane. Keywords—thresholding,histogram, morphological operation



After the image processing algorithm is designed, a prototype of lane is constructed for the testing of the system. The construction of the lane is based on the factor that the two lanes should be clearly distinguished.The system is proposed to work only for a straight lane i.e. without any turn. However, it may the noted that this system did show positive results for minor turns. The selection of the camera is another vital point to be noted; features like frame rate and pixel intensity are to be considered. Here, UART acts as an interface for the transmission of data between microcontroller and MATLAB.PIC18F45K22 microcontroller is selected for the system. ThePIC microcontroller is programmed using MPLAB software. A DC motor is fixed in the front-drive axle of the car which is being controlled by L293D motor drive.



In the world, where road safety is a priority, many advanced intelligent transportation system have been designed for autonomous vehicle. This project aims in controlling the steering of a battery operated car in order to maintain the lane in which it is travelling. The position of the car on the lane can be acquired using a camera. The input video from the camera can be processed in MATLAB and decision regarding the direction in which the steering should be rotated can be implemented. The output of the MATLAB can be given to the microcontroller which can generate a signal to achieve the desired rotation of the steering in order to keep the vehicle within the lane. Hence, this system can help considerably in reducing the accident.

In the next sections, thedeveloped system has been described. Finally, thepaper is concluded in section IV.



Due to increase in road accidents caused by the negligence of the driver, this system has been designed. This system would work for the cases where a vehicle drifts out of the lane without the knowledge of the driver and meets an accident with a vehicle approaching in higher speed from behind; the system would help bring the car back to the centre of the lane.

The motive behind this lane detection concept is to set various parameters with an approximate model. The vital role of this system is that it features in real time. As to the difference between lane marking and road surface, many different approaches had been proposed, such as binarizing a region by grey scale, extractionedge, gradient direction or colour feature.Thegreyscale is the simplest of all to be computed, but its detection is affected by various other factors like light. Under high intensity of light, it cannot differentiate between black colour of the road and white colour of the lane



1. Camera and Adjustment A web camera of 2 mega pixel (video resolution) is used to detect lanes on the road. The installation of the camera depends on two features- height from the ground and angle of inclination with respect to the lanes. By adjusting these two


International Journal of Emerging Technology in Computer Science & Electronics (IJETCSE) ISSN: 0976-1353 Volume 13 Issue 4 –MARCH 2015. parameters, we can get desired camera range for the system. The power supply to the camera is USB powered. 2.

Background subtractions

Image processing •

It is a process of segmenting or extracting foreground object from a particularscene. Attaining the foreground objects would help in reducing the data to be processed and also identifies the important information related to the task under consideration. Frame differencing method is used to achieve the background subtractions in our project.

Image acquisition

Image acquisition is a simple procedure which can be done by a direct command called videoinput. However, it must be kept in mind that laptops these days have an inbuilt camera and an error could occur in choosing the desired camera. Here, the command is used as follows:-

background = getsnapshot (vid); background_bw = rgb2gray (background);

Vid = videoinput (‘winvideo’, 1,’YUY2_640x480’);

A variable named background is created which takes an image of the lane when car is started. Another similar variable frame can be defined to acquire images continuously as car moves in the lane. Image acquired by the frame variable is compared with background variable in order to compute the drift from the lane. Since, both images are in rgb, they are converted into gray for convenience.

Here, vid is the parameter defined by us to store the live video, ‘winvideo’ is the format, 1 is the device ID and ‘YUY2_640x480’ .The webcam only takes the YUY2 format data by default.Once the video is acquired its properties need to be defined. The below commands sets the property of video objects. set (vid, 'FramesPerTrigger', Inf); set (vid, 'ReturnedColorspace', 'rgb')

Binary image

Binary images are required for morphological operations. Binary image is a digital image that has only two possible values for every pixel i.e. 0 or 1.The successive images are first converted into greyscale and then into binary i.e. 0-255 is first converted into 0-32 and then into 0-1. Generally the foreground objects are made white in color and background as black.

Frames per trigger property specify the number of frames to be acquired each time the video source is defined. Here, it is set to infinity (inf) as we want to acquire frames until a stop command is given. Since, the acquired image is YUY2 format it needs to be converted into rgb for further processing [1].

Objectimage=im2bw (frame_bw, 0.7); Here, 0.7 depicts a level used for converting grey to binary. Pixels of the input image having intensity greater than this level are valued 1(white) and all other pixels are valued 0 (black).



Fig.1: Battery operated car




International Journal of Emerging Technology in Computer Science & Electronics (IJETCSE) ISSN: 0976-1353 0976 Volume 13 Issue 4 –MARCH 2015. Fig.2: Images- (a) color video image (b) binary image (c) (c greyscale image (d) object detection


Image Thresholding is a simple, yet effective, way of partitioning an image into a foreground andd background. This image analysiss technique is a type of image segmentation that isolates objects by converting grayscale scale images into binary images. Image Thresholding is most effective in images with high levels of contrast. Thresholding is done based on following factors-Intensity characteristics of the objects -Sizes of the objects -Fractions Fractions of an image occupied by the objects -Number umber of different types of objects appearing in an image •

Fig.3: Structuring element probing an image

Fig. 3 identifies how a structuring element probes an image. If area under probe has all 1’s than structuring element is said to fit the image, if any pixel of the area under probe is zero than structuring element hits the image. •

Morphological operations.

Object detection

The properties of objects present in the image are to be known for clearly identifying the objects .Commands in MATLAB like region props and ‘bwconncomp’ helps in achieving this.

Binary images have numerical imperfections which cannot be removed by simple Thresholdingtechniques. AfterThresholding images are distorted by noise and texture .Morphological operations aims in removing these imperfections and these operations can be extended to greyscale images.

cc = bwconncomp(objectimage); objectimage); x= regionprops(cc, 'basic');

St = strel ('disk', 40); St = strel ('square', 5);

mand specifies the properties of connected ‘bwconncomp’ command regions of an image. It enlists number of objects, objects connectivity, and pixelidlist and image size of the binary image. While the ‘regionprop’ command basic returns properties of objects like area, perimeteretc. and assigns these values in a structure like in C++.

Morphological techniques probe an image with asmall element or a template known as structuring element. Structuring element is a small binary image having values of each pixel as either one or zero. Structuring element can be square, diamond, disk, circle, rectangle etc. in shape .in the above command a structuringg element is defined along with its size. Size can signify area, diameter, length or breadth depending upon what is being used. Objectimage = imopen (Objectimage, St); Objectimage = imclose (Objectimage, St); Dilation and erosion are the basic morphological operations. Dilationsadd pixels to the boundaries of the object while erosion deletes pixels from the boundaries of the object. Pixel intensity which is added depends on the highest intensity of the pixel in structuring element. The above command ‘imopen’ performs erosion and dilation on the image while ‘imclose’ command does dilation and erosion.

Fig .4: Block lock diagram of image processing


PIC microcontroller

Here, PIC 18F45K22 microcontroller has been used. This microcontroller was chosen due to its easy C -language like programming and a maximum clock frequency of 48MHz,


International Journal of Emerging Technology in Computer Science & Electronics (IJETCSE) ISSN: 0976-1353 Volume 13 Issue 4 –MARCH 2015. speed on 3 km/h and can support a maximum weight of 30 Kg. It dimensions are 96x57x46 cm.

making it faster than 8051 microcontroller. It is based on RISC and Harvard architecture and hence is faster. It also has peripherals like inbuilt ADC, which is required to get signals from various sensors. Ease of programming a PIC makes it user friendly. Programs can be written in software like MPLAB and can easilybe loaded on to the microcontroller with the help of a USB cable.


Motor drive

The system here uses a DC motor. DC motors have polarity and their direction of rotation depends on the direction of current. A DC motor cannot be directly interfaced to a microcontroller as it requires much higher voltage and current. Here, L293D motor drive is used as it acts like an interfacing device between the microcontroller and the DC motor. It is built using a BC547 transistor.

Fig.5: Schematic diagram of a control system



In this paper we have developed a prototype for maintaining the vehicle on a particular lane. Image processing algorithm designed gave positive results in real time. Moreoverthe method developed for steering control gave rapid response and was accurate to a certain level. However the proposed model needs certain improvements before implementing on a real time car. Parameter like the force required to achieve desired rotation of steering should be calculated precisely. Likewise, the proposed model is only tested for straight lanes. On experimenting with smaller turns and minute objects the system gave positive results.

5.Working of the system The USB camera is connected to a laptop which has MATLAB software. The Image Processing Tool box (IPT) is used to execute image acquisition as described in the DMU part above. The outputs are connected to a microcontroller using a universal serial bus. The PIC 18F45K22 microcontroller is programmed in MPLAB to execute the commands generated by image processing. This microcontroller is placed under the seat of the car, from where a connected to the motor drive is made. The motor drive interfaces the microcontroller and the DC motor. The DC motor is connected to the axle of the front-wheels and it moves according to the signal generated by the microprocessor, in turn moving the axle, connected to both steering wheel and the front wheels.

ACKNOWLEDGMENT Firstly, we would like to thank SRM University for giving us the opportunity to prepare the project. If it were not for them, we wouldn’t have realized our caliber in this domain. Secondly, we would like to thank the Head of the Department, Department of Electronics and Instrumentation Engineering, SRM University, to give us enough time to prepare the project without putting any pressure.

The car is started and when it reaches the road where lane has to be followed, the driver switches on the system by keeping the car at the center of the lane. The first image captured is made the background i.e. the reference image for further captures. The further images are captured and compared to the background image, and deviation from the center of the lane is observed. This methodology can also be used for deviations in the road. The signal is then transferred to the microcontroller, which then positions the front-drive axle in a way that it follows the lane.

Finally, this project wouldn’t have been possible without the mental and financial support of our parents.


The single seat car used in this project is a battery operated car. It runs on 6V-4.5AH airtight dry type accumulator cell. The motor used in it is a 6V-15W DC motor. The battery is rechargeable and uses a charger of input AC220V, 50Hz and output 6V, 500MA. It runs at a maximum



D. Renshaw, P. B. Denyer, G. Wang, and M. Lu (1990). “ASIC image sensors”. IEEE International Symposium on Circuits and Systems 1990.


Enkelmann, W., Struck, G., and Geisler, J. 1995. ROMA-A system for model based analysis of road markings. Intelligent Vehicles ’95 Symposium, Sept. 25-26, 1995, Detroit/MI, pp. 356-360.

International Journal of Emerging Technology in Computer Science & Electronics (IJETCSE) ISSN: 0976-1353 Volume 13 Issue 4 –MARCH 2015. 3.

Heimes, F., Fleischer, K., and Nagel, H.-H. 2000. Automatic generation of intersection models from digital maps for vision-based driving on innercity intersections. IEEE Intelligent Vehicles Symposium, IV 2000, Oct. 3-5, 2000, Dearborn/MI, pp. 498-503


K. Z. Liu, T. Kanahara.”Steering control of vehicle by discontinuous control approach” Proceedings of American Control Conference, Arlington, VA June 25-27, 2001.


Jianfeng Wang; FangdeGu; Chao Zhang; Guanzhe Zhang; "Lane boundary detection based on parabola model," IEEE International Conference on Information and Automation (ICIA), pp.1729-1734, 2023 June 2010.


Qing Lin; Youngjoon Han; Hernsoo Hahn; , "Real-Time Lane Departure Detection Based on Extended Edge-Linking Algorithm," Second International Conference on Computer Research and Development, , pp.725-730, 7-10 May 2010 SHAURYA ARYAVIR, HIMANSHU KEJRIWAL, PAANERI MOITRA, APURUPA PUTCHA, J. SHEALYN JERUSHA are students perusing Electronics and Instrumentation in SRM University. Mr. G. Joselin Retna Kumar – An assistant professor in Department of Electronics and Instrumentation Engineering, SRM University.


Suggest Documents