tag:blogger.com,1999:blog-67777250270790032442024-03-05T00:34:31.438-08:00Engineer`s LaboratoryIf science is all about observation, then, to discover something is to observe things as it is(in its own form) and to invent something is like observing a thing with combination of several things... so to invent things you need imagination(to obtain feasible and stable combination) and knowledge (to analyze the result of combinations)
---Sriram EmaroseDhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-6777725027079003244.post-49668382423523880432015-09-17T01:01:00.000-07:002015-09-17T01:01:52.289-07:00Augmented Reality Library for MATLAB<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
I have developed a simple Augmented Reality library in MATLAB. By using this library, anyone with no knowledge about AR can implement the functionalities of AR in MATLAB easily without any codings. <br />
<br />
The only requirements from the user are,<br />
<br />
<div style="text-align: center;">
</div>
<ul>
<li style="text-align: justify;">1. MATLAB R2014a or greater</li>
<li style="text-align: justify;">2. Target / Trigger Image</li>
<li style="text-align: justify;">3. Overlay Image / Video</li>
<li style="text-align: justify;">4. Image Acquisition Device</li>
</ul>
<div style="text-align: justify;">
The video demonstration of the library can be found in the below video,</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/71iv6mrAolc/0.jpg" src="https://www.youtube.com/embed/71iv6mrAolc?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The library file can be downloaded from <a href="http://in.mathworks.com/matlabcentral/fileexchange/53046-augmented-reality-library-for-matlab" target="_blank">this link</a> .</div>
<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: justify;">
<b>Implementation</b>:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<ul>
<li>Download the file and change the MATLAB path to the file path</li>
<li>Call the function "ARinvoke" with appropriate arguments to render AR</li>
</ul>
<ul>
<li><b>Syntax</b> (type in MATLAB command line):</li>
<ul>
<li>ARinvoke('TargetImagePath', 1/2, 'OverlayObjectPath', 'ImageAcquisitionDeviceName', Device number);</li>
</ul>
<li>Here, the second argument (1/2) means,</li>
<ul><ul>
<li>1 for image overlay over the target image</li>
<li>2 for video overlay over the target image</li>
</ul>
</ul>
</ul>
<div>
<br /></div>
<div>
<ul>
<li><b>Example:</b></li>
<ul><ul>
<li>ARinvoke('C:\targetimage.jpg',1,'C:\overlayimage.jpg','winvideo',1); // second argument - 1 -> overlay image</li>
<li>ARinvoke('C:\targetimage.jpg',2,'C:\video.avi','winvideo',1); // second argument - 2 -> Overlay video</li>
</ul>
</ul>
</ul>
<div>
<br /></div>
</div>
<div>
<ul>
<li>Device name (winvideo) is the webcam name in windows. You can use any camera of your choice. Use "imaqhwinfo" for list of cameras available in your device</li>
<li>Device number (1) means internal camera of laptop and (2) is external USB webcam connected. </li>
</ul>
<div>
Currently, only 2D objects rendering has been done. I am about to work on 3D objects rendering and will update it once it is finished.</div>
</div>
<div>
<br /></div>
<div>
For now, only one image can be tracked. If anyone interested to track more than one image, feel free to contact me. </div>
<div>
<br /></div>
<div>
<i>Note:</i></div>
<div>
<i>The video being rendered (videooverlay) might be slow based on the processing speed of the Computer and MATLAB. I have increased the video framespersecond to 100 fps for better speed.</i></div>
<div>
<br /></div>
<div>
Try the library and have fun with your own custom images and videos.</div>
</div>
<div>
<br /></div>
</div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com3tag:blogger.com,1999:blog-6777725027079003244.post-14384639267160041952015-08-17T07:24:00.002-07:002015-08-17T07:24:56.663-07:00Gesture Controlled Robotic ARM using Microsoft Kinect and MATLAB<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="text-align: justify;">
Kinect sensor is one of the amazing product from Microsoft. It enabled me to implement my gesture controlled tasks very easily. I have built a 3 DOF robotic arm, which is to be controlled by human hand gestures. I have done this by obtaining my wrist coordinates from the skeletal structure acquired from the kinect sensor in MATLAB by calling functions of Kinect SDK in MATLAB. Once tracking of my arm coordinates has been done, the coordinate system of the robotic arm can be calibrated to the X and Y axis of the wrist coordinates. The control signal from the MATLAB is sent to the servo motors of the Robotic ARM through the Aduino-MATLAB interface.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtqzj0zBFRBFw1ceWqbrhWEFzL70nUBoeNk_4DOJgnD_P9ueEQfxbuQWhbiwZKzF6EFt0cwXl-lsVezly9INAhchFc5EINCWVISxOlLHBzoAbEETG35v0q40h1Cx7A3AOBshpOKUdNWLKG/s1600/Picture1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtqzj0zBFRBFw1ceWqbrhWEFzL70nUBoeNk_4DOJgnD_P9ueEQfxbuQWhbiwZKzF6EFt0cwXl-lsVezly9INAhchFc5EINCWVISxOlLHBzoAbEETG35v0q40h1Cx7A3AOBshpOKUdNWLKG/s320/Picture1.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
The demonstration of the gesture controlled robotic arm using Kinect can be seen below,</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div style="text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/zzZcWS4VZNs/0.jpg" src="https://www.youtube.com/embed/zzZcWS4VZNs?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<span id="goog_57635631"></span><span id="goog_57635632"></span><br /></div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com0tag:blogger.com,1999:blog-6777725027079003244.post-62938468121777463142015-04-04T12:45:00.000-07:002015-04-04T13:04:54.318-07:00Vision Guided Robot- Video Processing with BeagleBone Black and OpenCV C++<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
This is what kept me really busy for two months!. As I was new to BeagleBone Black and to Linux operating system, I struggled a bit during the starting stage of the project. But excellent <a href="http://derekmolloy.ie/tag/beaglebone-black/" target="_blank">tutorial of Dr.Derek Molly</a> helped me a lot with the BeagleBone Black. (This project was done as a part of the Texas Instruments Innovation Challenge)</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I was aiming at developing a simple robot that have the ability to bring the required object to the user. For this purpose, the robot was mounted with a robotic arm to grasp the object and a camera to sense the objects in its surroundings. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLldiT1nZ9ElUCwkt-U5_vGjX0ozYrXWlE9gFyz-vfkc3UigjLKoIrTeMEWPem-Hf3duS5NB7BVG6hJ3FMxz54XWBcsrSRZ2i1oTbtuWW75eLE78RPsqBDrluihDtCfX25CfjHRiNDNXsI/s1600/Picture1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLldiT1nZ9ElUCwkt-U5_vGjX0ozYrXWlE9gFyz-vfkc3UigjLKoIrTeMEWPem-Hf3duS5NB7BVG6hJ3FMxz54XWBcsrSRZ2i1oTbtuWW75eLE78RPsqBDrluihDtCfX25CfjHRiNDNXsI/s1600/Picture1.png" height="140" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Detailed description of the various parts of the robot and the operational demo can be seen in the following video,</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/cKxxPXA_2ok/0.jpg" frameborder="0" height="266" src="http://www.youtube.com/embed/cKxxPXA_2ok?feature=player_embedded" width="320"></iframe></div>
<br />
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
If you are very curious about the programming part of the robot, you can see the BeagleBone Black coding of the robot in <a href="https://github.com/SriramEmarose/RobotVisionWithBBB" target="_blank">my github repository</a>. I have tested the coding with the Ubuntu 14.04 LTS and latest version of Debian Operating System on the BeagleBone Black(BBB) and it worked fine. Object Recognition with OpenCV was faster in Ubuntu than in Debian (I have no idea why recognition is slower is Debian..trying to figure it out!!)</div>
<h4 style="clear: both; text-align: justify;">
<br />For those who would like to try this project, here are few tips,</h4>
<div class="separator" style="clear: both; text-align: justify;">
1. Boot your BBB with any OS of your choice following the instructions from <a href="http://beagleboard.org/getting-started" target="_blank">here</a> (I`ve installed Ubuntu)</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
2. Install OpenCV to the BBB (some OS comes with pre installed OpenCV) using the following command,</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
sudo apt-get install libopencv-dev</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
3. Download my code from <a href="https://github.com/SriramEmarose/RobotVisionWithBBB" target="_blank">here</a> to the BBB.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
4. I have used simple template matching to identify objects. So choose your object of interest and specify the path to the image in the program.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
5.Connect the webcam to the BBB. Make sure your webcam works with BBB first. I was initially testing with a webcam that worked fine with the computer but not with the BBB. So I have bought a new Logitech C70 webcam and it worked fine.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
6. Thats it!, Compile the code and run it. I have coded in such a way that the GPIO pins(14,15,16,17,18) of P8 header of the BBB will respond to the object based on its coordinates. and a log file of the processed video output will be stored as a media file in .avi format. If you are using Windows OS and Putty to develop the coding you can use Win SCP software access the logged file from your windows machine. Also if you are using lxde session in Debian OS, you can very well use imshow() function of OpenCV to see the realtime object recognition.</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<br /></div>
<br />
<br />
<br /></div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com1tag:blogger.com,1999:blog-6777725027079003244.post-20840236791388600502015-01-08T11:30:00.000-08:002015-01-08T22:42:30.633-08:00Face and Eye detection, Cornea(eye center) tracking using OpenCV<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
I was just thinking to work on eye gaze detection to estimate where a person is looking. So, as a first step, I need to detect the eyes and then the cornea/pupil. Since I have planned to execute the project in Android, I have done the coding in OpenCV, so that I can use the same function in Android.<br />
<br />
<b>Algorithm:</b><br />
<b><br /></b>
First, I have detected the face using haar cascade and extracted the ROI. Then segmented the left and right eye by rough calculations and within the segmented region of interest, I have used image gradients to locate and track the cornea/pupil.<br />
<br />
The demonstration of the above algorithm can be seen in the video. The work is still under progress and will share more about the techniques used later.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/2-RO2arlyic?feature=player_embedded' frameborder='0'></iframe></div>
<br /></div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com4tag:blogger.com,1999:blog-6777725027079003244.post-4591762710379764642014-12-25T10:08:00.000-08:002014-12-25T10:08:12.785-08:00Modelling the response of a differential drive robot in Simulink and controlling using finite state machines (Stateflow)<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
Recently, I have been thinking to
work on a model based approach to control the behavior of a robot in a simulated
environment which can also be immediately deployed to a hardware prototype of
the model. <o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
After going through a couple of
software, I have found that MATLAB Simulink and Stateflow would be the best
option for me to implement my idea. I have modelled my robot in Autodesk
Inventor and brought my model into MATLAB using Inventor – Simmechanics
interface.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
Once I have my robot model in
MATLAB, I have designed the kinematic equations for my model in simulink so as to control
its behavior in the simulated environment. The robot behavior is controlled by the logic created in Stateflow. The robot has Forward, Reverse,Left and Right states. Based on the velocity inputs given to the wheels of the robot, the state of the robot changes.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/0omZtonWx8M?feature=player_embedded' frameborder='0'></iframe></div>
<div class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
Inspired by MATLAB webinar - http://in.mathworks.com/videos/mobile-robot-simulation-for-collision-avoidance-with-simulink-90193.html</div>
</div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com0tag:blogger.com,1999:blog-6777725027079003244.post-65929248705159639992014-07-29T10:38:00.000-07:002014-07-29T10:38:45.363-07:00An Interactive book with Augmented Reality<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Augmented Reality!, a technology that is about to transform the world that we are looking today. Right from the business to advanced sciences, its impact can be predicted. Interacting with the physical world will be an amazing experience with the perfect combination of technologies like google glass and Augmented Reality(AR).<br />
<br />
Here is an example of such interaction which I have developed. The following video is a book powered with AR. As a student, we all would have experienced trouble while understanding a concept given in a book and wasted time in searching for related simple explanations in the internet. Now, with the Augmented reality and with the smart phones/google glass, it is possible to make learning more interesting. In the video, it can be seen that, once the camera sees the image/circuit in the book, it automatically overlays its corresponding video tutorial. This makes learning interactive and efficient.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="https://i.ytimg.com/vi/VrL_tWvax60/0.jpg"><param name="movie" value="https://www.youtube.com/v/VrL_tWvax60?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" /><param name="bgcolor" value="#FFFFFF" /><param name="allowFullScreen" value="true" /><embed width="320" height="266" src="https://www.youtube.com/v/VrL_tWvax60?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" type="application/x-shockwave-flash" allowfullscreen="true"></embed></object></div>
<br />
And finally, It is the image recognition that triggers the Augmented Reality as said in <a href="https://www.youtube.com/watch?v=frrZbq2LpwI" target="_blank">this</a> TED video.<br />
<br />
The software that I have used to develop this application include,<br />
<br />
1. Eclipse IDE<br />
2. Android SDK<br />
3. JDK 6<br />
4. Metaio SDK 5.3<br />
<br />
There are lot Augmented Reality SDKs like Vuforia SDK, Layar SDK, Metaio SDK etc, whose libraries can be used to develop AR applications along with the Android SDK. Even OpenCV4Android( along with Android SDK) can also be used with proper recognition algorithms, image/video overlaying and with proper initialization of the internal Android senors to develop such applications.<br />
<br />
<br />
<br />
<div>
<br /></div>
<br /></div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com0tag:blogger.com,1999:blog-6777725027079003244.post-46719525109095750262014-06-04T22:10:00.000-07:002015-01-08T22:45:30.498-08:00Image Processing in Android : A kick start to Augmented Reality<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
I never thought that I would be developing Android Applications a few months back. I sincerely thank <a href="http://fr.linkedin.com/pub/dr-pinnamaneni-bhanu/0/318/345" target="_blank">Dr. Pinnamaneni Bhanu Prasad</a> for introducing me into this interesting domain and guiding me through the process of step by step development of Augmented Reality applications.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
For those who have experience in image processing at a computer level interfaces, it would be very exciting if you see your algorithm running in your own android mobile ( I have experienced this on my very first app, and surely you`ll!). Moreover, you can take it along with you anywhere and you can demonstrate your algorithm to all your friends/family in any android mobile (which you cannot do with the computer level algorithm you used to develop previously, no matter how complex the algorithm is!).</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
So, I have decided to write some basic steps that can guide a newbie (new to android but with good programming skills) to develop their own android application for image processing. So, if you like to develop an app, all you need is INTEREST and PATIENCE and all it gives in return is FUN!(if you are a curious techie like me). I have provided some links which would be very useful for anyone to start over ( these links really helped me a lot than other tutorials on the internet...just my opinion!, you can find your own link that suits you well)</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The very first thing you need is an IDE with all libraries and tools of android. It is good to start with the <a href="http://developer.android.com/training/basics/firstapp/index.html" target="_blank">Android Developer portal</a>, where you can find tutorials about android and setting up any IDE (Eclipse, in my case) for android programming. But from my experience, manual setup of android tools/OpenCV to an IDE is very complicated and you may experience lot of compile errors even with minor directory changes. So, I strongly recommend you to use the <a href="https://developer.nvidia.com/tegra-android-development-pack" target="_blank">NVIDIA Tegra Android Development Pack</a> which will install all the necessary libraries along with OpenCV, thus making your work simpler. Install the Tegra android pack and go through the basic tutorial " Build your first App" in Android developer portal. This will give you a clear idea on various files/folders and its functionality in android development.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Once you are clear with the basics of the android development, different files used in it, accessing various sensors/hardware components, you can start looking after the example codes first and then you`ll be able to develop your own code upon analyzing the example codes.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<a href="http://www.tutorialspoint.com/android/android_hello_world_example.htm" target="_blank">This</a> is a good link with clear explanation of all required files to build a basic android app. After going through that tutorial, you can start with the image processing in android. To do this, click on the file menu, choose import and then choose existing android application. Now navigate to OpenCV-Android sample programs that you have in your computer (<a href="http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html" target="_blank">click here to see how to do</a>).</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
One must always keep in mind that the image processing methods are same in both android and windows platform. All you need to take care is, the input image and the output image format. The Android camera`s format is RGBA, which means the image what you will be acquiring will be in RGBA format and you need to return the image of same format after doing your processing.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
So,</div>
<div style="text-align: justify;">
1. Acquire RGBA image</div>
<div style="text-align: justify;">
2. Convert it into required format (RGB/Ycrcb/Grayscale etc)</div>
<div style="text-align: justify;">
3. Do all your image processing analysis as you would do in OpenCV</div>
<div style="text-align: justify;">
4. Convert the output image into RGBA</div>
<div style="text-align: justify;">
5. Return the output image to display</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
These are all the basic steps that one should always keep in mind while programming. Here is a video of my first android application in which I have implemented the following,</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
1. Thresholding (60/255)</div>
<div style="text-align: justify;">
2. Skin Detection and contour drawing over detected skin</div>
<div style="text-align: justify;">
3. Canny edge detection</div>
<div style="text-align: justify;">
4. Circle detection</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I have used a simple switch case to toggle between these four processing when a menu in the android is selected. Which means, all the processing and logics are same for both windows and Android. All you need to do is to think that 'it is easy to work on', spent some time in understanding the basics and eventually you will succeed.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/8AmUN91cvuQ?feature=player_embedded' frameborder='0'></iframe></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Once you know how it is done, then you can proceed with some advanced techniques and can do high level image processing with your own android mobile. And with further interest and patience, you can go through some tutorials about Augmented Reality and can start developing your own Augmented reality apps (as I am doing right now). Have FUN! and feel free to contact me for further assistance.</div>
<div style="text-align: justify;">
<br /></div>
</div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com6tag:blogger.com,1999:blog-6777725027079003244.post-62776263537892697482014-06-04T08:22:00.002-07:002014-06-04T08:22:42.801-07:00Object Recognition in MATLAB<div dir="ltr" style="text-align: left;" trbidi="on">
Recently, I was working in a conveyor belt setup, where, a camera was used to recognize the objects in the belt and an actuator to eject the unwanted objects. As I always like to simulate the algorithm before an actual implementation, I have used MATLAB for image recognition and based on the object classification made by MATLAB, the actuator will be actuated (to eject unwanted objects).<br />
<br />
For simulation purpose, I have established serial communication between MATLAB and Proteus ISIS ( where I can have microcontroller, LEDs, Actuators etc). I have used a microcontroller of my choice and enabled its serial receive pin, so that it can receive the data that MATLAB transmits. MATLAB recognizes a known object by matching its SURF features and serially transmit a unique character/integer for each object. The microcontroller is coded in such a way that, if a specific character/integer is found in the receive buffer, then the actuator will be actuated. <br />
<br />
Below shown is a simulated video of a conveyor belt setup. The video was taken using a 2MP cellphone camera. LEDs were interfaced with the microcontroller in Proteus ISIS to check the image recognition algorithm developed in MATLAB ( Every object has its own LED interfaced). Microcontroller coding was done in Keil and the .hex file is dumped into the simulated microcontroller in Proteus ISIS.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/UEHDmCVO9hE?feature=player_embedded' frameborder='0'></iframe></div>
<div style="text-align: center;">
<br /></div>
<br />
The detection algorithm was a bit slow in the video used. However, with the use of Bluecougar-X-X120aG GigE camera, improvement in detection speed was observed. In addition to this, I have also tested the similar object recognition algorithm in OpenCV. By my experience in working with both MATLAB and OpenCV, the detection speed is remarkably high in OpenCV when compared to MATLAB<br />
<br />
</div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com0tag:blogger.com,1999:blog-6777725027079003244.post-36284810100964133032014-02-05T00:29:00.000-08:002015-04-10T22:27:31.680-07:00Image matching in MATLAB<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Image matching- which means comparing two images for identical features. Often its practical usages are biometric applications such as finger print identification, Iris matching etc. Two images matches when their features coincides and these feature could be edges, corners, blobs, color, shape etc. By identifying these specific features in an image and comparing it with the features of other image, we can determine whether the images matches or not. Below shown is a demonstration of the image matching in the application of finger print recognition in MATLAB,</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="https://i1.ytimg.com/vi/mVb_IF7e_Yc/0.jpg" height="266" width="320"><param name="movie" value="https://www.youtube.com/v/mVb_IF7e_Yc?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" /><param name="bgcolor" value="#FFFFFF" /><param name="allowFullScreen" value="true" /><embed width="320" height="266" src="https://www.youtube.com/v/mVb_IF7e_Yc?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" type="application/x-shockwave-flash" allowfullscreen="true"></embed></object></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
In this program, the number of edges in the image1 is compared with that of the number of edges in the image2. If the image matches, the GUI returns a 'Match' dialogue box.<br />
<br />
Algorithm:<br />
<br />
1. Load the image into MATLAB<br />
2. Convert to grayscale image<br />
3. Apply the edge detector of your choice after removing noises, if any.<br />
4. Create a copy of this image for comparison (say img1 and img2)<br />
5. Now traverse through the every pixel of both the images using a looping statement,<br />
6. And, check the pixel value at the corresponding pixel<br />
7. If the comparison percentage if greater than certain percentage( say 90, as per your wish), then the finger prints matches, else, the finger prints are not a match<br />
<br />
<br />
<br />
Note: This not the exact way how the conventional biometric scanners work, but, this method can be used for rough matching purpose<br />
<br />
<br />
<br /></div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com1tag:blogger.com,1999:blog-6777725027079003244.post-48036746908888612132013-12-25T01:20:00.000-08:002014-06-04T08:25:05.582-07:00H Bridge simulation in NI multisim<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<div class="MsoNormal" style="text-align: justify;">
H Bridge configuration has many applications in controlling
a motor. Generally, a motor can be either switched ON or OFF(uni directional
rotation) based on the needs and the direction of rotation depends on the
polarity. But, in the field of Robotics and Medical applications, a single motor
must have the ability to rotate in two directions(clockwise and anti clockwise).
For this purpose, an H bridge configuration is preferred. As the name
indicates, the circuit will be in the shape of alphabet “H”. The motor is made
to rotate in two directions by changing the polarity of the motor.</div>
<br />
<div class="MsoNormal">
<!--[if gte vml 1]><v:shapetype id="_x0000_t32" coordsize="21600,21600"
o:spt="32" o:oned="t" path="m,l21600,21600e" filled="f">
<v:path arrowok="t" fillok="f" o:connecttype="none"/>
<o:lock v:ext="edit" shapetype="t"/>
</v:shapetype><v:shape id="_x0000_s1030" type="#_x0000_t32" style='position:absolute;
margin-left:270pt;margin-top:96.85pt;width:0;height:51.8pt;z-index:251662336'
o:connectortype="straight"/><![endif]--><!--[if !vml]--><span style="height: 71px; margin-left: 359px; margin-top: 128px; mso-ignore: vglayout; position: absolute; width: 2px; z-index: 251662336;"><img height="71" src="file:///C:/DOCUME~1/ADMIN/LOCALS~1/Temp/msohtmlclip1/01/clip_image001.gif" v:shapes="_x0000_s1030" width="2" /></span><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_s1029"
type="#_x0000_t32" style='position:absolute;margin-left:230.25pt;margin-top:96.85pt;
width:39.75pt;height:0;z-index:251661312' o:connectortype="straight"/><![endif]--><!--[if !vml]--><span style="height: 2px; margin-left: 306px; margin-top: 128px; mso-ignore: vglayout; position: absolute; width: 55px; z-index: 251661312;"><img height="2" src="file:///C:/DOCUME~1/ADMIN/LOCALS~1/Temp/msohtmlclip1/01/clip_image002.gif" v:shapes="_x0000_s1029" width="55" /></span><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_s1028"
type="#_x0000_t32" style='position:absolute;margin-left:152.25pt;margin-top:96.85pt;
width:39.75pt;height:0;z-index:251660288' o:connectortype="straight"/><![endif]--><!--[if !vml]--><span style="height: 2px; margin-left: 202px; margin-top: 128px; mso-ignore: vglayout; position: absolute; width: 55px; z-index: 251660288;"><img height="2" src="file:///C:/DOCUME~1/ADMIN/LOCALS~1/Temp/msohtmlclip1/01/clip_image002.gif" v:shapes="_x0000_s1028" width="55" /></span><!--[endif]--><!--[if gte vml 1]><v:oval id="_x0000_s1027"
style='position:absolute;margin-left:192pt;margin-top:79.6pt;width:38.25pt;
height:36pt;z-index:251659264'>
<v:textbox>
<![if !mso]>
<table cellpadding=0 cellspacing=0 width="100%">
<tr>
<td><![endif]>
<div>
<p class=MsoNormal align=center style='text-align:center'>
<b
style='mso-bidi-font-weight:normal'>M<o:p></o:p></b></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:oval><![endif]--><!--[if !vml]--><span style="height: 54px; margin-left: 255px; margin-top: 105px; mso-ignore: vglayout; position: absolute; width: 57px; z-index: 251659264;"><br /></span><!--[endif]--><!--[if gte vml 1]><v:shape
id="_x0000_s1026" type="#_x0000_t32" style='position:absolute;margin-left:152.25pt;
margin-top:28.6pt;width:0;height:68.25pt;z-index:251658240' o:connectortype="straight"/><![endif]--><!--[if !vml]--><span style="height: 93px; margin-left: 202px; margin-top: 37px; mso-ignore: vglayout; position: absolute; width: 2px; z-index: 251658240;"><img height="93" src="file:///C:/DOCUME~1/ADMIN/LOCALS~1/Temp/msohtmlclip1/01/clip_image004.gif" v:shapes="_x0000_s1026" width="2" /></span><!--[endif]--> </div>
<div class="MsoNormal">
Look at the following connections, </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqpwPak6SvvkHJ6aN7k_nDT3u0JPYktAs4VxO0lK8yqnZ2rdhDWcNPwAsmdc2OVavwNwCDVFTtD7VcabjFTq-Y4b6ETmIXsyAhg_2fSYzoGRAWk-EiLxhpgMgLKSftlhogmeI1Ogdu1e6o/s1600/Picture2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqpwPak6SvvkHJ6aN7k_nDT3u0JPYktAs4VxO0lK8yqnZ2rdhDWcNPwAsmdc2OVavwNwCDVFTtD7VcabjFTq-Y4b6ETmIXsyAhg_2fSYzoGRAWk-EiLxhpgMgLKSftlhogmeI1Ogdu1e6o/s1600/Picture2.png" height="320" width="202" /></a></div>
<div class="MsoNormal">
Here, the direction of rotation of the motor varies with the
change in its polarity. A simulation of the above schematic is shown below,</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/pa8LoRC8GnU?feature=player_embedded' frameborder='0'></iframe></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="MsoNormal">
A combination of these two schematic gives a H Bridge
circuit and the switching between polarities is done using the transistors(electronic
switches) as shown below,</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV_EgfIgB5vkXQ1CtalsPdoOEjSUK-Z8FMiAdgFwp7g76LDla9JhwgDVsag6HTP2L4oYF9PIjm3kdo5h7HgWkx5-lxvZCwQ1Y2iGwSkUJ8lZdGHDRf1m3AbvlCRUhdwKVBYqkAb55N64ix/s1600/Picture1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV_EgfIgB5vkXQ1CtalsPdoOEjSUK-Z8FMiAdgFwp7g76LDla9JhwgDVsag6HTP2L4oYF9PIjm3kdo5h7HgWkx5-lxvZCwQ1Y2iGwSkUJ8lZdGHDRf1m3AbvlCRUhdwKVBYqkAb55N64ix/s1600/Picture1.png" height="320" width="247" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="MsoNormal">
From the above circuit, it can be seen that when the switches(SW1
and SW3) closed, the motor will be in one polarity and when the switches(SW2
and SW4) are closed while the other switches are open, the motor will be in
another polarity. And this is how an H Bridge circuit works and the transistors
are used as the switches. Below shown is
the simulation of the H Bridge circuit in NI multisim,</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/GbOWmvkRfIs?feature=player_embedded' frameborder='0'></iframe></div>
<div class="MsoNormal">
Here, when the gate is ON, the MOSFET is turned ON, hence
forms a closed circuit and the motor receives the polarity based on the above
explanations. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
</div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com0tag:blogger.com,1999:blog-6777725027079003244.post-23092722156410569252013-12-08T00:36:00.000-08:002014-06-04T08:27:10.505-07:00Making of my Autonomous Vehicle<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<div class="MsoNormal">
I have built an Autonomous Vehicle as a part of my final
year project, which was sponsored by “Analog Devices, Inc”.The vehicle have the
ability to move from one point to another point based on the GPS coordinates of
both points and also plots the path it travels in google maps. In order to
avoid obstacles in its path, the vehicle uses a grid of sensors that includes
laptop based RADAR, camera, proximity sensors. Following are few snapshots of
the prototype that was built (camera is not shown in the picture),<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="text-align: center;">
Front view</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKnZ8537ZZMFoNQL6s_tlBVQowks_Mt7Y6qgHk0a7tSs9X6nAh-azD65_89AdnDDaBob5GpFZ2MuIDHM-ima4RuSB1TGm0zbkquNU67KxBDChpOl8sFnIauMD0-tAy9X8CD_4uUPALJr9k/s1600/main.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKnZ8537ZZMFoNQL6s_tlBVQowks_Mt7Y6qgHk0a7tSs9X6nAh-azD65_89AdnDDaBob5GpFZ2MuIDHM-ima4RuSB1TGm0zbkquNU67KxBDChpOl8sFnIauMD0-tAy9X8CD_4uUPALJr9k/s1600/main.jpg" height="304" width="320" /></a></div>
<div class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Side view</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgorxEk8aZHMghTKxCAHvSOuV-Fp8J9Qv50SihnH5kZwnyP2-fpX6h4mYtN2TM2cuS2F7AQ2jw7uTFRio7xagxjsn1SSQ3ey9FaJlb7-fdlcoWX_-KoqFgNNRmXcFRRsQ5SExrvYy6PpLpV/s1600/main1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgorxEk8aZHMghTKxCAHvSOuV-Fp8J9Qv50SihnH5kZwnyP2-fpX6h4mYtN2TM2cuS2F7AQ2jw7uTFRio7xagxjsn1SSQ3ey9FaJlb7-fdlcoWX_-KoqFgNNRmXcFRRsQ5SExrvYy6PpLpV/s1600/main1.jpg" height="242" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Here are some videos of making of my Autonomous Vehicle,</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div style="text-align: center;">
Initial obstacle avoidance algorithm testing 1 - outdoor</div>
<div style="text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/t6ktiZWRgG0?feature=player_embedded' frameborder='0'></iframe></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Initial obstacle avoidance algorithm testing 2 - outdoor</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/KDBmylaXA4o?feature=player_embedded' frameborder='0'></iframe></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Optimized algorithm testing 1 - outdoor</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/rw0H3ivc6KU?feature=player_embedded' frameborder='0'></iframe></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Optimized algorithm testing 2 - indoor</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/QttCEMyGnNY?feature=player_embedded' frameborder='0'></iframe></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Testing after changing vehicle dynamics 1 (vehicle turning radius test)</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/oNSj1NI8kx4?feature=player_embedded' frameborder='0'></iframe></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Testing after changing vehicle dynamics 2 (vehicle turning radius test)</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/wsD-S8STtok?feature=player_embedded' frameborder='0'></iframe></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Testing after changing vehicle dynamics 3 + Acquiring GPS data of start and end points</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/xCi8ifaic3c?feature=player_embedded' frameborder='0'></iframe></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Image processing algorithm testing ( webcam+ MATLAB Simulink)</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/Gs4lOis7vpE?feature=player_embedded' frameborder='0'></iframe></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Plotted GPS data in google earth (while vehicle is moving)</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio6dcNPS7TEKKSHXBNRHylKdpGh-GagNiy7nQRzV2gYrpmqPhX-qbKZt5GkP5YWAesbRqHv7nnxmuGd8d-Q7lD6I-ntqvA5ZwGp8aMDEGe7hREanV7RtilKDBiR4luuEizkMbDiNgLhB-D/s1600/Picture1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio6dcNPS7TEKKSHXBNRHylKdpGh-GagNiy7nQRzV2gYrpmqPhX-qbKZt5GkP5YWAesbRqHv7nnxmuGd8d-Q7lD6I-ntqvA5ZwGp8aMDEGe7hREanV7RtilKDBiR4luuEizkMbDiNgLhB-D/s1600/Picture1.jpg" height="238" width="320" /></a></div>
<br />
<br />
<div style="text-align: center;">
Plotted GPS data in google earth (while vehicle is stationary)</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd5VyysFH9lMLa8nTUms0TSYr0A5sAIjOMx5QlqjrZaLwnLnMXq3ktXn7Btc8LOHQBKUZw-_K4cOWTc7tEn-qwN0hGUTXYaq9Isy0eIHju29K4cnojU7QjM8VCPwqK7V6R5CCB8UArqRld/s1600/Picture2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd5VyysFH9lMLa8nTUms0TSYr0A5sAIjOMx5QlqjrZaLwnLnMXq3ktXn7Btc8LOHQBKUZw-_K4cOWTc7tEn-qwN0hGUTXYaq9Isy0eIHju29K4cnojU7QjM8VCPwqK7V6R5CCB8UArqRld/s1600/Picture2.jpg" height="239" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
Preliminary model built to test the algorithms </div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX34bsDv7PyPqJqPr7BObEy1fgKZxItzV3jM_HmGJ2OFbLuUaBrVT-M2x4vKB3c83_XWKke4KTYAz918AKB3VXsotjL5MQWo0xBWw05TNiIkXz601zY6ikT_l7lDxhnkgi3jo0Ca_yX_MG/s1600/P3280177.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX34bsDv7PyPqJqPr7BObEy1fgKZxItzV3jM_HmGJ2OFbLuUaBrVT-M2x4vKB3c83_XWKke4KTYAz918AKB3VXsotjL5MQWo0xBWw05TNiIkXz601zY6ikT_l7lDxhnkgi3jo0Ca_yX_MG/s1600/P3280177.JPG" height="240" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlMoRytISJSckMAiCxaAPy9WR7Rf7kQDm_Hi4ID8EW7RHe3fPgU4y9EaJa6wz-H8Y7mpOgP-b13SxhKUwh2m0FUAYo9HyEWsHTv74GbT8x1tvZkd5DU9XUPf9x59IhihnSm9vvGg1nmqwq/s1600/P3280181.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlMoRytISJSckMAiCxaAPy9WR7Rf7kQDm_Hi4ID8EW7RHe3fPgU4y9EaJa6wz-H8Y7mpOgP-b13SxhKUwh2m0FUAYo9HyEWsHTv74GbT8x1tvZkd5DU9XUPf9x59IhihnSm9vvGg1nmqwq/s1600/P3280181.JPG" height="240" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com0tag:blogger.com,1999:blog-6777725027079003244.post-20070186899667095872013-12-06T10:37:00.000-08:002013-12-06T10:37:09.020-08:00Heart rate measurement in LabVIEW<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<br /><div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
This
is one of my project in which I have designed a transducer that can measure the
variations in oxygenated hemoglobin and deoxygenated hemoglobin ( simply known
as an oximeter).The sensor was developed based on the key principle that these
two parameters have two different optical spectra in the range of 500nm to
1000nm. Hence, two light sources of two different wavelength(red-660nm and
infra red-940nm) are used. A photo diode was used to sense absorption rate and
the output of the photo diode was obtained in the LabVIEW using a data aquisition
card(NI 6211). The photo plethysmograph(PPG)
waveform was obtained in LabVIEW by driving the leds using PWM signals of 25%
duty cycle. Hence, based on the PPG waveform, the heart rate(Beats Per Mintue)
was found. <o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
This
is the video of the PPG waveform obtained in the LabVIEW. Since ordinary
sensors was used, there were lot of noise interference in the reading and the
BPM was very fluctuating.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/oBIZCTLUgnE?feature=player_embedded' frameborder='0'></iframe></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
(the
PPG waveform in the video is a recorded measurement file of the actual
experiment)<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
This
is the PWM pulse which was generated to drive the LEDs from the LabIEW. LEDs
are switched alternatively at same duty cycle.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCO7XdGHciODgN2mWkRUA8mN0Pj7vHi4_z2iZjWXv_ef7JZOHulcHZy5WP0uM2VbRttPuP8WayYyVct3rfDhKzNki-4gz3cLoybyIKS3nO6ng_BMoKLvT1t7hJXK6LOP7Lm8KDcgNnyhJo/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCO7XdGHciODgN2mWkRUA8mN0Pj7vHi4_z2iZjWXv_ef7JZOHulcHZy5WP0uM2VbRttPuP8WayYyVct3rfDhKzNki-4gz3cLoybyIKS3nO6ng_BMoKLvT1t7hJXK6LOP7Lm8KDcgNnyhJo/s1600/2.png" height="180" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<br /><div class="MsoNormal" style="text-align: justify;">
Shown
below is the transducing part which I have developed in my college laboratory,<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS_Mhr8HK96h9QXOvOpRhsFo12dcgpQ1L7lYh0_uL3umaoEYR6NjjzQ_fZI7TrXPfjyHjaOrQMhXv7pp6GK8FgRkjXa1cebploE8YJcAwqB7s_W1de8vklKFHWRdd3y4jg_RgpY4IxqKYA/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS_Mhr8HK96h9QXOvOpRhsFo12dcgpQ1L7lYh0_uL3umaoEYR6NjjzQ_fZI7TrXPfjyHjaOrQMhXv7pp6GK8FgRkjXa1cebploE8YJcAwqB7s_W1de8vklKFHWRdd3y4jg_RgpY4IxqKYA/s1600/1.jpg" height="240" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<br /><div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
“Simulation”
is always a good idea before an actual execution of a project. I have simulated
the transducing circuit in NI Multisim and it helped me a lot in actual
implementation. Following is the video of the simulation. </div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/bztxB1_wL0Q/0.jpg"><param name="movie" value="https://www.youtube.com/v/bztxB1_wL0Q?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" /><param name="bgcolor" value="#FFFFFF" /><param name="allowFullScreen" value="true" /><embed width="320" height="266" src="https://www.youtube.com/v/bztxB1_wL0Q?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" type="application/x-shockwave-flash" allowfullscreen="true"></embed></object></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
I
have used the current source since the output of a photo diode is current and
used an I-V converter to convert it into voltage( since input of NI 6211 must
be in volts). Here I have also added a sample and hold circuit to hold one
led`s value while other is being sampled and vice versa. The manual switch in
the simulation was replaced with the control signal from the LabVIEW.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
Though the acquired results got some flaws, obtaining a biological parameter was really awesome!</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<br /><div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
<br /></div>
</div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com3tag:blogger.com,1999:blog-6777725027079003244.post-84853330469224780952013-12-05T09:00:00.001-08:002013-12-05T09:00:46.757-08:00 The Free Radicals<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span><div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;">Human body consists of n number
of feedback loops right from a single cell to the major parts of the body. Alteration to any of these cells, vessels or
parts, leads the regular bio feedback loop to collapse and in some cases, may
even results in death. These process often acts like a butterfly effect.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;">One of the major issue to
consider is our immune system and free radicals. Our body`s defense system
releases free radicals(a by-product of metabolic process of oxidation)to fight against viruses and bacteria. But the excess
free radicals produced due to pollution, smoking, stress, along with the indigenous
unterminated free radical chain tends to
steal(in order to get paired) electrons available in the body in every part of the tissue.
And this chain goes on until all the free radicals are perfectly bonded.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;">This is the root cause for
majority of heart disease, artery blockage and cancer since these free radicals
are more fond of electrons in the region of heart and brain. Unfortunately
there are no effective drugs have been developed so far to address this issue.
And since free radicals are essential, it cannot be terminated too. But the
excess free radicals bonded with the oxygen to form oxygen free radicals can be
reversed or neutralized with proper intake of glutathione peroxidase and anti
oxidants.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span></div>
<br />
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;">One of the impact of these excess
free radicals is that, its tendency to steal electrons from the DNA. If this process is
succeeded, the DNA is subjected to mutation and incase of pregnant women, it
could even damage the fetus. Thus the effective control of the free radicals
must be considered as a preventive step for proper health condition. To do so,
keep away from stress and pollution. Also consume anti oxidant rich foods.
Vitamin C, E and glutathione peroxidase can reverse the oxygen free radicals
into pure oxygen and also prevent excess free radicals and heart blockage. Hope
this information helps!!</span><o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;">(I have written this article for my college magazine during my third year of Engineering. These are my perception of free radicals and body chemistry. and I am not an expert in medicine or biochemistry)</span></div>
</div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com0tag:blogger.com,1999:blog-6777725027079003244.post-40967016092469509202013-12-04T01:05:00.000-08:002013-12-04T01:05:54.005-08:00Increasing the voltage levels of PWM signals<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
PWM signals are often used in
robotics for the purpose of controlling the DC motor speed and to drive the
servo motors. Most of the microcontrollers have the output voltage of 5V.
When the PWM signals are generated from
these controllers, the average output voltage for maximum duty cycle will be
around 3.3 to 4.2 V(approx). This voltage level cannot drive a 5 or 12V motor
efficiently. Hence the voltage level must be boosted with appropriate external
circuits.</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
Following is a simulation that demonstrates how to increase the voltage level of the PWM signals generated from a microcontroller. Here, I have used CCP module of PIC microcontroller to generate the PWM pulses. The DC motor is driven by the MOSFET based on the PWM signals. </div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/3uKpacCNsSo?feature=player_embedded' frameborder='0'></iframe></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
From the video, you can see the
voltage level from the microcontroller and the boosted voltage in the
oscilloscope. It can be noted that only
the amplitude is increased and the duty cycle remains unchanged. </div>
<div class="MsoNormal" style="text-align: justify;">
Voltage increase can also be seen by connecting a voltmeter across the motor terminals, as shown below,</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm81SbRrtZNEftc0SrUx0jbRAU6fO_6MByaGg_-eLh2-oCaFMBIYLM2zg9uGLpOfDCrhmcbPNRKUnTjS6zwLf_j8UbOlSYEa7ZDlXaxl0VpvMLy4p3AJPlu9uZGLneRa-19j3sNjJTn66Z/s1600/Picture1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm81SbRrtZNEftc0SrUx0jbRAU6fO_6MByaGg_-eLh2-oCaFMBIYLM2zg9uGLpOfDCrhmcbPNRKUnTjS6zwLf_j8UbOlSYEa7ZDlXaxl0VpvMLy4p3AJPlu9uZGLneRa-19j3sNjJTn66Z/s1600/Picture1.png" height="222" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
</div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com0tag:blogger.com,1999:blog-6777725027079003244.post-33883106180781936222013-11-10T09:46:00.000-08:002013-11-10T09:46:40.055-08:00Image processing based robot using MATLAB and Simulation using Proteus ISIS<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: center;">
<b>Build a robot using MATLAB</b></h2>
<div align="center" class="MsoNormal" style="text-align: center;">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
For the beginners, who are attempting to make an image
processing based robots, here comes few
steps to guide you through the process. Remember that the robots sees what
actually the programmer wanted it to see
by using a camera as its sensor along with proper image processing algorithms.
Usually it involves high computation and hence a normal microcontroller would
not be enough. So let us use MATLAB for processing the images and an ordinary
microcontroller to execute the commands from the MATLAB.<o:p></o:p></div>
<div class="MsoNormal">
As I always follow the KISS concept(Keep It Simple Stupid),
I will first explain how to control the motors from MATLAB using serial
communication(RS232). In the explanation, I have used the basic 8051
microcontroller to execute the command from the MATLAB(you can use any
controller of your choice). To reduce the time in setting up the hardware
assembly of motors and microcontroller, I have interfaced proteus ISIS and
MATLAB(since our aim is to check whether proper control commands are sent to
the controller based on the image processing algorithm developed). The
following video shows how the commands from MATLAB is received by the
controller via serial com port and which in turn controls the motors actions,<o:p></o:p></div>
<div class="separator" style="clear: both; text-align: center;">
<object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/Elrnf_TvLVU/0.jpg"><param name="movie" value="https://www.youtube.com/v/Elrnf_TvLVU?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" /><param name="bgcolor" value="#FFFFFF" /><param name="allowFullScreen" value="true" /><embed width="320" height="266" src="https://www.youtube.com/v/Elrnf_TvLVU?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" type="application/x-shockwave-flash" allowfullscreen="true"></embed></object></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
And now, we know how to control a motor from MATLAB. All we
have to do now is to develop a suitable image processing algorithm based on our
needs and to introduce the motor command function ‘fwrite()’ at appropriate
places.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 11.0pt;">Image
Processing:<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 11.0pt;">Let us consider an image is an MxN matrix. So,processing an
image is nothing but manipulating the values in the MxN matrix as per their
needs. The entire picture that can be seen from a camera is the Field Of
View(FOV) of the camera and the desired region in which the processing has to
be done(or a feature to be extracted) is known as the Region Of Interest(ROI).
There are lot of resources available in internet to learn image processing, but,
after gaining some basic knowledge about image processing, Please do think and
try to develop your own algorithm or just try to combine several algorithms and
check for your output(Am sure it will be more fun than just implementing an
already existing algorithm). <o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 11.0pt;">In the following video, I have used the lane detection sample
video of MATLAB and applied global thresholding on it. I have marked and
extracted the ROI from the entire FOV of the video. Let us assume, this ROI is
a few meters ahead of the robot in which obstacles has to be detected. The
threshold plot from the label matrix gives the obstacles on the road(search google
for label matrix and thresholding). The pink line indicates the preset
threshold value for obstacles and when the real time threshold exceeds the preset
value, it can be taken as an indication of an obstacle and appropriate motors
can be activated.</span><span style="font-size: 16px; line-height: 18px;">( this is where you have to use the motor commands).</span><span style="font-size: 12pt; line-height: 115%;"> Here, the white color is considered as an obstacle and black color indicates obstacle free area.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/unqvUwK3PbE?feature=player_embedded' frameborder='0'></iframe></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 11.0pt;">To know whether the direction of the obstacle, multiple ROIs
can be used(left and right ROI). So,
based on the direction of the obstacle, activate the respective motors. The
following MATLAB commands will capture the images from the selected camera,<o:p></o:p></span></div>
<div class="Default">
vid=videoinput('winvideo',1,
'YUY2_160x120'); <o:p></o:p></div>
<div class="Default">
preview(vid); <o:p></o:p></div>
<div class="Default">
pause(3); <o:p></o:p></div>
<div class="Default">
while(1) <o:p></o:p></div>
<div class="Default">
img=getsnapshot(vid); <o:p></o:p></div>
<div class="Default">
<br /></div>
<div class="Default">
% Do all image processing and analysis here
<o:p></o:p></div>
<div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: "Courier New";">end<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%;">‘img’ is the
image matrix and you can apply all your algorithms to it inside the while loop.
And, as usual, when you are aiming for higher accuracy, you may focus more on
the computation part and a better control loop for the motors(PID controlling
is often used most cases).<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Snap shots of the videos are given below,</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUPecKvLcnosnQsFXxo-4S-wvFA9ln6wyre6J3VRtJqAeiMq84OMPi4nXRSw8St2G2aPIHCna1S5-3RKNlpO5_tR8JuOU0DhUEvWifl_Iy-U34Dsba7Quh09s-QpsG94c-uOOsd3PPz2H1/s1600/11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUPecKvLcnosnQsFXxo-4S-wvFA9ln6wyre6J3VRtJqAeiMq84OMPi4nXRSw8St2G2aPIHCna1S5-3RKNlpO5_tR8JuOU0DhUEvWifl_Iy-U34Dsba7Quh09s-QpsG94c-uOOsd3PPz2H1/s1600/11.png" height="171" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe8zsC2gtH4bBh619l34A4wHlUg_lGY8XCL2Qwmadf0C4v8iog8lNWK6wGA8z3R_qRA8ePx5zdarfgsyxgkQkoPe8G8gNCzJRCOC8pEciwLCG6CNuIIAmgo1uXoHheSbJ8StjfRBn3Mm2j/s1600/22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe8zsC2gtH4bBh619l34A4wHlUg_lGY8XCL2Qwmadf0C4v8iog8lNWK6wGA8z3R_qRA8ePx5zdarfgsyxgkQkoPe8G8gNCzJRCOC8pEciwLCG6CNuIIAmgo1uXoHheSbJ8StjfRBn3Mm2j/s1600/22.png" height="170" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
<br /></div>
</div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com0tag:blogger.com,1999:blog-6777725027079003244.post-33176072398235515342013-07-19T11:45:00.000-07:002013-07-20T09:26:13.580-07:00Getting started with an Autonomous Vehicle<div dir="ltr" style="text-align: left;" trbidi="on">
<div align="center" class="MsoNormal" style="text-align: center;">
<br />
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Every technology can be understood
and recreated by anyone once they are clear with its fundamental operation. One
such technology I am going to deal with is the Autonomous vehicle/Robot. Most
of the beginners think (as I did when I was a beginner) that only master minded
Engineers and Scientists can develop a Robot or Vehicle that can move
autonomously(</span><span style="font-size: 16px; line-height: 18px;"> </span><a href="https://sites.google.com/site/cosc311s12/research-reports/r4-10-section-1/1i-tech-behind-autonomous-cars" style="font-size: 16px; line-height: 18px;">like this</a>)<span style="font-size: 12pt; line-height: 115%;">. Well, that is true if one is expecting 99% accuracy in operation
of that vehicle. But with lesser accuracy and with better knowledge in vehicle
control mechanism, one can build their own Autonomous vehicle. So,
here, I will be explaining how to make your own simple Autonomous vehicle.</span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><span style="background-color: white; font-size: 12pt; line-height: 115%;">Let us first consider an ordinary vehicle.
The vehicle control mechanism involves increasing/decreasing the vehicle`s
speed, braking and steering. The steering and motion of the vehicle is normally controlled by the user
who makes decision based on the vehicle`s environment, whereas in case of an
Autonomous vehicle there will be no user interaction, except for the marking of
the destination point that the vehicle must reach. </span></span><span style="background-color: white; font-size: 12pt;">Therefore, suitable
sensors must replace the human user.</span><br />
<div class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;">
<span style="font-size: 12pt;"><o:p></o:p></span></div>
</div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> The following pictures depict the functioning
of an ordinary vehicle with a human user on it and an Autonomous vehicle with
sensors and processor. <o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhifiunzL_-WlMzLnPXEwO7tKJmw5z67pIaq8Z5CuataAfDl1xZ-vRexg5HsgCgjOs4sR2JIhE8xgRWENJNAm27bphkn_6Iiagyz_hUoviPBvo04hElzOhMsz93XBSbXv1G_eIZm1TCJPe-/s1600/Slide2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhifiunzL_-WlMzLnPXEwO7tKJmw5z67pIaq8Z5CuataAfDl1xZ-vRexg5HsgCgjOs4sR2JIhE8xgRWENJNAm27bphkn_6Iiagyz_hUoviPBvo04hElzOhMsz93XBSbXv1G_eIZm1TCJPe-/s320/Slide2.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQHUWt5g2Vvse5crjLbU3u8iSlEgh2Wrrg5LTOEKlvWwICZhc1Q3hgbD2Iwtxab3oQyribvZNHbua-4TuFwkt2lkLtMSgeT21vCSosb19H5vjpm76ezz9B92a4yFlkMeCclzE1XGbnZJIc/s1600/Slide3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQHUWt5g2Vvse5crjLbU3u8iSlEgh2Wrrg5LTOEKlvWwICZhc1Q3hgbD2Iwtxab3oQyribvZNHbua-4TuFwkt2lkLtMSgeT21vCSosb19H5vjpm76ezz9B92a4yFlkMeCclzE1XGbnZJIc/s320/Slide3.JPG" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div align="center" class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
<v:f eqn="sum @0 1 0">
<v:f eqn="sum 0 0 @1">
<v:f eqn="prod @2 1 2">
<v:f eqn="prod @3 21600 pixelWidth">
<v:f eqn="prod @3 21600 pixelHeight">
<v:f eqn="sum @0 0 1">
<v:f eqn="prod @6 1 2">
<v:f eqn="prod @7 21600 pixelWidth">
<v:f eqn="sum @8 21600 0">
<v:f eqn="prod @7 21600 pixelHeight">
<v:f eqn="sum @10 21600 0">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
<o:lock aspectratio="t" v:ext="edit">
</o:lock></v:path></v:stroke></v:shapetype><v:shape alt="Description: E:\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide2.JPG" id="Picture_x0020_1" o:spid="_x0000_i1041" style="height: 275.25pt; mso-wrap-style: square; visibility: visible; width: 367.5pt;" type="#_x0000_t75">
<v:imagedata o:title="Slide2" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div align="center" class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: E:\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide3.JPG" id="Picture_x0020_2" o:spid="_x0000_i1040" style="height: 286.5pt; mso-wrap-style: square; visibility: visible; width: 382.5pt;" type="#_x0000_t75">
<v:imagedata o:title="Slide3" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image002.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Now lets start to built an
Autonomous vehicle. From the above two pictures, it is understood that the
designer of an autonomous vehicle must decide how to sense the obstacles around
the vehicle, How to move the vehicle from source to destination point while
deciding the appropriate path to be taken. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">The following flowchart shows the simple open loop architecture of an autonomous vehicle,<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkn7xkHEnoCSyR-PE0i3PfIx9c94PKqu7-yEq5mW1HjucML1K6Rxrf1Auc9thQP1LIpR-8ZYgeyK4fmhIEsSQeAtERKHSWXERX8NHaes9ctlzsNThiiRwiAUDcV92TxbtwLusqeXa1UREW/s1600/Slide4.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkn7xkHEnoCSyR-PE0i3PfIx9c94PKqu7-yEq5mW1HjucML1K6Rxrf1Auc9thQP1LIpR-8ZYgeyK4fmhIEsSQeAtERKHSWXERX8NHaes9ctlzsNThiiRwiAUDcV92TxbtwLusqeXa1UREW/s320/Slide4.JPG" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: E:\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide4.JPG" id="Picture_x0020_3" o:spid="_x0000_i1039" style="height: 351pt; mso-wrap-style: square; visibility: visible; width: 468pt;" type="#_x0000_t75">
<v:imagedata o:title="Slide4" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image003.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">To keep it simple, I am considering
an autonomous vehicle with following specifications,<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo1; text-align: justify; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Symbol; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Symbol; mso-bidi-font-size: 16.0pt; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; line-height: normal;">
</span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Obstacle detection using proximity sensor<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-align: justify; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Symbol; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Symbol; mso-bidi-font-size: 16.0pt; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; line-height: normal;">
</span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Navigation using GPS<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-align: justify; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Symbol; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Symbol; mso-bidi-font-size: 16.0pt; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; line-height: normal;">
</span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Battery powered vehicle(control using PWM and Relay
drives)<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="mso-list: l1 level1 lfo1; text-align: justify; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Symbol; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Symbol; mso-bidi-font-size: 16.0pt; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; line-height: normal;">
</span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Differential drive(skid steer)<o:p></o:p></span><br />
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Of course, if you are familiar with
image/signal processing you can use camera, LIDAR/RADAR for obstacle sensing.
Since this explanation is for beginners, I am not considering the on road rules
detection and path determination as it makes things more complicated.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">For clear understanding, the
vehicle construction is explained in 4 steps as follows,<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAn8rVhJNtAUURI7_z-mWLTgKyetVtdx5mqO2NMnRmROJilKLCwQ7mu5a-FVr4MyhC4vpS4MhtzRqHN4bLis2EH7pHh_JJsE60hyphenhyphenMTO_JYylsGZhLN6FxgxcmeAff6WFHh7C1Hq4hF5tvS/s1600/Slide5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAn8rVhJNtAUURI7_z-mWLTgKyetVtdx5mqO2NMnRmROJilKLCwQ7mu5a-FVr4MyhC4vpS4MhtzRqHN4bLis2EH7pHh_JJsE60hyphenhyphenMTO_JYylsGZhLN6FxgxcmeAff6WFHh7C1Hq4hF5tvS/s320/Slide5.JPG" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: E:\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide5.JPG" id="Picture_x0020_4" o:spid="_x0000_i1038" style="height: 351pt; mso-wrap-style: square; visibility: visible; width: 468pt;" type="#_x0000_t75">
<v:imagedata o:title="Slide5" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image004.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<b><u><span style="font-size: 16.0pt; line-height: 115%;">1.Vehicle control
mechanism:<o:p></o:p></span></u></b></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> Before designing the vehicle control mechanism
one must be aware of the maximum payload of that vehicle based on which the
components can be picked up. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">There are two ways by which the
vehicle can be controlled<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 2.0in; mso-add-space: auto; mso-list: l0 level1 lfo2; text-align: justify; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-font-size: 16.0pt; mso-bidi-theme-font: minor-latin;">1.<span style="font-size: 7pt; line-height: normal;"> </span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Fixed speed
control<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 2.0in; mso-add-space: auto; mso-list: l0 level1 lfo2; text-align: justify; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-font-size: 16.0pt; mso-bidi-theme-font: minor-latin;">2.<span style="font-size: 7pt; line-height: normal;"> </span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Variable
speed control<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">In<b> fixed speed control</b>, the
vehicle can be either moved(with a constant speed) or stopped. A simple relay
logic controller is enough to perform this type of control. You can either
build your own relay based controller for your vehicle or else you can buy a
relay shield to control the vehicle motors from the micro controller. Below
shown is the relay based motor shield and Arduino MCU. <o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4Cuj6XDVdaB0u0ISg9l6L-zOsj77GmsxuK2zp8fh_JS2888tDvAlyJ2HMSDeQuVvbCxlGszEZ3Zw0GpY60NutICoPPm5qp4NpRdZgx73U8MGbgd9iKesBrd-CeHWIImh4KExieVj-37VP/s1600/11.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="129" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4Cuj6XDVdaB0u0ISg9l6L-zOsj77GmsxuK2zp8fh_JS2888tDvAlyJ2HMSDeQuVvbCxlGszEZ3Zw0GpY60NutICoPPm5qp4NpRdZgx73U8MGbgd9iKesBrd-CeHWIImh4KExieVj-37VP/s320/11.jpg" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12pt; line-height: 115%;">Check for the motor driver`s data
sheet whether the current rating of the motors used falls within the range of
the driver being used or else you will end up frying the driver on
continuous usage. The following picture shows the sample connection between the
relay driver and the microcontroller,</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRRT0tRkai7NoS89xDk-gMhVBzsvt5S6SacP9Sh4LfJ93kPdUool4B_LRUO-0oAwcUejss00mzEVnUD4NlDNK-ukK-ocaWsjzgixNgbEk-lAhLHsKXYFJM5gihGkb5FwaqA6Vi2pHq_TH8/s1600/22.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRRT0tRkai7NoS89xDk-gMhVBzsvt5S6SacP9Sh4LfJ93kPdUool4B_LRUO-0oAwcUejss00mzEVnUD4NlDNK-ukK-ocaWsjzgixNgbEk-lAhLHsKXYFJM5gihGkb5FwaqA6Vi2pHq_TH8/s320/22.jpg" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12pt; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: D:\Sriram Disk\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide7.JPG" id="Picture_x0020_6" o:spid="_x0000_i1036" style="height: 275.25pt; mso-wrap-style: square; visibility: visible; width: 419.25pt;" type="#_x0000_t75">
<v:imagedata cropbottom="2660f" croptop="5461f" o:title="Slide7" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image006.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Logic sequence can be sent via the
microcontroller to the input of the relay driver to switch the motors ON/OFF as
well as to control their rotating direction.<o:p></o:p></span><br />
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">For eg: consider 10,11,12,13 pins of Arduino as input to the motor driver, </span><br />
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">10 - LOW</span><br />
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">11 - HIGH</span><br />
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">12 - HIGH</span><br />
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">13 - LOW</span><br />
By using the above sequence you can switch corresponding relays associated with input pins from Arduino. Likewise, you can try different input sequences for forward and reverse motions.</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">In <b>variable speed control</b> of the vehicle, MOSFETs can be used to
control the motors by passing PWM signals from the microcontroller. The two
types of MOSFETs available are the TTL driven and CMOS driven MOSFETs. The
former type can be directly interfaced with a processor/microcontroller since
most of the MCU provides TTL output. Below shown is the motor control circuit
using PWM signal from Arduino with TTL driven MOSFET,<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit-pNjSUjw44VeFufYL5Jf6Dig9QXSAQnIQx2GFg5JGcdS1Z1uv8y3VoWezeDluXR0rMrxV7JtfK_fSDVd-B7igjY9UpDVyFGyg87MpDMYXOk5Tvw9EO3zknQyXSStB11LNH2Jcyw86YkC/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit-pNjSUjw44VeFufYL5Jf6Dig9QXSAQnIQx2GFg5JGcdS1Z1uv8y3VoWezeDluXR0rMrxV7JtfK_fSDVd-B7igjY9UpDVyFGyg87MpDMYXOk5Tvw9EO3zknQyXSStB11LNH2Jcyw86YkC/s320/1.jpg" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Connect the Gate of the MOSFET to PWM pin of Arduino. By varying the duty cycle of that pin, you can control the MOSFET`s gate which in turn controls the motor`s speed. </span></div>
<div align="center" class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: D:\Sriram Disk\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide8.JPG" id="Picture_x0020_7" o:spid="_x0000_i1035" style="height: 230.25pt; mso-wrap-style: square; visibility: visible; width: 366pt;" type="#_x0000_t75">
<v:imagedata cropbottom="10083f" cropright="14284f" croptop="12463f" o:title="Slide8" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image007.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">However, this configuration works
fine only for few trials and causes permanent damage to the transistor on
prolonged usage. The reason is that, the transistor stays in linear region for
a long time before it reaches the saturation region. Thus the performance of
the MOSFET never reaches its optimum point which leads to over heating of the
MOSFET and you will end up frying the MOSFET(as I did) on further usage.<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXg9NLy6dUX4_VErw0oLe3032h9mpJT9EGtuD6EySmxcg1TKQ7S5wQURMb_yAbccUGaCIJPduArBBjjhnaJX6cXM4_9pV76psu5beg4eg7kdDouMci9ArwpL6FHBUO6uMG4e1pEBcPVai3/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXg9NLy6dUX4_VErw0oLe3032h9mpJT9EGtuD6EySmxcg1TKQ7S5wQURMb_yAbccUGaCIJPduArBBjjhnaJX6cXM4_9pV76psu5beg4eg7kdDouMci9ArwpL6FHBUO6uMG4e1pEBcPVai3/s320/2.jpg" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: D:\Sriram Disk\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide9.JPG" id="Picture_x0020_8" o:spid="_x0000_i1034" style="height: 181.5pt; mso-wrap-style: square; visibility: visible; width: 468pt;" type="#_x0000_t75">
<v:imagedata cropbottom="31648f" o:title="Slide9" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image008.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">For better understanding, the
linear and saturation region of a transistor can be compared to a human
sprinting and jogging respectively. One cannot sprint for a long time since he
deprives of energy while he can jog for a long time. And that’s why the MOSFET
gets damaged with direct TTL output. In order to avoid this problem, a buffer
can be added between the TTL output and the gate to improve the MOSFET`s
switching performance by decreasing the rise and fall timings(which provided
faster current sourcing and sinking). TTL output with buffer is shown below,<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUOR9WyvyR2QUnW_3OQrHxIxgFgHrSw3qUC7ISKJKeumfzaUlZGPzVvz8EXu3GXM2lxlf68ekWLR1WLiSyJrUmATBgRYxIJJ7TnwiuOPgN76yBF0vEIVXa1Ti_eZPZxpkQ3qsSB5FdEh5B/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUOR9WyvyR2QUnW_3OQrHxIxgFgHrSw3qUC7ISKJKeumfzaUlZGPzVvz8EXu3GXM2lxlf68ekWLR1WLiSyJrUmATBgRYxIJJ7TnwiuOPgN76yBF0vEIVXa1Ti_eZPZxpkQ3qsSB5FdEh5B/s320/3.jpg" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: D:\Sriram Disk\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide9.JPG" id="Picture_x0020_9" o:spid="_x0000_i1033" style="height: 172.5pt; mso-wrap-style: square; visibility: visible; width: 468pt;" type="#_x0000_t75">
<v:imagedata croptop="33328f" o:title="Slide9" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image008.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">If you are using a CMOS driven
MOSFET, the TTL output(0-5V) from a MCU cannot be used directly to switch the
gate ON/OFF, since voltage higher than 5V is required to turn the transistor
gate ON. In that case, the circuit shown below can be used,<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy74kb75aJa8g3B1ImvRIOwIhQ0d7FVEHYpffwZ7VBl1lnRCOWdFwf6XZEUMAGBiFEpb-aBKnOjdMeDGR0W6-usx2ih2ZctzCjrWpev6ntKV3TTjoDWRuibTzpfxQ2_DJh-F5HCV6-GFvf/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy74kb75aJa8g3B1ImvRIOwIhQ0d7FVEHYpffwZ7VBl1lnRCOWdFwf6XZEUMAGBiFEpb-aBKnOjdMeDGR0W6-usx2ih2ZctzCjrWpev6ntKV3TTjoDWRuibTzpfxQ2_DJh-F5HCV6-GFvf/s320/4.jpg" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div align="center" class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: D:\Sriram Disk\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide11.JPG" id="Picture_x0020_11" o:spid="_x0000_i1032" style="height: 237pt; mso-wrap-style: square; visibility: visible; width: 354.75pt;" type="#_x0000_t75">
<v:imagedata cropbottom="10502f" cropright="15859f" croptop="10783f" o:title="Slide11" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image009.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Here, the optocoupler and the diode
is used for protection purpose. R3 resistor(resistor connected to ground) is to
assist transistor turn OFF. R4 resistor( resistor connected to 3<sup>rd</sup>
terminal of optocoupler) must be low in order to avoid positive feedback(which
creates oscillations) and to obtain better transistor switching speed. Its
value can be calculated using the formula,<o:p></o:p></span></div>
<div align="center" class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">R= rise or
fall time/ 2.2C<sub>iss<o:p></o:p></sub></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">C<sub>iss </sub>is the sum of
capacitors from gate to drain and gate to source(this value can be obtained
from the MOSFET data sheet). Also keep in mind that, in CMOS configuration, the
V<sub>gate</sub> must be plus 5V higher than the V<sub>cc</sub> to prevent
damage against the MOSFET used.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> Multiple motors can be controlled with the
same circuit as shown below,<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy74kb75aJa8g3B1ImvRIOwIhQ0d7FVEHYpffwZ7VBl1lnRCOWdFwf6XZEUMAGBiFEpb-aBKnOjdMeDGR0W6-usx2ih2ZctzCjrWpev6ntKV3TTjoDWRuibTzpfxQ2_DJh-F5HCV6-GFvf/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy74kb75aJa8g3B1ImvRIOwIhQ0d7FVEHYpffwZ7VBl1lnRCOWdFwf6XZEUMAGBiFEpb-aBKnOjdMeDGR0W6-usx2ih2ZctzCjrWpev6ntKV3TTjoDWRuibTzpfxQ2_DJh-F5HCV6-GFvf/s320/4.jpg" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div align="center" class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: D:\Sriram Disk\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide12.JPG" id="Picture_x0020_12" o:spid="_x0000_i1031" style="height: 234.75pt; mso-wrap-style: square; visibility: visible; width: 356.25pt;" type="#_x0000_t75">
<v:imagedata cropbottom="10642f" cropright="15649f" croptop="11062f" o:title="Slide12" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image010.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">So now the first part in Autonomous
vehicle construction is completed. Now we can manually control the vehicle`s
acceleration, deceleration and braking with the MCU.<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq97LYUPiBxni4rkyynaGQDCjtfks25NPP2E1sBWEJxxYSZlC2h_g873KglKICNy4TgKVthjYNjMKJlncA8U4thwAcAijFpo06jwRzAQhNcYy1btxXDSXFWzK8PubC4Jkce_PDAcfcojnP/s1600/Slide14.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq97LYUPiBxni4rkyynaGQDCjtfks25NPP2E1sBWEJxxYSZlC2h_g873KglKICNy4TgKVthjYNjMKJlncA8U4thwAcAijFpo06jwRzAQhNcYy1btxXDSXFWzK8PubC4Jkce_PDAcfcojnP/s320/Slide14.JPG" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: D:\Sriram Disk\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide14.JPG" id="Picture_x0020_13" o:spid="_x0000_i1030" style="height: 351pt; mso-wrap-style: square; visibility: visible; width: 468pt;" type="#_x0000_t75">
<v:imagedata o:title="Slide14" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image011.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<b><u><span style="font-size: 16.0pt; line-height: 115%;">2.Obstacle
detection:<o:p></o:p></span></u></b></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">As I mentioned already, there are
several ways of detecting obstacles in robotics. To keep it as simple as possible for
beginners, I consider the ultrasonic proximity sensor(for eg: HC SR04). You can
google for Arduino interface code for the sensor module and the connection is
shown below,<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip9DyjEkph_yjm4QUiTHIuYLLuBRqvx4v5N48rJqEeXiIpb29yr5h0exKHr0JG-Q81QqL5skrnBpQl4aeZSsodrbBzK8WU77sqFAh4rz_0jKjdM-i7qvqD428WU72vfLBHLF-bQ8KQGPQS/s1600/Slide15.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip9DyjEkph_yjm4QUiTHIuYLLuBRqvx4v5N48rJqEeXiIpb29yr5h0exKHr0JG-Q81QqL5skrnBpQl4aeZSsodrbBzK8WU77sqFAh4rz_0jKjdM-i7qvqD428WU72vfLBHLF-bQ8KQGPQS/s320/Slide15.JPG" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div align="center" class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: D:\Sriram Disk\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide15.JPG" id="Picture_x0020_14" o:spid="_x0000_i1029" style="height: 234.75pt; mso-wrap-style: square; visibility: visible; width: 333pt;" type="#_x0000_t75">
<v:imagedata cropbottom="21705f" cropleft="4726f" cropright="14179f" o:title="Slide15" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image012.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">The obstacle sensing range can be
set as you wish and the sensor can be mounted over a servo motor to get 180
degree field of view. Don’t forget to use a pull up resistor to avoid garbage
values in the sensor readings. Also provide enough delay time in the servo
sweep so that the echo pulse can reach the receiver completely.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Now, we have a developed an
obstacle sensing mechanism and we already know how to control the vehicle
manually. Now all we have to do is to combine both the methods. <v:shape alt="Description: D:\Sriram Disk\Sriram\My lecture\How to make a simple Autonomous vehicle\Slide17.JPG" id="Picture_x0020_15" o:spid="_x0000_i1028" style="height: 351pt; mso-wrap-style: square; visibility: visible; width: 468pt;" type="#_x0000_t75">
<v:imagedata o:title="Slide17" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image013.jpg">
</v:imagedata></v:shape><o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTkO70ciPStDpfViGQtQh9S2bRNmpvSKjhwzPL5CmBCelLGOiV1C8yaBdPRMKih5d8G_5o_Ft9FaUv3ISVz5QJSQYzCeArIaRSsBZbj9YmMgqMra7em8E-39yqUdb5dkPo8M923wSyL-os/s1600/Slide17.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTkO70ciPStDpfViGQtQh9S2bRNmpvSKjhwzPL5CmBCelLGOiV1C8yaBdPRMKih5d8G_5o_Ft9FaUv3ISVz5QJSQYzCeArIaRSsBZbj9YmMgqMra7em8E-39yqUdb5dkPo8M923wSyL-os/s320/Slide17.JPG" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<b><u><span style="font-size: 16.0pt; line-height: 115%;">3. Manipulating the
vehicle based on obstacle detected:<o:p></o:p></span></u></b></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Lets consider the maximum range of
the sensor is 4 meters and anything within 2meters is considered as obstacle.
The following algorithm can be used to control the vehicle based on the sensor
reading,<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Function name()<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> Read
sensor value;<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> If
(value>2meter)<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> Move forward<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> Else<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> Activate
servo and scan for obstacles in left and right side of vehicle <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> If
(more space in left than in right)<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> Move
left<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> Else<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> Move
right<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">} // continue loop<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">This algorithm detects the obstacle
and manipulates the vehicle based on the sensor values. And the resultant
vehicle will be an obstacle avoiding vehicle(with no motive, i.e, it moves
randomly avoiding obstacles)<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="line-height: 18px;">Go to this <a href="http://www.youtube.com/watch?v=1Cw0QCVEAQY">link</a> to see the control of DC motors based on the obstacles sensed by an IR proximity sensor and also check this <a href="http://www.youtube.com/watch?v=GPFgUj2cMGA">link</a> in which the sensor is mounted on a servo motor and the above algorithm is implemented in it. </span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOJTQW4AJjbdg35HvVFcT0-5Jmtdc2Qc6__VoyehtmM2WPziUiwqN4ypsnoZ1_eNBBpS3cCdq0vJMNeI42UVJeGp-2YlMdnDcnwMHrxM-mWxyYceZWfJkTbhg9ZAFR4Q9PehLt34wc5zda/s1600/6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOJTQW4AJjbdg35HvVFcT0-5Jmtdc2Qc6__VoyehtmM2WPziUiwqN4ypsnoZ1_eNBBpS3cCdq0vJMNeI42UVJeGp-2YlMdnDcnwMHrxM-mWxyYceZWfJkTbhg9ZAFR4Q9PehLt34wc5zda/s320/6.jpg" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: C:\Users\DELL PC\Desktop\a.jpg" id="Picture_x0020_10" o:spid="_x0000_i1027" style="height: 351pt; mso-wrap-style: square; visibility: visible; width: 468pt;" type="#_x0000_t75">
<v:imagedata o:title="a" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image014.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<b><u><span style="font-size: 16.0pt; line-height: 115%;">4. GPS based
navigation:<o:p></o:p></span></u></b></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">The components required for this
purpose are the GPS receiver/shield and a compass. Using the Haversine formula,
the distance from the source to destination point can be calculated. Since the
distance is calculated in straight lines, way points must be declared in case of
destination points other than straight lines.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Below shown is the schematic of the
Arduino GPS shield, tiny GPS function can be uploaded to the Arduino MCU to
obtain the NMEA strings and make sure the jumpers are placed in the right
position. <o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtB_Ytp2OemPFDUhHpEDF4L-37R5LNnAFM-nACVUA2CU8VlFSvxyNTWRBHuM3gblUIzoB9GNKmWjUGARou5OEF1tDF8ba14jmx8K3GdrULdDIFz_TyWBnhBOcKhaz38qu9U92NzdF5ifG4/s1600/8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtB_Ytp2OemPFDUhHpEDF4L-37R5LNnAFM-nACVUA2CU8VlFSvxyNTWRBHuM3gblUIzoB9GNKmWjUGARou5OEF1tDF8ba14jmx8K3GdrULdDIFz_TyWBnhBOcKhaz38qu9U92NzdF5ifG4/s320/8.jpg" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<a href="http://letsmakerobots.com/node/5970">click here </a> to learn more about Arduino and GPS</div>
<div align="center" class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: C:\Users\DELL PC\Desktop\Anveshan.jpg" id="Picture_x0020_17" o:spid="_x0000_i1026" style="height: 305.25pt; mso-wrap-style: square; visibility: visible; width: 427.5pt;" type="#_x0000_t75">
<v:imagedata cropleft="2321f" croptop="5371f" o:title="Anveshan" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image015.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div align="center" class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="text-align: center;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Below shown is the compass
interface with Arduino MCU,<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp54htjUvzaCsSeWT0pXEN0ZOxcT6rAeyNl7-4kYJfSht3vnzweFqla2IWX1EP1XafojvzVXB6MN_w71FdoSufiNycZKhmcRHT8PtBANcP9qy-LUiniBVE11Z19f2LRxvfxWL56xo6Zdkd/s1600/7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp54htjUvzaCsSeWT0pXEN0ZOxcT6rAeyNl7-4kYJfSht3vnzweFqla2IWX1EP1XafojvzVXB6MN_w71FdoSufiNycZKhmcRHT8PtBANcP9qy-LUiniBVE11Z19f2LRxvfxWL56xo6Zdkd/s320/7.jpg" width="320" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><br /></span></div>
<div align="center" class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt; mso-no-proof: yes;"><v:shape alt="Description: C:\Users\DELL PC\Desktop\Anveshan1.jpg" id="Picture_x0020_16" o:spid="_x0000_i1025" style="height: 238.5pt; mso-wrap-style: square; visibility: visible; width: 354.75pt;" type="#_x0000_t75">
<v:imagedata cropright="2583f" croptop="9021f" o:title="Anveshan1" src="file:///C:\Users\DARKEN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image016.jpg">
</v:imagedata></v:shape></span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">Using the compass, determine the
vehicles direction with respect to the destination point and turn the vehicle
until both the values are equal(use atan2() to get the vehicle`s current direction with respect to destination using the GPS coordinates). Then, move the vehicle to the calculated
distance(measure the distance moved using an encoder) and “you will reach your
destination point”(with lot of errors obviously). While moving from the source
to destination point, the obstacle detection and manipulation function will act
as an interrupt function. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">I hope right now you got an idea
about how to build an Autonomous vehicle. However, to increase the accuracy,
you have to add lot of feedback loops and control algorithms to the system(this
is a basic model after all).<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">For further clarifications, feel
free to contact me at </span><a href="mailto:sriram.emarose@gmail.com"><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;">sriram.emarose@gmail.com</span></a><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> and </span><a href="http://www.linkedin.com/in/sriramemarose">http://www.linkedin.com/in/sriramemarose</a><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 16.0pt;"> <o:p></o:p></span></div>
<div align="center" class="MsoNormal">
<br /></div>
</div>
</div>
DhiAstrahttp://www.blogger.com/profile/14437309491511036957noreply@blogger.com0