<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-14797582</id><updated>2011-07-28T19:33:21.597-07:00</updated><title type='text'>Automatrons</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://automatrons.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://automatrons.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ankush</name><uri>http://www.blogger.com/profile/17987539290159961478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-14797582.post-113357493350734801</id><published>2005-12-02T16:34:00.000-08:00</published><updated>2005-12-02T17:56:04.160-08:00</updated><title type='text'></title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/Lego%20072.jpg"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Lego%20072.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Abstract&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The purpose of this project was to design and implement an experimental robot, which could determine its current position in a room and can go to the desired coordinate location. The motivations for this were two-fold. The first being that robotics is an excellent synthesis of hardware &amp; software technology. Secondly the integration of Electronics Hardware coupled with high-level object oriented programming languages like JAVA &amp;amp; the fusion of basic fundamentals of mechanics &amp; automation overall provide one the finest viewer-experience of a robotic device. A possible extension to this robot can prove to be very useful in enhancing the role of automation &amp;amp; software into the industry &amp; common world around us.&lt;br /&gt;&lt;br /&gt;The targeted design goal of this project is to construct a portable, reusable &amp;amp; multipurpose robotic device that is capable of guiding a visually impaired person around a room and help in transfer of material from one location to another&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Vagabond&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The purpose of Project Vagabond is a robot that after determining its current coordinates in a room travels to the desired coordinate location. The robot meets its objective as per the following:&lt;br /&gt;&lt;br /&gt;· Establishing its current coordinates using three light sources attached to the wall of a room and a light sensor installed on the robot.&lt;br /&gt;· Calculate the inclination and distance between its current and desired location.&lt;br /&gt;· Move towards the desired coordinates.&lt;br /&gt;· Constantly check its general direction of approach and make the required changes in its trajectory.&lt;br /&gt;&lt;br /&gt;The Vagabond is useful in a wide range of applications such as:&lt;br /&gt;&lt;br /&gt;Ø To guide a visually impaired person to a particular location in a room&lt;br /&gt;Ø To perform ambulatory functions on behalf of a motor disabled person.&lt;br /&gt;Ø To carry miscellaneous articles for bed ridden patients.&lt;br /&gt;Ø To help in transfer of materials from one work station to another&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Features of Vagabond:&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Þ On-line determination of its current location&lt;br /&gt;&lt;br /&gt;Þ Uses only three light sources attached to the wall&lt;br /&gt;&lt;br /&gt;Þ Only one light sensor sufficient to detect the light sources.&lt;br /&gt;&lt;br /&gt;Þ Independent motors for rotary and linear motions&lt;br /&gt;&lt;br /&gt;Þ Needs only one rotation sensor to calculate its angle of rotation and linear distance traveled.&lt;br /&gt;&lt;br /&gt;Þ The robot can calculate the coordinates of each location and the information can be stored in a database for future use.&lt;br /&gt;&lt;br /&gt;Þ The RCX is separate from the robot and the destination coordinates can be fed from the database via the InfraRed&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Hardware Used&lt;/strong&gt;&lt;br /&gt;RCX&lt;br /&gt;&lt;br /&gt;2 Motors&lt;br /&gt;Motor A-Controlling the rotational movement of the Vagabond&lt;br /&gt;Motor B- Controlling the linear movement of the robot&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Light Sensor: To detect the light sources and calculate its current coordinates.&lt;br /&gt;Rotation Sensor-It is used to the angle of rotation and linear distance covered by the robot.&lt;br /&gt;&lt;br /&gt;· Differential Gear&lt;br /&gt;&lt;br /&gt;2 Worm Gears&lt;br /&gt;&lt;br /&gt;Slip Clutch (24 teeth)&lt;br /&gt;&lt;br /&gt;Bevel and Crown Gears&lt;br /&gt;&lt;br /&gt;Spur Gears&lt;br /&gt;&lt;br /&gt;Lego Building Blocks&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step-by-Step Approach&lt;br /&gt;Approach / Problem Faced and Solution&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;· A mechanism should enable the robot to move in a perfectly straight trajectory.&lt;br /&gt;&lt;br /&gt;PF:Two independent motors were used to drive each wheel, but they never produced the same speed and hence the robot never moved completely straight.&lt;br /&gt;&lt;br /&gt;Soln: Both the wheels had to be connected to a single shaft driven by a single motor.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;· A rotation mechanism should enable the robot to rotate while detecting the light&lt;br /&gt;sources and also to incline itself at the desired angle.&lt;br /&gt;&lt;br /&gt;Soln: One wheel of the robot was kept stationery while the other was rotated.&lt;br /&gt;&lt;br /&gt;PF: The friction resulted in the rotation of the other wheel thus precluding the possibility of a single axis of rotation.&lt;br /&gt;&lt;br /&gt;PF: Another problem was that the wheels were connected to the same shaft and thus it was impossible for them to rotate in opposite directions need rotation.&lt;br /&gt;&lt;br /&gt;Soln: The wheels had to be connected to two different shafts.&lt;br /&gt;&lt;br /&gt;· The wheels should move in opposite direction but with the same speed.&lt;br /&gt;&lt;br /&gt;Soln: The only possibility was to use a differential gear. The characteristic of a differential gear is that the angular speedof its main body is the average of angular speeds of the two shafts connected at its end.&lt;br /&gt;&lt;br /&gt;PF: The robot was constantly changing its axis of rotation as the speed of the two shafts connected to the differential and the main body of the differential could not be controlled.&lt;br /&gt;&lt;br /&gt;Soln: The main body of the differential had to be kept stationery. As a result when one shaft of the differential gear was rotated at a particular speed, the other rotated at the same speed but in opposite direction as required.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PF: The body of the differential had to kept stationery during the rotation but had to be given motion when the robot moves linearly.&lt;br /&gt;&lt;br /&gt;Soln: A motor short-circuited port and a gear combination was used. The purpose of short-circuiting the port was to make it difficult to rotate and thus serve the function of stopping the main body of the differential gear while the robot is rotating.&lt;br /&gt;&lt;br /&gt;PF: The mechanism didn’t completely removed the possibility of the rotationof the main body of the differential&lt;br /&gt;&lt;br /&gt;.&lt;br /&gt;Soln: A Worm gear was used that has the property which enables it to allow the transfer of power in only one direction, thus during the rotary motion, the worm gear prevented the movement of the main body of the differential gear, while during&lt;br /&gt;the linear motion the worm gear itself drives the differential gear.&lt;br /&gt;&lt;br /&gt;. The robot has to move straight with the two wheels connected to different shafts.&lt;br /&gt;&lt;br /&gt;PF: Only one rotation sensor was available which had to measure both the rotary and linear motions of the robot.&lt;br /&gt;&lt;br /&gt;Soln: the same motor using the same gear ratio drove the two shafts connected to the two wheels. The worm gear meshing with the main body of the differential resulted in a gear ratio of 1:24. Thus the other shaft also had to be driven by the same gear ratio (1:24)&lt;br /&gt;using a second worm gear.&lt;br /&gt;&lt;br /&gt;PF: The presence of second worm gear precludes the possibility of the rotation of the shaft during the rotation of the robot.&lt;br /&gt;&lt;br /&gt;Soln: A slip clutch was used which allows the rotation of the shaft passing through it without its own rotation. (Once the torque exceeded 2.5-5Nm) The slip clutch was prevented from rotating due to the presence of worm gear, which in turn rotated the slip clutch having 24 teeth and thus maintaining the same gear ratio of 1:24&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How It Runs&lt;br /&gt;&lt;/strong&gt;The 3 light sources are fixed on the wall at known distances and are switched on. The Vagabond is placed at any position in the room and the program is run. Vagabond rotates on its central axis, records the intensity at each count of rotation and communicates this information to the PC via the Infra Red. The PC in turn calculates the angle between the light sources, the current coordinates of the robot and prompts the user to input the destination coordinates. The PC calculates the rotational and linear counts of the rotational sensor to reach the desired coordinates, which is passed on to the robot again via the Infra Red, which. then travels the required distance.&lt;br /&gt;· The light sources are fixed at known distances on the wall and switched on.&lt;br /&gt;&lt;br /&gt;· The linear distance moved by the robot per count of rotation is measured and is&lt;br /&gt;termed as Linear Count&lt;br /&gt;&lt;br /&gt;· The Vagabond is placed at any position in the room.&lt;br /&gt;&lt;br /&gt;· Now the Vagabond rotates on its central axis completing more than 720 degrees&lt;br /&gt;&lt;br /&gt;· The light sensor mounted on the robot records the intensity of light at each count of the&lt;br /&gt;rotation sensor.&lt;br /&gt;&lt;br /&gt;· After completion of the rotations the recorded intensities are communicated to the PC via&lt;br /&gt;the Infra Red.&lt;br /&gt;&lt;br /&gt;· The Vagabond continues its rotation till it reaches the first light source. This is&lt;br /&gt;necessary in order to align the robot according to the new X,Y coordinate&lt;br /&gt;system.&lt;br /&gt;&lt;br /&gt;· An algorithm running at the PC calculates the average values of five successive readings&lt;br /&gt;staring from the third reading to reduce the chances of error.&lt;br /&gt;&lt;br /&gt;· A sudden increase in the intensity is detected as peak and the corresponding value of the&lt;br /&gt;rotation sensor is noted.&lt;br /&gt;&lt;br /&gt;· The process is continued for the first six peaks thus obtaining two peaks for each light&lt;br /&gt;source encountered once in every rotation.&lt;br /&gt;&lt;br /&gt;· The difference of the first and fourth peak, second and fifth peak and the third and the&lt;br /&gt;sixth peak is noted as each represents the number of rotations corresponding to 360&lt;br /&gt;degrees.&lt;br /&gt;&lt;br /&gt;· The averages of the differences are calculated . We divide 360 degrees by the&lt;br /&gt;average of the differences to get the Least Count which represents the&lt;br /&gt;degree of rotation for each count of the rotation sensor.&lt;br /&gt;&lt;br /&gt;· The user is prompted to input the destination coordinates&lt;br /&gt;&lt;br /&gt;· The computer aligns the new X,Y coordinate according to the current inclination of&lt;br /&gt;the Vagabond and calculates the linear distances required in new X,Y coordinate&lt;br /&gt;system to reach the destination.&lt;br /&gt;&lt;br /&gt;· The number of counts of the rotation sensor required to move the desired&lt;br /&gt;distances is calculated by dividing the distances by Linear Count.&lt;br /&gt;&lt;br /&gt;· The number of counts required to move 90 degrees is also calculated by dividing it by&lt;br /&gt;Least Count&lt;br /&gt;&lt;br /&gt;· The three counts are fed back to the RCX via the Infra Red&lt;br /&gt;&lt;br /&gt;· The robot moves the number of rotations in the X axis, rotates by 90 degrees and again&lt;br /&gt;moves the required distance in Y axis&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/lights.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Calculation of Current Coordinates&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/p&gt;&lt;/strong&gt;&lt;strong&gt;&lt;p&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;Sin(a) /len 1 = Sin (q+a) / r&lt;br /&gt;&lt;br /&gt;Sin(a+b) / (len 1+len 2) = Sin(a+b+q) / r&lt;br /&gt;&lt;br /&gt;Current X coordinate = r * Cos ( q )&lt;br /&gt;&lt;br /&gt;Current Y coordinate = r* Sin ( q )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Axis.jpg" border="0" /&gt;&lt;br /&gt;&lt;strong&gt;Transformation of Axis&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;X1 = Current X-Coordinate ( w.r.t. Original Coordinate System),&lt;br /&gt;Y1 = Current Y-Coordinate ( w.r.t. Original Coordinate System),&lt;br /&gt;X2 = Destination X-Coordinate ( w.r.t. Original Coordinate System),&lt;br /&gt;Y2 = Destination Y-Coordinate( w.r.t. Original Coordinate System)&lt;br /&gt;X = X-Coordinate in New Coordinate System&lt;br /&gt;Y = Y-Coordinate in New Coordinate System&lt;br /&gt;deltay=Y2-Y1&lt;br /&gt;deltax=X2-X1&lt;br /&gt;ratio = (X1 / Y1)&lt;br /&gt;angle = tan-1(ratio)&lt;br /&gt;X = deltax * cos(angle) – deltay * sin(angle)&lt;br /&gt;Y = deltax * sin(angle) + deltay * cos(angle)&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Program:&lt;/strong&gt;&lt;br /&gt;The Program consists of two parts:&lt;br /&gt;Part I : The software running at the PC end.&lt;br /&gt;&lt;br /&gt;Part II: The software running at the robot end.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Part I:&lt;br /&gt;import java.io.*;&lt;br /&gt;import josx.rcxcomm.*;&lt;br /&gt;import java.lang.*;&lt;br /&gt;&lt;br /&gt;public class DetectPC&lt;br /&gt;{&lt;br /&gt;RCXPort port;// Port to send and receive data from RCX&lt;br /&gt;int[] value;&lt;br /&gt;int[] diff;&lt;br /&gt;double[] rot;//stores the value of 3 max light sources&lt;br /&gt;double alpha,beta,theta,thetad;&lt;br /&gt;double mfactor;//overall mfactor&lt;br /&gt;double first;//stores the value of the light source at the origin&lt;br /&gt;double mfactor1;//mfactor for first light source used to send robot to origin&lt;br /&gt;double y1,y2,x1,x2;&lt;br /&gt;InputStreamReader stdin;//input stream from console i.e the user input&lt;br /&gt;BufferedReader console;//converts the inputstream from console &lt;/strong&gt;&lt;strong&gt;to &lt;/strong&gt;&lt;strong&gt;BufferReader&lt;br /&gt;int move;//counts the number of count to move to reach approx the origin;&lt;br /&gt;int moveToXaxis;//counts to align along X axis&lt;br /&gt;int moveToYaxis;&lt;br /&gt;int moveY;//number of counts to move along Y axis&lt;br /&gt;int moveX;// number of counts to move along X axis&lt;br /&gt;&lt;br /&gt;DataOutputStream out;&lt;br /&gt;&lt;br /&gt;public DetectPC()&lt;br /&gt;{&lt;br /&gt;value=new int[240];&lt;br /&gt;diff=new int[239];&lt;br /&gt;rot=new double[6];&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;port=new RCXPort();&lt;br /&gt;this.stdin =new InputStreamReader(System.in);&lt;br /&gt;this.console =new BufferedReader(this.stdin);&lt;br /&gt;}catch(IOException ie){}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void main(String[] args)&lt;br /&gt;{&lt;br /&gt;DetectPC pc=new DetectPC();&lt;br /&gt;pc.receive();&lt;br /&gt;pc.difference();&lt;br /&gt;pc.detect();&lt;br /&gt;pc.calculateMFactor();//calculates the multiplying factor&lt;br /&gt;pc.calculateAngle();&lt;br /&gt;pc.display();&lt;br /&gt;pc.currentXY();&lt;br /&gt;pc.targetXY();//input from the user the destination x,y coordinate&lt;br /&gt;pc.sendOrigin();&lt;br /&gt;pc.getTransform();//shifts origin to the current x,y coordinates &amp; calculates&lt;br /&gt;//target x,y according to the new coordinate axis&lt;br /&gt;pc.getY();//calculates the count along Y axis&lt;br /&gt;pc.getX();//calculates the count along X axis&lt;br /&gt;pc.sendRCX();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private void receive()&lt;br /&gt;{&lt;br /&gt;DataInputStream dis;&lt;br /&gt;dis=new DataInputStream(port.getInputStream());&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;for(int i=0;i&lt;240;i++)&gt;&lt;/p&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;{ &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;value[i]=dis.readInt();&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println(value[i]);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;} }catch(IOException ie){} }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void difference() &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{ System.out.println("Diffences in magnitude:"); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;int j;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;for(j=0;j&lt;=238;j++) &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;diff[j]=value[j+1]-value[j];&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;strong&gt; }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void detect() &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{ int count=0; int i=0; int j,num=1; int temp; boolean detect;//checks whether any difference is more than 1 or not &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;float sum,avg;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;while((count&lt;6)&amp;&amp;amp;((i+5)&lt;239))&gt;&lt;/p&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;{ detect=false;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;sum=0; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;for(j=0;j&lt;5;j++)&gt;&lt;/p&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;sum+=(float)(value[i+j]); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;avg=sum/5; //System.out.println("Average at "+i+" is :"+avg); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;if((value[i+1]&gt;(avg+1.5))(value[i+2]&gt;(avg+1.5))(value[i+3]&gt;(avg+1.5)))&lt;br /&gt;{&lt;br /&gt;//detect=true;&lt;br /&gt;//rot[count]=i+1;&lt;br /&gt;if(value[i+2]&gt;=value[i+1])&lt;br /&gt;{&lt;br /&gt;rot[count]=i+2;&lt;br /&gt;detect=true;&lt;br /&gt;}&lt;br /&gt;if((value[i+3]&gt;=value[i+2])&amp;&amp;amp;amp;amp;amp;(value[i+3]&gt;=value[i+1]))&lt;br /&gt;{&lt;br /&gt;rot[count]=i+3;&lt;br /&gt;detect=true;&lt;br /&gt;}&lt;br /&gt;if((value[i+4]&gt;=value[i+3])&amp;&amp;amp;(value[i+4]&gt;=value[i+1])&amp;&amp;amp;(value[i+4]&gt;=value[i+2]))//(value[i+5]&gt;value[i+3])&amp;&amp;amp;(value[i+5]&gt;=value[i+1])&amp;&amp;amp;(value[i+5]&gt;=value[i+2])&amp;&amp;amp;(value[i+5]&gt;=value[i+4]))&lt;br /&gt;detect=false;&lt;br /&gt;if(detect)&lt;br /&gt;{&lt;br /&gt;if(count!=0)&lt;br /&gt;{&lt;br /&gt;if((rot[count]==rot[count-1])(rot[count]==rot[count-1]+1)(rot[count]==rot[count-1]-1))//(rot[count]==rot[count-1]+2)(rot[count]==rot[count-1]-2))&lt;br /&gt;--count;&lt;br /&gt;}&lt;br /&gt;++count;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;++i;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void display()&lt;br /&gt;{&lt;br /&gt;for(int i=0;i&lt;6;i++)&gt;&lt;/p&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;{ System.out.println("Light at:"+rot[i]); }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("Alpha:"+alpha); System.out.println("Beta:"+beta); System.out.println("Theta:"+theta); } &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void calculateAngle() { if(((rot[1]-rot[0])*mfactor)&gt;180)&lt;br /&gt;{&lt;br /&gt;alpha=(float)(rot[2]-rot[1])*mfactor;&lt;br /&gt;theta=(float)(rot[1]-rot[0])*mfactor;&lt;br /&gt;beta=360-alpha-theta;&lt;br /&gt;first=rot[4];&lt;br /&gt;mfactor1=(float)(360/(rot[4]-rot[1]));&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;if(((rot[2]-rot[1])*mfactor)&gt;180)&lt;br /&gt;{&lt;br /&gt;beta=(float)(rot[1]-rot[0])*mfactor;&lt;br /&gt;theta=(float)(rot[2]-rot[1])*mfactor;&lt;br /&gt;alpha=360-theta-beta;&lt;br /&gt;first=rot[5];&lt;br /&gt;mfactor1=(float)(360/(rot[5]-rot[2]));&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;if(((rot[3]-rot[2])*mfactor)&gt;180)&lt;br /&gt;{&lt;br /&gt;alpha=(float)(rot[1]-rot[0])*mfactor;&lt;br /&gt;beta=(float)(rot[2]-rot[1])*mfactor;&lt;br /&gt;theta=360-alpha-beta;&lt;br /&gt;first=rot[3];&lt;br /&gt;mfactor1=(float)(360/(rot[3]-rot[0]));&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void calculateMFactor()&lt;br /&gt;{&lt;br /&gt;float temp=0;&lt;br /&gt;for(int i=0;i&lt;1;i++)&gt;&lt;/p&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;temp+=(float)(360/(rot[i+3]-rot[i]));&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;mfactor=temp; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("Mfactor:"+mfactor); }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void currentXY() &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{ double len1=0,len2=0,radius; double temp,tant; double thetar; double alphar=Math.toRadians(alpha);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;double betar=Math.toRadians(beta);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println(" Alpha in radians ="+alphar); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println(" Beta in radians ="+betar);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;String s;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;try { System.out.println("Enter length one:"); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;s=console.readLine();&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;len1=Double.parseDouble(s);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println(" length one ="+len1); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("Enter lenght two:"); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;s=console.readLine(); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;len2=Double.parseDouble(s);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println(" length two ="+len2);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;}catch(IOException ioex) { System.out.println("Input error"); System.exit(1); } temp=(Math.sin(alphar+betar)*len1)/((len1+len2)*Math.sin(alphar)); System.out.println("value of const :"+temp);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;tant=(Math.sin(alphar+betar)-temp*Math.sin(alphar))/(temp*Math.cos(alphar)-Math.cos(alphar+betar));&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("The value of Tan theta: "+tant); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;thetar=Math.atan(tant);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("The value of theta in radians: "+thetar); thetad=Math.toDegrees(thetar); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("The value of theta in degrees :"+thetad);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;radius=(len1*Math.sin(thetar+alphar))/Math.sin(alphar);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("The value of radius is :"+radius); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;x1=radius*Math.cos(thetar);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;y1=radius*Math.sin(thetar);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("Current x:"+x1); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("Current y:"+y1); } private void targetXY()// User input &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;function to input Target value of x,y&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;String s2; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;t&lt;/strong&gt;&lt;strong&gt;ry {&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("Enter the Target x coordinate:");&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;s2=console.readLine(); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;x2=Double.parseDouble(s2);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println(" target x coordinate ="+x2); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("Enter the target y coordinate:");&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;s2=console.readLine();&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;y2=Double.parseDouble(s2);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println(" target y coordinate ="+y2);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;console.close(); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;} catch(IOException ioex) { System.out.println("Input error"); System.exit(1); } }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void getTransform()// Calculates the angle between the current and target point in Radians &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{ double deltay=y2-y1; double deltax=x2-x1; double ratio=(x1/y1); System.out.println(" Ratio of ^x/^y: ="+ratio);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;double angle=Math.atan(ratio); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("angle:"+angle); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;double degree=Math.toDegrees(angle);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("Angle in degrees :"+degree); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;x2=deltax*Math.cos(angle)-deltay*Math.sin(angle);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;y2=deltax*Math.sin(angle)+deltay*Math.cos(angle); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("New X coordinate:"+x2);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("New Y coordinate:"+y2); }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void getY() &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{double deltay=y2-y1; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;double countd=y2/0.383858268;//Where 19.5cm = 20counts 39cm=40 counts Long countl=new Long(Math.round(countd));//converts from double to rounded long moveY=0-countl.intValue(); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;if(moveY&gt;0)&lt;br /&gt;{&lt;br /&gt;countd=(float)(0/mfactor);&lt;br /&gt;countl=new Long(Math.round(countd));//converts from double to rounded long&lt;br /&gt;moveToYaxis=countl.intValue();&lt;br /&gt;System.out.println("No. of rotation to reach new Y axis:"+moveToYaxis);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;countd=(float)(180/mfactor);&lt;br /&gt;countl=new Long(Math.round(countd));//converts from double to rounded long&lt;br /&gt;moveToYaxis=countl.intValue();&lt;br /&gt;System.out.println("No. of rotation to reach new Y axis:"+moveToYaxis);&lt;br /&gt;moveY=0-moveY;&lt;br /&gt;}&lt;br /&gt;System.out.println("Counts to reach target Y coordinate:"+moveY);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void getX()&lt;br /&gt;{&lt;br /&gt;//double deltax=x2-x1;&lt;br /&gt;double countd=x2/0.383858268;//Where 19.5cm = 20counts 39cm=40 counts&lt;br /&gt;Long countl=new Long(Math.round(countd));//converts from double to rounded long&lt;br /&gt;moveX=countl.intValue();&lt;br /&gt;if((x2&gt;=0)&amp;&amp;amp;amp;amp;amp;(y2&lt;=0)) countd=(float)(90/mfactor); else { if((x2&lt;=0)&amp;&amp;amp;amp;amp;amp;(y2&gt;=0))&lt;br /&gt;{&lt;br /&gt;countd=(float)(90/mfactor);&lt;br /&gt;moveX=0-moveX;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;if((x2&gt;=0)&amp;&amp;amp;amp;amp;amp;(y2&gt;=0))&lt;br /&gt;{&lt;br /&gt;countd=(float)(270/mfactor);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;countd=(float)(270/mfactor);&lt;br /&gt;moveX=0-moveX;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;System.out.println("Counts to reach target X coordinate:"+moveX);&lt;br /&gt;countl=new Long(Math.round(countd));//converts from double to rounded long&lt;br /&gt;moveToXaxis=countl.intValue();&lt;br /&gt;System.out.println("No. of rotation to reach new X axis:"+moveToXaxis);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void sendOrigin()&lt;br /&gt;{&lt;br /&gt;while((first+(360/mfactor1))&lt;240)&gt;&lt;/p&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;first+=360/mfactor1; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("Mfactor for Ist light source"+mfactor1); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;System.out.println("First light source at:"+first);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;double countd=first+(float)(360/mfactor1)-15-240;//sending it approx to the first light source &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Long countl=new Long(Math.round(countd));//converts from double to rounded long move=countl.intValue();&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;if(move&lt;1) move="0;"&gt;&lt;/p&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;System.out.println("No. of rotation to move for approximation i.e (move-15):"+move); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;out=new DataOutputStream(port.getOutputStream());&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void sendRCX()&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;try&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{ out.writeInt(move); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;out.writeInt(moveToYaxis); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;out.writeInt(moveToXaxis); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;out.writeInt(moveY);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;out.writeInt(moveX);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;}catch(IOException ie){} } }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Part II:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;import josx.platform.rcx.*;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;import josx.rcxcomm.*; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;import josx.robotics.*;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;import java.io.*;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;class Rotate &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{ static int counter;// keeps an account of the number of array entries Servo servo; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;public Rotate() &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{ RCX.value=new int[240];&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Rotate.counter=-1; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;RCX.rcom=true;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Sensor.S1.setPreviousValue(0);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;servo=new Servo(Sensor.S1,Motor.A);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;action();&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void action()&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{ boolean check=false; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;while(check==false)&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{ check=servo.rotateTo(240); } } }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;class Send {&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DataOutputStream out;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;public Send() { &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;out=new DataOutputStream(RCX.port.getOutputStream()); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;action(); }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void action() { &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;int j=0;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;LCD.showNumber(1111);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;while(RCX.move==false) { &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;//LCD.showNumber(RCX.value[i]);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;try {&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;LCD.showNumber(j); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;out.writeInt(RCX.value[j++]); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;}catch(IOException ie){} &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;if(j==240)&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;RCX.move=true; } } }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;class Move { &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DataInputStream in;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private int angle,dist;//angle calculates the count for angle &amp; dist for distance boolean isCountToY,isCountToX,isCountToXaxis,isCountToOrigin,isCountToYaxis;//checks whether angle or distance has been moved or not Servo servo; static int light1,light2;//light1 stores the value of previous light source &amp; light2 second int origin,Ymove,Xmove,Xaxis,Yaxis;//takes the count for origin,count of movement on Y,x &amp; to reach Y axis static boolean move,negative;// checks whether move function is running boolean check;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;public Move() {&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;servo=new Servo(Sensor.S1,Motor.A);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;in=new DataInputStream(RCX.port.getInputStream()); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;i&lt;/strong&gt;&lt;strong&gt;sCountToY=false; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;isCountToX=false;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;isCountToXaxis=false;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;isCountToOrigin=false;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;isCountToYaxis=false; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;origin=-1; Ymove=-1; Xmove=-1; Xaxis=-1; Move.negative=false; action(); } &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void action() {&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;check=false; int dist=0; LCD.showNumber(5000);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Sensor.S1.setPreviousValue(0);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;rcxoperation();&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;moveToOrigin();&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;try { Thread.sleep(5000); }catch(InterruptedException ie){}&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;reachOrigin(); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Move.move=false; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;try { Thread.sleep(5000); }catch(InterruptedException ie){}&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;operation();//once all the inputs are read from the PC begin their execution } &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void reachOrigin() {&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;check=false;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Move.move=true; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;while(check==false) {&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Move.light1=Sensor.S3.readValue(); servo.rotateTo(1); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;if((Move.light2-Move.light1)&gt;=2)&lt;br /&gt;check=true;&lt;br /&gt;Sensor.S1.setPreviousValue(0);&lt;br /&gt;//Motor.A.backward();&lt;br /&gt;}&lt;br /&gt;Motor.A.stop();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void rcxoperation()&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;while(!(isCountToOrigin))// the while loop scans the input stream &amp; calls the&lt;br /&gt;// appropriate function after getting all the values&lt;br /&gt;{&lt;br /&gt;origin=in.readInt();&lt;br /&gt;if(origin&gt;-1)&lt;br /&gt;isCountToOrigin=true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;while(!(isCountToYaxis))// the while loop scans the input stream &amp; calls the&lt;br /&gt;// appropriate function after getting all the values&lt;br /&gt;{&lt;br /&gt;Yaxis=in.readInt();&lt;br /&gt;if(Yaxis&gt;-1)&lt;br /&gt;isCountToYaxis=true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;while(!(isCountToXaxis))// the while loop scans the input stream &amp; calls the&lt;br /&gt;// appropriate function after getting all the values&lt;br /&gt;{&lt;br /&gt;Xaxis=in.readInt();&lt;br /&gt;if(Xaxis&gt;-1)&lt;br /&gt;isCountToXaxis=true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;while(!(isCountToY))&lt;br /&gt;{&lt;br /&gt;Ymove=in.readInt();&lt;br /&gt;//if(Ymove&gt;-1)&lt;br /&gt;isCountToY=true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;while(!(isCountToX))&lt;br /&gt;{&lt;br /&gt;Xmove=in.readInt();&lt;br /&gt;//if(Xmove&gt;-1)&lt;br /&gt;isCountToX=true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}catch(IOException ie)&lt;br /&gt;{&lt;br /&gt;LCD.showNumber(8888);&lt;br /&gt;}&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;in.close();&lt;br /&gt;}catch(IOException ie){}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void operation()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;Button.RUN.waitForPressAndRelease();&lt;br /&gt;}catch(InterruptedException e) {}&lt;br /&gt;&lt;br /&gt;moveToYaxis();//sets along new Y axis&lt;br /&gt;moveY();// moves along new y axis;&lt;br /&gt;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;Thread.sleep(5000);&lt;br /&gt;}catch(InterruptedException ie){}&lt;br /&gt;&lt;br /&gt;moveToXaxis();//sets along new x axis&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;Thread.sleep(5000);&lt;br /&gt;}catch(InterruptedException ie){}&lt;br /&gt;&lt;br /&gt;moveX();//moves along new X axis&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void moveToOrigin()&lt;br /&gt;{&lt;br /&gt;Motor.A.setPower(0);&lt;br /&gt;Sensor.S1.setPreviousValue(0);&lt;br /&gt;check=false;&lt;br /&gt;while(check==false)&lt;br /&gt;{&lt;br /&gt;check=servo.rotateTo(origin);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void moveToYaxis()&lt;br /&gt;{&lt;br /&gt;Motor.A.setPower(0);&lt;br /&gt;Sensor.S1.setPreviousValue(0);&lt;br /&gt;check=false;&lt;br /&gt;while(check==false)&lt;br /&gt;{&lt;br /&gt;check=servo.rotateTo(Yaxis);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void moveToXaxis()&lt;br /&gt;{&lt;br /&gt;Motor.A.setPower(0);&lt;br /&gt;Sensor.S1.setPreviousValue(0);&lt;br /&gt;check=false;&lt;br /&gt;while(check==false)&lt;br /&gt;{&lt;br /&gt;check=servo.rotateTo(Xaxis);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void moveY()&lt;br /&gt;{&lt;br /&gt;boolean check=false;&lt;br /&gt;Sensor.S1.setPreviousValue(0);&lt;br /&gt;Motor.C.setPower(7);&lt;br /&gt;Servo servo3=new Servo(Sensor.S1,Motor.C);&lt;br /&gt;if(Ymove&lt;0) negative="true;"&gt;&lt;/p&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;while(check==false) { &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;check=servo3.rotateTo(Ymove); }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Move.negative=false; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;private void moveX() &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{ boolean check=false;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Sensor.S1.setPreviousValue(0);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Motor.C.setPower(7); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Servo servo3=new Servo(Sensor.S1,Motor.C);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;if(Xmove&lt;0)&gt;&lt;/p&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;Move.negative=true;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;while(check==false) &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;{ check=servo3.rotateTo(Xmove); } } }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;public class RCX { &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;static boolean rcom;//keeps track whether rotation has finished before rcx sends array to computer true means still under rotation static boolean move;//value is false while robot is rotating &amp; true when robot moves linear distance&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;static int value[];// an array which stores the value of light sensor static RCXPort port;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;public static void main(String[] args) {&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;try {&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;RCX.port = new RCXPort(); }catch(IOException ie){}&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Move.move=false; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Slistener slist=new Slistener();&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Rotate r = new Rotate();&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Send s = new Send();&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Move m = new Move(); } } &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;class Slistener implements SensorListener { public Slistener() {&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;RCX.rcom=true;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Sensor.S1.setTypeAndMode(SensorConstants.SENSOR_TYPE_ROT,SensorConstants.SENSOR_MODE_ANGLE); Motor.A.setPower(0); Sensor.S3.setTypeAndMode(SensorConstants.SENSOR_TYPE_LIGHT,SensorConstants.SENSOR_MODE_PCT); Sensor.S3.activate(); Sensor.S1.addSensorListener(this); } public void stateChanged(Sensor aSource,int Old,int New) { if(RCX.rcom) { LCD.showNumber(Sensor.S1.readValue()); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;if(aSource==Sensor.S1) RCX.value[++Rotate.counter]=Sensor.S3.readValue(); &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;if(Rotate.counter==239) RCX.rcom=false; }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;else if(Move.move==true) { &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Move.light2=Sensor.S3.readValue();&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;LCD.showNumber(Sensor.S3.readValue()); }&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;else { if(Move.negative==true) LCD.showNumber(1000+New);&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;else LCD.showNumber(New); } &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;//LCD.showNumber(New); }}&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;SAMPLE READING&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Actual Location X: 90&lt;br /&gt;Actual Location Y: 65&lt;br /&gt;Diffences in magnitude:&lt;br /&gt;Mfactor:3.076923131942749&lt;br /&gt;Light at:12.0&lt;br /&gt;Light at:100.0&lt;br /&gt;Light at:112.0&lt;br /&gt;Light at:129.0&lt;br /&gt;Light at:221.0&lt;br /&gt;Light at:233.0&lt;br /&gt;Alpha:36.92307758331299&lt;br /&gt;Beta:52.3076868057251&lt;br /&gt;Theta:270.7692356109619&lt;br /&gt;Alpha in radians =0.6444292737981225&lt;br /&gt;Beta in radians =0.9129413588618984&lt;br /&gt;Enter length one:&lt;br /&gt;72&lt;br /&gt;length one =72.0&lt;br /&gt;Enter lenght two:&lt;br /&gt;72&lt;br /&gt;length two =72.0&lt;br /&gt;value of const :0.8322286618682035&lt;br /&gt;The value of Tan theta: 0.7669268728062841&lt;br /&gt;The value of theta in radians: 0.6542465845289498&lt;br /&gt;The value of theta in degrees :37.485568054357884&lt;br /&gt;The value of radius is :115.44156079086733&lt;br /&gt;Current x:91.60364651744949&lt;br /&gt;Current y:70.2532981612798&lt;br /&gt;Enter the Target x coordinate: 50&lt;br /&gt;target x coordinate =50.0&lt;br /&gt;Enter the target y coordinate:40&lt;br /&gt;target y coordinate =40.0&lt;br /&gt;Ratio of ^x/^y: =1.3039052815307817&lt;br /&gt;angle:0.9165497422659469&lt;br /&gt;Angle in degrees :52.51443194564212&lt;br /&gt;New X coordinate:-1.3121873231462189&lt;br /&gt;New Y coordinate:-51.423765105378635&lt;br /&gt;Mfactor for Ist light source2.9752066135406494&lt;br /&gt;First light source at:221.0&lt;br /&gt;No. of rotation to move for approximation i.e (move-15):77&lt;br /&gt;Counts to reach target Y coordinate:134&lt;br /&gt;Counts to reach target X coordinate:-3&lt;br /&gt;No. of rotation to reach X axis:29&lt;br /&gt;&lt;/strong&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/GRAPH.jpg" border="0" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14797582-113357493350734801?l=automatrons.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://automatrons.blogspot.com/feeds/113357493350734801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14797582&amp;postID=113357493350734801' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/113357493350734801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/113357493350734801'/><link rel='alternate' type='text/html' href='http://automatrons.blogspot.com/2005/12/abstract-purpose-of-this-project-was.html' title=''/><author><name>Ankush</name><uri>http://www.blogger.com/profile/17987539290159961478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14797582.post-112853851988476254</id><published>2005-09-30T11:22:00.000-07:00</published><updated>2005-10-05T11:55:48.216-07:00</updated><title type='text'></title><content type='html'>&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;MULTIPURPOSE ROBOTIC DEVICE&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The targeted design goal of this project is to construct a multipurpose robotic device that is capable of performing the following functions:&lt;br /&gt;&lt;br /&gt;· a software controlled Disk Launcher which can be used in the field of Defense &amp; Sports&lt;br /&gt;&lt;br /&gt;· Object Sorter based on different colors which can be used in Food processing &amp;amp; Packaging industry and many more.&lt;br /&gt;&lt;br /&gt;This robot uses touch and light sensors, Infrared Remote Control, infrared tower control via PC, Bluetooth Control to guide &amp; control the Robot.&lt;br /&gt;&lt;br /&gt;The Multipurpose Robot is able to perform a number of tasks with just a change in the software program. The “Multipurpose Robot” developed &amp;amp; coded has forward &amp; backward movement control of a conveyer belt, left &amp;amp; right control of a turntable from 0 to 180 degree &amp; a clockwise/anticlockwise rotating motor providing its torque to 2 tyres one moving at a higher speed than the other.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Features of Multipurpose Robot:&lt;/strong&gt;&lt;br /&gt;· Efficient speed &amp;amp; direction control mechanisms&lt;br /&gt;· Direction control via use of a Turntable to enable the robot to move from 0 to 180 degree&lt;br /&gt;· Forward/Backward movement making use of conveyers to provide a medium for transfer of objects&lt;br /&gt;· Touch Sensor Control for efficient response to the user command&lt;br /&gt;· Light Sensor Control for efficient response to the change in wavelength of light depending on the different objects that pass through the sensor&lt;br /&gt;· IR control via IR Remote&lt;br /&gt;· IR control via USB IR Tower attached to PC&lt;br /&gt;· Manless Control thus providing feature of Automation&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Hardware Used:&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;span style="color:#000000;"&gt;RCX&lt;br /&gt;&lt;br /&gt;3 Motors&lt;br /&gt;Motor A-Controlling the clockwise/anticlockwise movement within an angular range of 180 degrees&lt;br /&gt;Motor B- Controlling the movement of conveyer belt in forward/backward direction&lt;br /&gt;Motor C- Controlling the clockwise/anticlockwise speed of the tyres attached at the front&lt;br /&gt;Wheels&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Touch Sensor-It is used to count the number of rotation the turntable has taken &amp; accordingly is used to change the angular position&lt;br /&gt;&lt;br /&gt;·Light Sensor- It is used to detect changes in color of the object that passes below the sensor&lt;br /&gt;&lt;br /&gt;Turn Table&lt;br /&gt;&lt;br /&gt;Worm Gear&lt;br /&gt;&lt;br /&gt;Gears&lt;br /&gt;&lt;br /&gt;Treads and hubs&lt;br /&gt;&lt;br /&gt;Lego Building Blocks&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Step-by-Step Approach&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Approach / Problem Faced and Solution&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;The mechanism should be able to rotate to the desired angle with sufficient level of accuracy.&lt;br /&gt;&lt;br /&gt;Soln: The entire structure was mounted on a turntable and rotated using a worm gear. The high reduction in the gear ratio provided the required accuracy.&lt;br /&gt;&lt;br /&gt;PF: Absence of a rotation sensor which could calculate the angle of rotation&lt;br /&gt;&lt;br /&gt;Soln: A combination of a touch sensor and a CAM was used to work as a rotation sensor.&lt;br /&gt;&lt;br /&gt;Design of the Feeding Mechanism enabling loading of only one disc at a time.&lt;br /&gt;&lt;br /&gt;PF: To lift only one disc at a time entailed usage of two independent motors (one to raise the disc and the other to move it)&lt;br /&gt;&lt;br /&gt;Soln: A conveyor belt mechanism with low clearance was used, which allowed passage of only one disc at a time&lt;br /&gt;&lt;br /&gt;Design of the Shooting Mechanism with a satisfactory Shooting range.&lt;br /&gt;&lt;br /&gt;PF: The disc should be shot at a high speed and should have a high range.&lt;br /&gt;&lt;br /&gt;Soln: A conveyor belt was used to move the the disc to the point from where it was shot. At the point where it is thrown, a couple of tyres were placed and rotated in opposite directions. The traveling disc on coming in contact with these wheels is shot from the robot at a very high speed&lt;br /&gt;&lt;br /&gt;A mechanism to differentiate between the discs which enables the robot to count the number of disc while shooting and also to determine the type of disc and thus the different discs can be segregated&lt;br /&gt;&lt;br /&gt;Soln: A light sensor was used at the top of the conveyor belt. The purpose of the light sensor was to detect the number of disc passed below it (by detecting the change in the intensity of light received.) Also different colours reflect different amount of light which can be detected by the light Sensor and thus they can be segregated on the basis of their colour&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Special Features:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The following features were added in the robot to make it more flexible and to be able to fulfill its purpose better:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Variation of the Range:&lt;/strong&gt; changing the speed of the motors controlling the rotation of the wheels can vary the distance covered by the disc. An increase in the speed leads to an increase in the range covered and correspondingly a decrease in the speed reduces the range.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;PC Control:&lt;/strong&gt; A number of parameters can be fed to the robot from the PC thus making it a more versatile machine. The parameters are:&lt;br /&gt;The frequency at which the missiles are shot that is controlled by the speed of the conveyor on which the discs move.&lt;br /&gt;The speed of the wheels that controls the range of the disc shot.&lt;br /&gt;The direction at which the missile is shot.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Feedback from Robot to PC:&lt;/strong&gt; the Robot provides on-line feedback to the PC, regarding the number of disc passed below the light sensor.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sorting Mechanism:&lt;/strong&gt; A predefined position is allotted for each different type of disc. On encountering a particular type of disc, the object sorter moves to the desired angle before shooting the disc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Chronological Order of Events&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;span style="color:#000000;"&gt;The user is prompted to enter the following parameters on the PC:&lt;br /&gt;§ Frequency at which missiles are fired&lt;br /&gt;§ The speed at which the missile is fired&lt;br /&gt;§ The direction and angle at which the missile is fired.&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;The PC opens a establishes a connection with the robot (using data streams) and sends the above information in the form of bytes to the robot.&lt;br /&gt;&lt;br /&gt;On obtaining the frequency, speed and the desired angle the robot rotates to the specific angle (using a feedback from the touch sensor and CAM). It then adjusts the speed of the conveyor and the wheels according to the bytes received from the PC.&lt;br /&gt;&lt;br /&gt;The light sensor is activated as soon the robot starts its motion. .The light sensor enables the robot to count the number of disc and to identify the type of disc.&lt;br /&gt;&lt;br /&gt;The above information is sent back to the PC via another data stream.&lt;br /&gt;&lt;br /&gt;In case of object sorter, the robot moves to the preset angle as soon it detects the particular type of disc before shooting the disc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Communications&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Communications is a key element in robotics. Sending data from the RCX to your PC, PC to RCX and from RCX to RCX is key. We are already communicating between PC and RCX every time we download a program.&lt;br /&gt;Java programs use streams to communicate. Stream is a conceptual word and defining it is difficult. One definition is a stream is a connection between two independent entities used to transfer data or information. Think about sitting with another person and having a conversation. Our spoken words are a word stream. For most people, the mouth is an output device and the ear is an input device. Streams are based upon connections and have only one direction; mouths can’t hear and ears can’t speak.&lt;br /&gt;&lt;br /&gt;Java has an extensive set of packages that deal with communications. The designers of Java generalized the idea of streams to include things that you would not expect. Virtually all communications, with the major exception of graphic user interfaces, GUI, between a program and the real world is based upon streams. Examples include surfing the web, saving a file on a hard drive, typing in the console window, and using a modem. The most basic streams are InputStream and OutputStream.&lt;br /&gt;&lt;br /&gt;While people use word streams to communicate, computers use byte streams &amp; data streams. A byte is the smallest primitive data type in Java. As it happens, ASCII characters, letters and numerals, are stored in single bytes. So each ASCII character is sent as one byte in a byte stream. Integers take four bytes so they get sent through the stream as four consecutive bytes. So if a program is on the receiving end of a data stream how can it tell the difference between an int, a byte, a float or whatever? Simple answer is that it can’t. A byte is a byte. What a user has to do is create a protocol.&lt;br /&gt;A protocol is the rules for a conversation that the sender and receiver agree to follow. Protocols are designed to make communication easier. Think about the protocol for using a telephone. The rule of the telephone protocol is that you pick up the phone when it rings.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Applications&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;I. Disk Shooter&lt;/strong&gt;-The above robot can be used as a Disk Shooter, which can be used in the field of “Shooting” in sports. It emulates the working of a disk-shooting machine, which can throw the disk in the air with different speeds &amp;amp; trajectories. A user can set various parameters on his PC &amp; then send them to the robot via IR Tower which beams the instruction to the IR receiver in the RCX. According to the kind of instruction received by the RCX the various motors &amp;amp; sensors perform their respective task of moving the turntable, movement of the disk’s &amp; the shooting mechanisms provided by the wheels of different speed. Industry application of this robot is in the field of Sports.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;II Missile Shooter&lt;/strong&gt;- The above robot can be used as a Missile Shooter, which can be used in the field of “Defense &amp;amp; Warfare” . It emulates the working of a missile-shooting machine, which can target the missile at a particular angle &amp; then load the missile &amp;amp; fires it. A user setting in a control station can set the various missile coordinates &amp; no of missiles to be launched with various other related parameters on his PC &amp;amp; then send them to the robot via IR Tower or IR Remote which beams the instruction to the IR receiver in the RCX. According to the kind of instruction received by the RCX the various motors &amp; sensors perform their respective task of moving the turntable, movement of the disk’s &amp;amp; the shooting mechanisms provided by the tyres of different speed. Thus the same robot can now be used in warfare with a minor modification in the software. Further GPS technology can be used to provide the robot with the exact coordinates of the target.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;III. Object Sorter&lt;/strong&gt;- The multipurpose robot can be used for sorting of different items in the field of “Industrial &amp; Mechanical Engineering” which involve joining of huge assemblies but sorting out different components &amp;amp; then assembling them based on the net product.” Food Processing &amp; Packaging” extensively involves separating of various food items for example candies to be packed can be sorted out into different containers using this robot which makes use of a light sensor to detect the kind of object passing beneath it by change in the wavelength &amp;amp; frequency detected.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;IV. Ball Spinner &amp; Shooter&lt;/strong&gt;-This robot can be used to train the sportsman &amp;amp; is extensively used in sports like “Baseball”,” Cricket” &amp; many other sports. A slight modification in the mechanical components of the robot can produce a “Ball Spinner &amp;amp; Shooter Robot”.&lt;br /&gt;&lt;br /&gt;A large number of applications are possible with this single robot thus providing it multiple dimensions of usage in different field.&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Limitations&lt;/span&gt;&lt;/strong&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;· The height of feeding mechanism of disks is high so it needs a separate person or machine to feed in the disks or missiles&lt;br /&gt;&lt;br /&gt;· IR communication limits the usage of this robot due to its feature of Line of Sight which can cause the robot to respond late or to loose some instructions if its out of the range of the IR Tower&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Future Technology Implementation&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;·&lt;strong&gt; Bluetooth Control&lt;/strong&gt;- Currently the robot can be controlled by a mobile device, which supports HID. This feature provides the user with keyboard mapping feature.&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;SMS Control&lt;/strong&gt;-An SMS control for the robot can be easily made whereby the PC reads the SMS sent to the control phone attached to the PC. As soon as the PC reads this SMS an appropriate command based on the contents of the SMS can be sent to the Robot via IR tower.&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Remote Location Control via Internet &lt;/strong&gt;– This feature can provide a revolutionary control to the robot whereby a user sitting in New York can send commands to a PC in India &amp; control the Robot.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Program:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;The Program consists of two parts:&lt;br /&gt;&lt;br /&gt;Part I : The software running at the PC end.&lt;br /&gt;&lt;br /&gt;Part II: The software running at the robot end.&lt;br /&gt;&lt;br /&gt;Part I:&lt;br /&gt;&lt;br /&gt;import java.io.*;&lt;br /&gt;import josx.rcxcomm.*;&lt;br /&gt;public class MissileSend&lt;br /&gt;{&lt;br /&gt;RCXPort port;// Port to send and receive data from RCX&lt;br /&gt;InputStreamReader stdin;//input stream from console i.e the user input&lt;br /&gt;BufferedReader console;//converts the inputstream from console to BufferReader&lt;br /&gt;int[] data=new int[4];// four data bytes are sent 0 for time; 1 for direction;2 for&lt;br /&gt;frequency;3 for power;&lt;br /&gt;//constructor called to initialize values&lt;br /&gt;public void MissileSend()&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void main(String[] args)&lt;br /&gt;{&lt;br /&gt;MissileSend ms=new MissileSend();&lt;br /&gt;ms.missilesend();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* frequency is setting the power for setting the speed of the conveyor belt&lt;br /&gt;power sets the power at which disc is shot i.e Tyres&lt;br /&gt;time is setting the time for which motor is run to obtain the direction&lt;br /&gt;decide sets east or west&lt;br /&gt;direction is input by the user to set the direction&lt;br /&gt;calculate is calculated by compiler by divinding it by 360 &amp; taking that it takes&lt;br /&gt;9 secs for 360&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private void missilesend()&lt;br /&gt;{&lt;br /&gt;/* Three functions take input from the user to set the value of&lt;br /&gt;frequency(Motor.C), Power (Motor.B)&lt;br /&gt;&amp;amp;amp;amp; Direction (Motor.A).&lt;br /&gt;For Motor C &amp; B we only get Power&lt;br /&gt;For Motor A we get time &amp;amp; direction i.e Clockwise/ Anticlockwise&lt;br /&gt;After obtaining all the inputs from the user it is send to RCX via the&lt;br /&gt;rcxsend function&lt;br /&gt;*/&lt;br /&gt;getFrequency();&lt;br /&gt;getPower();&lt;br /&gt;getDirection();&lt;br /&gt;rcxsend();&lt;br /&gt;rcxreceive();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void getFrequency()// User input function to input frequency&lt;br /&gt;{&lt;br /&gt;int frequency=0;&lt;br /&gt;String s1;&lt;br /&gt;stdin =new InputStreamReader(System.in);&lt;br /&gt;console =new BufferedReader(stdin);&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;System.out.println("Enter the freqeuncy power");&lt;br /&gt;s1 = console.readLine();&lt;br /&gt;frequency = Integer.parseInt(s1);&lt;br /&gt;System.out.println("Power entered ="+frequency);&lt;br /&gt;data[2]=frequency;&lt;br /&gt;}&lt;br /&gt;catch(IOException ioex)&lt;br /&gt;{&lt;br /&gt;System.out.println("Input error");&lt;br /&gt;System.exit(1);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void getPower()// User input function to input power&lt;br /&gt;{&lt;br /&gt;int power=0;&lt;br /&gt;String s2;&lt;br /&gt;stdin =new InputStreamReader(System.in);&lt;br /&gt;console =new BufferedReader(stdin);&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;System.out.println("Enter the power");&lt;br /&gt;s2 = console.readLine();&lt;br /&gt;power = Integer.parseInt(s2);&lt;br /&gt;System.out.println("Power entered ="+power);&lt;br /&gt;data[3]=power;&lt;br /&gt;}&lt;br /&gt;catch(IOException ioex)&lt;br /&gt;{&lt;br /&gt;System.out.println("Input error");&lt;br /&gt;System.exit(1);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void getDirection()// User input function for direction&lt;br /&gt;{&lt;br /&gt;stdin =new InputStreamReader(System.in);&lt;br /&gt;console =new BufferedReader(stdin);&lt;br /&gt;int time,decide;&lt;br /&gt;float direction=0,calculate;&lt;br /&gt;String s3,s4;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;System.out.println("Enter the direction :1 for E/2 for W");&lt;br /&gt;s3 = console.readLine();&lt;br /&gt;decide = Integer.parseInt(s3);&lt;br /&gt;System.out.println("Enter the direction angle");&lt;br /&gt;s4 = console.readLine();&lt;br /&gt;direction = Float.parseFloat(s4);&lt;br /&gt;System.out.println("direction entered ="+direction);&lt;br /&gt;calculate=(direction*18000)/360;//18 seconds for each revolution i.e&lt;br /&gt;360 hence calcuates for user input angle&lt;br /&gt;System.out.println("Calucalted direction="+calculate);&lt;br /&gt;time=(int)calculate;//converting float calculate to integer time&lt;br /&gt;System.out.println("Time send to RCX : "+time);&lt;br /&gt;data[1]=decide;//direction send as 1st element&lt;br /&gt;data[0]=time;//time send as second element&lt;br /&gt;}&lt;br /&gt;catch(IOException ioex)&lt;br /&gt;{&lt;br /&gt;System.out.println("Input error");&lt;br /&gt;System.exit(1);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void rcxsend()&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;port=new RCXPort();&lt;br /&gt;OutputStream os=port.getOutputStream();&lt;br /&gt;DataOutputStream dos=new DataOutputStream(os);&lt;br /&gt;for(int idx=0;idx&lt;=3;idx++) &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;dos.writeInt(data[idx]);// 4 integers send by compiler 1st for direction,2nd for time,3rd for &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;frequency,4 for power &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;dos.flush(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}catch(IOException e) { System.err.println(e);&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;private void rcxreceive()&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;DataInputStream dis;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;dis=new DataInputStream(port.getInputStream());&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;try &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;while(true) &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;System.out.println("Number fired:"+dis.readInt());&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}catch(IOException ie){}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Part II: &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;import josx.platform.rcx.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;import josx.rcxcomm.*; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;import java.io.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;public class Missile implements SensorListener &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;RCXPort port; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;DataInputStream in; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;DataOutputStream out;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;private int time=0,direction=0,frequency=0,power=0;//time for Motor.A ,direction 1/2 for E/W, frequency for Motor.C and power for Motor.B &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;private int number;// to count the number of missile fired private boolean detect;// to detect the presence of missile below the light sensor&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;public Missile() &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ /* the following code Initializes the input stream i.e from Pc TO rCX*/ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;try &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;port=new RCXPort(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;in=new DataInputStream(port.getInputStream()); //&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;out=new DataOutputStream(port.getOutputStream()); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}catch(IOException ie){} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;public static void main(String[] args) &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Missile missile=new Missile(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;missile.rcxoperation(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;private void rcxoperation() &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;int number=0; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;try &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;while(true)// the while loop scans the input stream &amp; calls the appropriate function after getting all the values &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;if(number==0)//first integer sets the time based on the angle entered &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;time=in.readInt(); number++; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;else if(number==1)// second integer sets time and move motor A i.e set direction &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;direction=in.readInt(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;number++; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;else if(number==2)// 3rd integer set frequency &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;int frequency=in.readInt(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.C.setPower(frequency); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;number++; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;else if(number==3)//4th integer sets power &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;int power=in.readInt(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.B.setPower(power); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;number++; operation();//once all the inputs are read from PC begin their execution &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;else if(number==4) &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;feedbackRCX();//CALLS the feedback from RCX and sends the info to computer &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;number=0;//resets the number to zero and again waits for command from computer &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}catch(IOException ie) { LCD.showNumber(8888); } &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;private void operation() &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;direction();//sets the required direction &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;fire();// fires the missile by switching on the conveyor belt and the wheels &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;private void direction()&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;boolean dirnach=false;//checks whether required direction has been achieved or not &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.A.setPower(7); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;if(!dirnach)// if required direction has not been achieved then continue till we obtain and then &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;move to moving motor B &amp; C &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;if(direction==1)//if user inputs 1 then take the time calculated &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.A.forward(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;else if(direction==2)//if user inputs 2 then add some time to time calculated as motor runs slow &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;in other direction &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.A.backward(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;time+=1500;//time added as time uneven &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;try&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Thread.sleep(time);//motor runs for specified time &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}catch(InterruptedException e){} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.A.stop(); dirnach=true; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;private void fire()&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Sensor.S2.setTypeAndMode(SensorConstants.SENSOR_TYPE_LIGHT,SensorC onstants.SENSOR_MODE_PCT);&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Sensor.S2.addSensorListener(this); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Sensor.S2.activate(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.B.backward(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.C.forward(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;try &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Thread.sleep(10000);// assuming it takes 10 secs to fire&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;catch(InterruptedException e){} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.C.stop(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.B.stop(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;private void feedbackRCX() &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;detect=false; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;number=0;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;out=new DataOutputStream(port.getOutputStream()); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;while(true)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.B.backward(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Motor.C.forward(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;public void stateChanged(Sensor aSource,int Old,int New) &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;if((New&gt;=35)&amp;&amp;amp;amp;(!detect))&lt;br /&gt;{&lt;br /&gt;detect=true;&lt;br /&gt;number++;&lt;br /&gt;LCD.showNumber(New);&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;out.writeInt(number);&lt;br /&gt;}catch(IOException ie)&lt;br /&gt;{&lt;br /&gt;LCD.showNumber(8888);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;if(New&lt;=32) &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;LCD.showNumber(New); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;detect=false;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;Screen Shots:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/Lego%20001.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Lego%20001.jpg" border="0" /&gt;&lt;/a&gt;&lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/Lego%20002.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Lego%20002.jpg" border="0" /&gt;&lt;/a&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14797582-112853851988476254?l=automatrons.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://automatrons.blogspot.com/feeds/112853851988476254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14797582&amp;postID=112853851988476254' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112853851988476254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112853851988476254'/><link rel='alternate' type='text/html' href='http://automatrons.blogspot.com/2005/09/multipurpose-robotic-device-targeted.html' title=''/><author><name>Ankush</name><uri>http://www.blogger.com/profile/17987539290159961478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14797582.post-112853645025624425</id><published>2005-09-17T18:58:00.000-07:00</published><updated>2005-10-05T11:21:14.846-07:00</updated><title type='text'></title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/Crane.jpg"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 522px; CURSOR: hand; HEIGHT: 448px; TEXT-ALIGN: center" height="315" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Crane.jpg" width="408" border="0" /&gt;&lt;/a&gt; &lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/Image(336).jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" height="223" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Image%28336%29.jpg" width="298" border="0" /&gt;&lt;/a&gt; &lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/Image(335)1.jpg"&gt;&lt;img style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 334px; CURSOR: hand; HEIGHT: 226px" height="209" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Image%28335%291.jpg" width="283" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Robotic Crane&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;A crane is a tower or derrick equipped with cables and pulleys that is used to lift and lower materials. Cranes are commonly used in the construction industry and in manufacturing heavy equipment. A Crane is a day-to-day machine used in the construction industry to pick up drop heavy loads at specified places. The “Robotic Crane” developed &amp; coded has forward &amp;amp;amp;amp;amp;amp; backward movement control, left &amp; right control of a turntable from 0 to 180 degree &amp;amp; a string up/down control with load attached to a hook.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Advantages/Features of Robotic Crane:&lt;br /&gt;&lt;/strong&gt;· Efficient String Control mechanism,&lt;br /&gt;· Automated control via use of Java Threads&lt;br /&gt;· Direction control via use of a Turntable to enable the crane to move from 0 to 180 degree&lt;br /&gt;· Forward/Backward movement making use of conveyers to provide stability to the heavy structure&lt;br /&gt;· Touch Sensor Control&lt;br /&gt;· IR control via IR Remote&lt;br /&gt;· IR control via USB IR Tower attached to PC&lt;br /&gt;· Manless Control thus providing feature of automation&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Emulating the exact functioning of an actual field Crane is the aim of this robot thus serving as a prototype application before actually manufacturing a huge machine requiring a large amount of finance.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Hardware Used&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;span style="color:#000000;"&gt;RCX&lt;br /&gt;&lt;br /&gt;4 Motors&lt;br /&gt;Motor A : Controlling the forward/backward movement of left &amp; right conveyer’s simultaneously(Two Motors were connected to this port as the number of motors were more than the number of ports available)&lt;br /&gt;Motor B : Controlling the movement of turntable from 0 to 180 degree freedom&lt;br /&gt;Motor C:&lt;/span&gt;&lt;a title="Backhoe" href="http://en.wikipedia.org/wiki/Backhoe"&gt;&lt;span style="color:#000000;"&gt; Controlling the up/down of the string to lift up &amp;amp; drop the load hung to it&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;Turn Table&lt;br /&gt;&lt;br /&gt;Slip Clutch&lt;br /&gt;&lt;br /&gt;Gears&lt;br /&gt;&lt;br /&gt;Treads and hubs&lt;br /&gt;&lt;br /&gt;· Lego Building Blocks&lt;br /&gt;&lt;br /&gt;· Small piece of nylon thread&lt;br /&gt;&lt;br /&gt;· Iron Hook&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step-by-Step Approach&lt;/strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;Approach / Problem Faced and Solution&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;A Crane is subjected to tremendous pressure and thus the body of the crane has to be stable and capable of enduring great pressure&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;PF: The wheels were not able to provide the required stability&lt;br /&gt;&lt;br /&gt;Soln: Threads and Hubs were used to add to the stability&lt;br /&gt;&lt;br /&gt;The long slanting jib (or working arm),which is the portion of the crane that carries the load, of the crane should be able to turn (independently) as required&lt;br /&gt;&lt;br /&gt;Soln: A Turntable was used driven by a separate motor. The power was transmitted by using a combination of two bevel gears.&lt;br /&gt;&lt;br /&gt;A replica of a jib was made with a number of straight beams connected in series and parallel. This jib(which carries the load) has to be rotated gradually to different angles( depending on&lt;br /&gt;the desired position) so that the load can be picked and dropped at the exact location&lt;br /&gt;&lt;br /&gt;Soln: The angle of rotation was controlled using the RCX which could be manually controlled to get the desired angle.&lt;br /&gt;&lt;br /&gt;The nylon thread and the hook (responsible for carrying the load) should have an independent drive (up and down)&lt;br /&gt;&lt;br /&gt;Soln: Another motor was used to drive the assembly of the nylon thread and the hook. Again a combination of bevel gears was used.&lt;br /&gt;&lt;br /&gt;In case of excessive pressure the Jib should be allowed to rotate to ease the pressure and prevent any damage to the setup&lt;br /&gt;&lt;br /&gt;Soln: A slip clutch was used which allows the shaft (passing through the slip clutch)to rotate(in case when torque exceeds 2.5nm-5.0nm) without letting the slip clutch itself to rotate&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Chronological Order of Events&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;The Crane is moved to the desired location using its to and fro motion.&lt;br /&gt;&lt;br /&gt;The jib is rotated to the desired angle.&lt;br /&gt;&lt;br /&gt;The nylon thread and the hook are lowered. The crane is loaded and the hook is retracted to its initial position.&lt;br /&gt;&lt;br /&gt;The crane is taken to the point where the load has to be dropped.&lt;br /&gt;&lt;br /&gt;Again the jib is rotated to achieve the desired angle where it has to be unloaded.&lt;br /&gt;&lt;br /&gt;The hook is lowered and the load is unloaded.&lt;br /&gt;&lt;br /&gt;The above procedure is repeated till required.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Program&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;import josx.platform.rcx.*;&lt;br /&gt;import josx.robotics.*;&lt;br /&gt;&lt;br /&gt;class Drive implements Behavior,ButtonListener&lt;br /&gt;{&lt;br /&gt;private boolean drive,forward,backward; //checks whether we have to go forward&lt;br /&gt;or backward&lt;br /&gt;public Drive()&lt;br /&gt;{&lt;br /&gt;Button.VIEW.addButtonListener(this);&lt;br /&gt;Button.PRGM.addButtonListener(this);&lt;br /&gt;Button.RUN.addButtonListener(this);&lt;br /&gt;drive=true;&lt;br /&gt;forward=false;&lt;br /&gt;backward=false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public boolean takeControl()&lt;br /&gt;{&lt;br /&gt;return drive;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void suppress()&lt;br /&gt;{&lt;br /&gt;Motor.B.stop();&lt;br /&gt;forward=false;&lt;br /&gt;backward=false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void action()&lt;br /&gt;{&lt;br /&gt;while(drive==true)&lt;br /&gt;{&lt;br /&gt;if(forward==true)&lt;br /&gt;forward();&lt;br /&gt;else&lt;br /&gt;if(backward==true)&lt;br /&gt;backward();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void forward()&lt;br /&gt;{&lt;br /&gt;Motor.B.forward();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void backward()&lt;br /&gt;{&lt;br /&gt;Motor.B.backward();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void buttonPressed(Button b)&lt;br /&gt;{&lt;br /&gt;if(b==Button.RUN)&lt;br /&gt;{&lt;br /&gt;backward=false;&lt;br /&gt;forward=true;&lt;br /&gt;drive=true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(b==Button.PRGM)&lt;br /&gt;{&lt;br /&gt;forward=false;&lt;br /&gt;backward=true;&lt;br /&gt;drive=true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(b==Button.VIEW)&lt;br /&gt;{&lt;br /&gt;drive=false;&lt;br /&gt;Crane.lrcontrol=true;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void buttonReleased(Button b){}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class Direction implements Behavior,ButtonListener&lt;br /&gt;{&lt;br /&gt;private boolean left,right;&lt;br /&gt;&lt;br /&gt;public Direction()&lt;br /&gt;{&lt;br /&gt;Button.VIEW.addButtonListener(this);&lt;br /&gt;Button.PRGM.addButtonListener(this);&lt;br /&gt;Button.RUN.addButtonListener(this);&lt;br /&gt;Motor.C.setPower(0);&lt;br /&gt;left=false;&lt;br /&gt;right=false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public boolean takeControl()&lt;br /&gt;{&lt;br /&gt;return Crane.lrcontrol;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void suppress()&lt;br /&gt;{&lt;br /&gt;Motor.C.stop();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void action()&lt;br /&gt;{&lt;br /&gt;while(Crane.lrcontrol==true)&lt;br /&gt;{&lt;br /&gt;if(left==true)&lt;br /&gt;left();&lt;br /&gt;if(right==true)&lt;br /&gt;right();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void left()&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;Motor.C.forward();&lt;br /&gt;Thread.sleep(1500);&lt;br /&gt;Motor.C.stop();&lt;br /&gt;left=false;&lt;br /&gt;right=false;&lt;br /&gt;}catch(Exception e){}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void right()&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;Motor.C.backward();&lt;br /&gt;Thread.sleep(1500);&lt;br /&gt;Motor.C.stop();&lt;br /&gt;right=false;&lt;br /&gt;left=false;&lt;br /&gt;}catch(Exception e){}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public void buttonPressed(Button b)&lt;br /&gt;{&lt;br /&gt;if(b==Button.RUN)&lt;br /&gt;{&lt;br /&gt;Crane.lrcontrol=false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(b==Button.PRGM)&lt;br /&gt;{&lt;br /&gt;right=true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(b==Button.VIEW)&lt;br /&gt;{&lt;br /&gt;left=true;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void buttonReleased(Button b)&lt;br /&gt;{}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class StringControl implements Behavior,ButtonListener&lt;br /&gt;{&lt;br /&gt;private boolean left,right;&lt;br /&gt;&lt;br /&gt;public Direction()&lt;br /&gt;{&lt;br /&gt;Button.VIEW.addButtonListener(this);&lt;br /&gt;Button.PRGM.addButtonListener(this);&lt;br /&gt;Button.RUN.addButtonListener(this);&lt;br /&gt;Motor.C.setPower(0);&lt;br /&gt;left=false;&lt;br /&gt;right=false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public boolean takeControl()&lt;br /&gt;{&lt;br /&gt;return Crane.lrcontrol;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void suppress()&lt;br /&gt;{&lt;br /&gt;Motor.C.stop();&lt;br /&gt;}&lt;br /&gt;public void action()&lt;br /&gt;{&lt;br /&gt;while(Crane.lrcontrol==true)&lt;br /&gt;{&lt;br /&gt;if(left==true)&lt;br /&gt;left();&lt;br /&gt;if(right==true)&lt;br /&gt;right();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void left()&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;Motor.C.forward();&lt;br /&gt;Thread.sleep(1500);&lt;br /&gt;Motor.C.stop();&lt;br /&gt;left=false;&lt;br /&gt;right=false;&lt;br /&gt;}catch(Exception e){}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void right()&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;Motor.C.backward();&lt;br /&gt;Thread.sleep(1500);&lt;br /&gt;Motor.C.stop();&lt;br /&gt;right=false;&lt;br /&gt;left=false;&lt;br /&gt;}catch(Exception e){}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public void buttonPressed(Button b)&lt;br /&gt;{&lt;br /&gt;if(b==Button.RUN)&lt;br /&gt;{&lt;br /&gt;Crane.lrcontrol=false;&lt;br /&gt;}&lt;br /&gt;if(b==Button.PRGM)&lt;br /&gt;{&lt;br /&gt;right=true;&lt;br /&gt;}&lt;br /&gt;if(b==Button.VIEW)&lt;br /&gt;{&lt;br /&gt;left=true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;public void buttonReleased(Button b)&lt;br /&gt;{}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;public class Crane&lt;br /&gt;{&lt;br /&gt;public static volatile boolean lrcontrol;//goes true to give control to turntable&lt;br /&gt;&lt;br /&gt;public static void main(String[] args)&lt;br /&gt;{&lt;br /&gt;Crane.lrcontrol=false;&lt;br /&gt;Behavior b1=new Drive();&lt;br /&gt;Behavior b2=new Direction();&lt;br /&gt;Behavior[] bArray={b1,b2};&lt;br /&gt;Arbitrator arby=new Arbitrator(bArray);&lt;br /&gt;arby.start();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14797582-112853645025624425?l=automatrons.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://automatrons.blogspot.com/feeds/112853645025624425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14797582&amp;postID=112853645025624425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112853645025624425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112853645025624425'/><link rel='alternate' type='text/html' href='http://automatrons.blogspot.com/2005/09/robotic-crane-crane-is-tower-or.html' title=''/><author><name>Ankush</name><uri>http://www.blogger.com/profile/17987539290159961478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14797582.post-112853502189656749</id><published>2005-09-10T10:19:00.000-07:00</published><updated>2005-10-05T10:57:01.953-07:00</updated><title type='text'></title><content type='html'>&lt;strong&gt;&lt;em&gt;EXCAVATOR&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;An excavator, also called a 360-degree excavator or digger, sometimes abbreviated simply to a 360, is an &lt;/span&gt;&lt;a title="Engineering vehicle" href="http://en.wikipedia.org/wiki/Engineering_vehicle"&gt;&lt;span style="color:#000000;"&gt;engineering vehicle&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; consisting of a &lt;/span&gt;&lt;a title="Backhoe" href="http://en.wikipedia.org/wiki/Backhoe"&gt;&lt;span style="color:#000000;"&gt;backhoe&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;(a piece of excavating equipment consisting of a digging bucket on the end of an articulated arm (also called a stick or dipper) ) and &lt;/span&gt;&lt;a title="Cab" href="http://en.wikipedia.org/wiki/Cab"&gt;&lt;span style="color:#000000;"&gt;cab&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; mounted on a &lt;/span&gt;&lt;a title="Pivot" href="http://en.wikipedia.org/wiki/Pivot"&gt;&lt;span style="color:#000000;"&gt;pivot&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; atop an undercarriage with &lt;/span&gt;&lt;a title="Caterpillar track" href="http://en.wikipedia.org/wiki/Caterpillar_track"&gt;&lt;span style="color:#000000;"&gt;tracks&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; or &lt;/span&gt;&lt;a title="Wheel" href="http://en.wikipedia.org/wiki/Wheel"&gt;&lt;span style="color:#000000;"&gt;wheels&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;.&lt;br /&gt;&lt;br /&gt;Excavators are used in many roles:&lt;br /&gt;Digging of trenches, holes, &lt;/span&gt;&lt;a title="Foundation" href="http://en.wikipedia.org/wiki/Foundation"&gt;&lt;span style="color:#000000;"&gt;foundations&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a title="Demolition" href="http://en.wikipedia.org/wiki/Demolition"&gt;&lt;span style="color:#000000;"&gt;Demolition&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;General grading/landscaping&lt;br /&gt;Heavy lift, e.g. lifting and placing of pipes&lt;br /&gt;&lt;/span&gt;&lt;a title="River" href="http://en.wikipedia.org/wiki/River"&gt;&lt;span style="color:#000000;"&gt;River&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;a title="Dredging" href="http://en.wikipedia.org/wiki/Dredging"&gt;&lt;span style="color:#000000;"&gt;dredging&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Advantages/Features of Excavator Robot&lt;/strong&gt;:&lt;br /&gt;· Multi stage &amp; variable depth digging&lt;br /&gt;· Depth variation via software control&lt;br /&gt;· Direction control similar to a Battle Tank&lt;br /&gt;· Forward/Backward movement making use of conveyers to provide stability to the heavy structure&lt;br /&gt;· IR control via IR Remote&lt;br /&gt;· IR control via USB IR Tower attached to PC&lt;br /&gt;· Automated Control via program stored in the RCX RAM thereby providing man less control of the entire operation process &lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;The objective of this experiment is to make a prototype of an unmanned excavator, programmed to automatically increase its depth of digging in the subsequent steps. The excavator is made to move to and fro with gradual increase in the depth of backhoe and thus it is able to disinter with continuous increase in its depth.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;&lt;span style="font-family:georgia;"&gt;Hardware Used&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;RCX&lt;br /&gt;&lt;br /&gt;3 Motors&lt;br /&gt;Motor A : To give motion to the left track&lt;br /&gt;Motor B : To give motion to the right track&lt;br /&gt;Motor C: To control the motion of &lt;/span&gt;&lt;a title="Backhoe" href="http://en.wikipedia.org/wiki/Backhoe"&gt;&lt;span style="color:#000000;"&gt;backhoe&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;24 tooth slip clutch (to prevent slipping of backhoe)&lt;br /&gt;&lt;br /&gt;Worm Wheel&lt;br /&gt;&lt;br /&gt;Gears&lt;br /&gt;&lt;br /&gt;Treads and hubs&lt;br /&gt;&lt;br /&gt;Lego Building Blocks&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Step-by-Step Approach&lt;br /&gt;Approach   /   &lt;/strong&gt;&lt;strong&gt;Problem Faced and Solution&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;· An Excavator is subjected to                               &lt;/span&gt;&lt;/p&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;tremendous pressure and thus  the                                   &lt;br /&gt;body of the excavator has to&lt;br /&gt;be stable and capable of                                             &lt;br /&gt;enduring great pressure                                                          &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;PF: The wheels were not able to provide  the required stability &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Soln: Threads and Hubs were used to add to the stability&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;· The robot should be able to                                      &lt;br /&gt;move in a to and fro motion                                                    &lt;br /&gt;and should also be able to turn                                               &lt;br /&gt;as required                                                                                   &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Soln: Independent motor drives were used for both threads( by  means of gears). For the straight motion both motors are switched on while for turning one motor is switched off and the other is kept on.&lt;br /&gt;&lt;br /&gt;· A replica of a &lt;/span&gt;&lt;a title="Backhoe" href="http://en.wikipedia.org/wiki/Backhoe"&gt;&lt;span style="color:#000000;"&gt;backhoe&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; was made                                  &lt;br /&gt;with a number of angular beams                                               &lt;br /&gt;connected in series on a single                                                    &lt;br /&gt;rotating shaft. This shaft has                                                       &lt;br /&gt;to be rotated gradually to                                                             &lt;br /&gt;different angles( continuously                                                      &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;increasing and decreasing to&lt;br /&gt;varying degrees) so that the&lt;br /&gt;backhoe is able to achieve a&lt;br /&gt;gradual increase of depth while&lt;br /&gt;digging. &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Soln: An independent motor was used to drive the shaft. The angle of rotation was controlled using the RCX which was programmed to get the desired angle at the desired  speed.&lt;br /&gt;&lt;br /&gt;· To achieve the desired accuracy         &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;of angle the shaft should not rotate                                            &lt;br /&gt;on its own due to the weight of the                                      &lt;br /&gt;backhoe. While digging                                                             &lt;br /&gt;The backhoe is lowered and the&lt;br /&gt;Excavator is moved backwards&lt;br /&gt;and thus we have to prevent its&lt;br /&gt;lifting.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Soln: For the transmission a worm wheel was used which allows transmission  in one direction only and thus prevents the shaft to rotate on its own.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;· In case of excessive pressure the  shaft should be allowed to rotate to   ease the pressure and prevent any damage to the setup                                                                 &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Soln: A slip clutch was used which allows  the shaft to rotate without turning the worm wheel(in case when torque exceeds 2.5nm-5.0nm  )&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Chronological Order of Events&lt;br /&gt;&lt;/strong&gt;The Excavator is moved to the desired location with its backhoe at the highest position.&lt;br /&gt;&lt;br /&gt;The backhoe is lowered upto a certain depth and the Excavator moves backwards with the backhoe fixed at that position and hence it disinters the earth.&lt;br /&gt;&lt;br /&gt;Once the Excavator retracts, the backhoe is brought back to the highest position and it again moves forward.&lt;br /&gt;&lt;br /&gt;The excavation procedure is repeated but with increasing depth in subsequent cycles.&lt;br /&gt;The Excavator can be programmed as per the requirement and the incremental change in the depth can also be varied along with the final depth. The angle for the rotation of the motor depends upon the incremental depth.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;Program:&lt;/span&gt;&lt;/strong&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;import josx.platform.rcx.*;&lt;br /&gt;import josx.robotics.*;&lt;br /&gt;&lt;br /&gt;class DriveForward implements Behavior,ButtonListener&lt;br /&gt;{&lt;br /&gt;public DriveForward()&lt;br /&gt;{&lt;br /&gt;Button.RUN.addButtonListener(this);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public boolean takeControl()&lt;br /&gt;{&lt;br /&gt;return true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void suppress()&lt;br /&gt;{&lt;br /&gt;Motor.A.stop();&lt;br /&gt;Motor.C.stop();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void action()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;if(Excavator.buttonpress==false)&lt;br /&gt;{&lt;br /&gt;Motor.A.forward();&lt;br /&gt;Motor.C.forward();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void buttonPressed(Button b)&lt;br /&gt;{&lt;br /&gt;if(b==Button.RUN)&lt;br /&gt;Excavator.buttonpress=true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void buttonReleased(Button b){}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class DriveBackward implements Behavior,ButtonListener&lt;br /&gt;{&lt;br /&gt;int time;&lt;br /&gt;TimingNavigator n;&lt;br /&gt;public DriveBackward()&lt;br /&gt;{&lt;br /&gt;time=500;&lt;br /&gt;n = new TimingNavigator(Motor.C, Motor.A, 5.475f, 5.47f);&lt;br /&gt;Button.VIEW.addButtonListener(this);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public boolean takeControl()&lt;br /&gt;{&lt;br /&gt;return Excavator.buttonpress;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void suppress()&lt;br /&gt;{&lt;br /&gt;Motor.A.stop();&lt;br /&gt;Motor.C.stop();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void action()&lt;br /&gt;{&lt;br /&gt;while(Excavator.buttonpress==true)&lt;br /&gt;{&lt;br /&gt;try{&lt;br /&gt;if(time&lt;1150)&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;{ Motor.B.setPower(1); //low power during paw up &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Motor.B.backward(); //bring paw down &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Thread.sleep(time);&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Motor.B.stop();&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;n.travel(-10); //fwd &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Motor.B.forward(); //brings paw up &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Thread.sleep(time); &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Motor.B.stop(); n.travel(10); //backward &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;else &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;time=500; &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Motor.B.setPower(3); //high power during paw up &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Motor.B.forward(); //bring paw up &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Thread.sleep(800); &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Motor.B.stop(); &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Motor.B.backward(); //brings paw down &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Thread.sleep(time); &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Motor.B.stop(); &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;time=time+200; &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;}catch(Exception e){} &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;}//end of while &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;}//end action &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;public void buttonPressed(Button b) &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;if(b==Button.VIEW) &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Excavator.buttonpress=false; &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;public void buttonReleased(Button b){} &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;public class Excavator &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;public static boolean buttonpress; &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;public static void main(String[] args) &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;buttonpress=false; &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Behavior b1=new DriveForward(); &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Behavior b2=new DriveBackward(); &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Behavior[] bArray={b1,b2}; &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;Arbitrator arby=new Arbitrator(bArray);&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;arby.start(); &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;Screen Shots:&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/IM000164.jpg"&gt;&lt;img style="FLOAT: right; MARGIN: 0px 0px 10px 10px; CURSOR: hand" height="225" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/IM000164.jpg" width="296" border="0" /&gt;&lt;/a&gt; &lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/IM0001632.JPG"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 317px; CURSOR: hand; HEIGHT: 218px" height="213" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/IM0001632.JPG" width="305" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/IM000167.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 320px; CURSOR: hand; HEIGHT: 247px" height="221" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/IM000167.jpg" width="297" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/IM000166.jpg"&gt;&lt;img style="FLOAT: right; MARGIN: 0px 0px 10px 10px; CURSOR: hand" height="229" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/IM000166.jpg" width="300" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14797582-112853502189656749?l=automatrons.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://automatrons.blogspot.com/feeds/112853502189656749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14797582&amp;postID=112853502189656749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112853502189656749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112853502189656749'/><link rel='alternate' type='text/html' href='http://automatrons.blogspot.com/2005/09/excavator-excavator-also-called-360.html' title=''/><author><name>Ankush</name><uri>http://www.blogger.com/profile/17987539290159961478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14797582.post-112619165253637192</id><published>2005-09-08T07:58:00.000-07:00</published><updated>2005-09-08T08:00:52.543-07:00</updated><title type='text'></title><content type='html'>&lt;div align="center"&gt;&lt;strong&gt;&lt;em&gt;Focus Problem in Wireless Project&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div align="left"&gt;We have been working on the project for quite sometime and have been able to make the modulator andde-modulator circuit. Our biggest problem is to ensurea reliable focus mechanism.We are actually using a 35Khz subcarrier for FMmodulation before modulating the laser's amplitudewith the sub-carrier modulated signal. Hence even pooror nonlinear responce on the part of detector isacceptable but it must work at a considerable speed ofatleast 50kHzWe have tried the following measures:· &lt;/div&gt;&lt;div align="left"&gt;Using a single photodiode: The small sensitive areaof the photodiode makes it very difficult to use. Alsothe light has to be parallel to the axis of thephotodiode, failing which it doesn't reach thesensitive area at all· &lt;/div&gt;&lt;div align="left"&gt;Using an array of photodiodes: It solved the problemof a small sensitive area but the second problem ( oflight to be parallel) is still not addressed· &lt;/div&gt;&lt;div align="left"&gt;Using CCD array: Along with the problem of itsexorbitant cost, it fails to serve our purpose as itis virtually impossible to detect light falling at asingle pixel.· Using LDR (Light Dependent Resistor): Problem withLDR is its response time. Currently we are workingwith a frequency of about 20-30 KHz. The response timeof the LDR is about 35 Hz almost 1/1000th of what we need.&lt;/div&gt;&lt;div align="left"&gt; Using a Diffuser: The diffuser is producing anegligible scattering and doesn't serve the purpose.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14797582-112619165253637192?l=automatrons.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://automatrons.blogspot.com/feeds/112619165253637192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14797582&amp;postID=112619165253637192' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112619165253637192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112619165253637192'/><link rel='alternate' type='text/html' href='http://automatrons.blogspot.com/2005/09/focus-problem-in-wireless-project-we.html' title=''/><author><name>Ankush</name><uri>http://www.blogger.com/profile/17987539290159961478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14797582.post-112358272520434534</id><published>2005-08-09T15:17:00.000-07:00</published><updated>2005-08-09T03:18:45.206-07:00</updated><title type='text'></title><content type='html'>&lt;div align="center"&gt;&lt;strong&gt;&lt;em&gt;Introduction to Free Space Optic Experiment&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt; Well in short I am going to tell what all we have done till now.&lt;br /&gt;&lt;br /&gt;This work was done till end of June.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Circuit&lt;/b&gt;&lt;br /&gt;A simple circuit for transmitter and receiver circuit is more or less&lt;br /&gt;two (AC) amplifier circuit which amplifies to about 1-11 or 1-21 times&lt;br /&gt;depending upon the ratio of Rf and Rin (1:10 &amp;amp; 1:20). Op-amp 741 is used&lt;br /&gt;for amplification.&lt;br /&gt;The transmitter amplifies up to 11 times depending upon the preset&lt;br /&gt;value of Rf, the output fed to a key-chain laser.&lt;br /&gt;Similarly the receiver amplifies the signal on the photo-diode to up to&lt;br /&gt;21 times to be feed to a 4ohm (probably 1W or 4W) speaker through a&lt;br /&gt;470uF capacitor.&lt;br /&gt;Some extra small capacitors are used in the circuit. Their main purpose&lt;br /&gt;is to filter out DC component and amplify only the AC signal in&lt;br /&gt;concern.&lt;br /&gt;A npn-pnp BJT with shorted emitters and bases with npn's collector to&lt;br /&gt;Vcc and pnp's collector to ground (or say Vee) is used in the path of&lt;br /&gt;the feedback, i.e. the output of the op-amp fed to the shorted (or&lt;br /&gt;common) base and from the shorted (or common) emitter, signal is passed&lt;br /&gt;through Rf back to the -ve terminal of the op-amp. The exact purpose is not&lt;br /&gt;known but I guess it is for current amplification.&lt;br /&gt;Vcc to Vee/Gnd is about 6V.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Working&lt;/b&gt;&lt;br /&gt;This setup worked quite nicely for up to 2-5 meters (considering the&lt;br /&gt;crudeness of the circuit and the low power of the laser).&lt;br /&gt;&lt;br /&gt;Audio was quite grainy but just distinguishable at about 10 meters&lt;br /&gt;under well lit room conditions.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Currently we are working to modulate (low freq FM) the voice signal&lt;br /&gt;and then send it to the laser so that the clarity increases.&lt;br /&gt;We are also going to through the problem of finding suitable laser and&lt;br /&gt;on the receiving side photodiode - focusing arrangement.&lt;br /&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14797582-112358272520434534?l=automatrons.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://automatrons.blogspot.com/feeds/112358272520434534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14797582&amp;postID=112358272520434534' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112358272520434534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112358272520434534'/><link rel='alternate' type='text/html' href='http://automatrons.blogspot.com/2005/08/introduction-to-free-space-optic.html' title=''/><author><name>Ankush</name><uri>http://www.blogger.com/profile/17987539290159961478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14797582.post-112239199933828300</id><published>2005-07-26T21:10:00.000-07:00</published><updated>2005-07-26T08:33:19.343-07:00</updated><title type='text'></title><content type='html'>&lt;div align="center"&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;"&gt;SPECIAL LEGO COMPONENTS&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="317" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Differential.jpg" width="386" border="0" /&gt;&lt;/strong&gt;&lt;/div&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="274" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/SlipClutch.jpg" width="348" border="0" /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="276" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/MotorMounts.jpg" width="345" border="0" /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 423px; CURSOR: hand; HEIGHT: 303px; TEXT-ALIGN: center" height="233" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/TouchSensor.jpg" width="357" border="0" /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/LIGHTSENSOR.jpg" border="0" /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 490px; CURSOR: hand; HEIGHT: 301px; TEXT-ALIGN: center" height="231" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/ROTATIONSENSOR.jpg" width="382" border="0" /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 469px; CURSOR: hand; HEIGHT: 264px; TEXT-ALIGN: center" height="264" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/wORM.jpg" width="419" border="0" /&gt; &lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 418px; CURSOR: hand; HEIGHT: 297px; TEXT-ALIGN: center" height="268" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/RACK1.jpg" width="361" border="0" /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/RACK.jpg"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14797582-112239199933828300?l=automatrons.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://automatrons.blogspot.com/feeds/112239199933828300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14797582&amp;postID=112239199933828300' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112239199933828300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112239199933828300'/><link rel='alternate' type='text/html' href='http://automatrons.blogspot.com/2005/07/special-lego-components.html' title=''/><author><name>Ankush</name><uri>http://www.blogger.com/profile/17987539290159961478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14797582.post-112239031687231013</id><published>2005-07-26T20:18:00.000-07:00</published><updated>2005-07-26T08:05:16.876-07:00</updated><title type='text'></title><content type='html'>&lt;div align="center"&gt;         &lt;strong&gt;&lt;span style="font-family:times new roman;"&gt;STANDARD LEGO BUILDING BLOCKS&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;/span&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 494px; CURSOR: hand; HEIGHT: 369px; TEXT-ALIGN: center" height="256" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Axles.jpg" width="332" border="0" /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 397px; CURSOR: hand; HEIGHT: 305px; TEXT-ALIGN: center" height="225" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Beams.jpg" width="332" border="0" /&gt;&lt;/strong&gt;&lt;/div&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 344px; CURSOR: hand; HEIGHT: 248px; TEXT-ALIGN: center" height="243" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Belts.jpg" width="337" border="0" /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 336px; CURSOR: hand; HEIGHT: 263px; TEXT-ALIGN: center" height="256" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Bricks.jpg" width="334" border="0" /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="276" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Bushing.jpg" width="355" border="0" /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="261" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Connectors.jpg" width="347" border="0" /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 356px; CURSOR: hand; HEIGHT: 242px; TEXT-ALIGN: center" height="235" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Gears.jpg" width="348" border="0" /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 350px; CURSOR: hand; HEIGHT: 252px; TEXT-ALIGN: center" height="240" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Pins.jpg" width="339" border="0" /&gt; &lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="289" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Plates.jpg" width="350" border="0" /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/Wheels.jpg" border="0" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14797582-112239031687231013?l=automatrons.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://automatrons.blogspot.com/feeds/112239031687231013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14797582&amp;postID=112239031687231013' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112239031687231013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112239031687231013'/><link rel='alternate' type='text/html' href='http://automatrons.blogspot.com/2005/07/standard-lego-building-blocks.html' title=''/><author><name>Ankush</name><uri>http://www.blogger.com/profile/17987539290159961478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14797582.post-112238736383139068</id><published>2005-07-26T19:45:00.000-07:00</published><updated>2005-07-26T07:16:03.836-07:00</updated><title type='text'></title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/RCX1.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;span style="font-family:times new roman;"&gt;Introdutction To Lego Mindstorms&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The LEGO MINDSTORMS RIS KIT&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The LEGO MINDSTORMS system is a complete series of products for the development of robots and automation applications in general. The central set of the LEGO robotics line is the RIS, a set of tools that offers us computing power, great ease of use, and versatility. With this kit, one can design a personal robot, build it using ready-to-use pieces, and program it with a specific programming language, and finally test it to see if it matches our expectations—and most important, to rebuild and reprogram it as per our wish. The brain of the system is the RCX microcomputer, initially developed in collaboration with the Massachusetts Institute of Technology (MIT) Media Lab; the kit also contains many other fundamental pieces, including input and output devices (sensors and motors). From this very powerful combination one can make countless completely independent. Robots provide a great way to enhance creativity and imagination and provide hours of great fun &amp; development.&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Robot Kit Components&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If we were to open a brand new RIS 2.0 box and analyze the contents of the kit in detail, we would find more than 700 pieces, most of which are standard TECHNIC parts, such as Beams, Plates, Gears, Axles, Pulleys, Wheels, Cables and Connectors. Robotics development and represent the heart of the system. They are:&lt;br /&gt;I. The RCX Programmable Microcomputer, Version 2.0&lt;br /&gt;II. 2 Motors (9V)&lt;br /&gt;III. 2 touch sensors&lt;br /&gt;IV. 1 light sensor&lt;br /&gt;V. A USB infrared (IR) transmitter tower&lt;br /&gt;VI. A fiber-optic cable&lt;br /&gt;VII. A printed Constructopedia Manual&lt;br /&gt;VIII. Software on CD-ROM&lt;br /&gt;&lt;br /&gt;The RCX can be thought of as the kernel of the entire set. It can read external events through sensors and control movements through motors; and it can be easily programmed with the RCX Code, which is a specific programming language provided on the software CD. The kit contains both Input devices; active (light) and passive (touch) sensors, and output devices (the two motors). These components are fundamental to robotics, as they provide a way for them to interact with the world.&lt;br /&gt;&lt;br /&gt;Touch and light sensors can give us robot information on its movements, positioning, and general behavior. Motors are the starting point for every movement and activity; they can control gears, wheels, axles and other moving parts. The black and gray tower find in the set is the component through which LEGO robots communicate with the PC. It is in fact an infrared (IR) transmitter that sends code and information from the computer to the programmable unit. Also, the fiber-optic cable has a very specific function: if connected to the IR tower it allows us to program the Micro Scout (the smallest member of the MINDSTORMS family) through a communication protocol called Visible Light Link (VLL).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/RCX.jpg"&gt;&lt;img style="CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/RCX.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Figure 1.1 RCX&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;RCX: The Robot’s Brain&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The Robotics Command Explorer (RCX) is the brain of any MINDSTORMS robot. It is often called the “Programmable Brick” or “Smart Brick” because it resembles a standard LEGO piece in many of its characteristics, though a great power hides within it. The RCX is actually a small computer based on the Hitachi H8 Series Microprocessor and fully equipped with memory, timers and input and output devices. When a user writes program on his personal computer, the program is download it to the RCX via infrared tower and executed on the RCX, the result is a completely self-sufficient entity that can behave autonomously, which is the difference between a true “Intelligent” robot and an automated machine.&lt;br /&gt;&lt;br /&gt;It is a Hitachi H8/300-based microcomputer system that features:&lt;br /&gt;I. 32 Kilobytes of onboard memory.&lt;br /&gt;II. Three 12-volt output ports for controlling electric drive motors.&lt;br /&gt;III. Three input ports for reading a variety of digital sensors (touch, rotation, light, and temperature).&lt;br /&gt;IV. An infrared port for communication with personal computers and other RCXs.&lt;br /&gt;&lt;br /&gt;Figure 1.1 &amp; 1.2 shows the RCX &amp;amp; various component connections with the RCX.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="WIDTH: 350px; CURSOR: hand; HEIGHT: 236px" height="151" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/RCX2.jpg" width="320" border="0" /&gt;&lt;/div&gt;&lt;div align="left"&gt;Figure1.2 RCX Connections&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;strong&gt;The Logical Structure&lt;br /&gt;&lt;/strong&gt;Imagine a structure made of multiple layers (see Figure 1.3). At the very bottom there is the processor, which is a Hitachi H8300 series. This processor executes the machine code instructions. Additional components have the task of converting input signals from the three sensor ports into digital data. The next layer in the system is the ROM code. A new RCX comes with a set of instructions that provides all the basic functionalities to the unit, like port control, display and IR communications. If you’re familiar with its architecture, you can compare the ROM to the BIOS of a personal computer that boots and communicates with its peripherals.&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/2047/1298/320/STRUCT1.jpg" border="0" /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/2047/1298/1600/STRUCT.jpg"&gt;&lt;/a&gt;&lt;br /&gt;Figure 1.3 Logical Structures&lt;br /&gt;&lt;br /&gt;Just above the ROM code in the schematic structure is the firmware. This is a sort of operating system for our RCX unit, providing functionality to the entire system. The word “firmware” identifies a particular kind of software that is usually not alterable by the final user, though in this case there’s an important exception, as we will see. The firmware’s duty is to interpret the byte code and convert it into machine code instructions, calling the ROM code routines to perform standard system operations. It is stored in the RAM, meaning that it is downloaded at your first installation of the MINDSTORMS system; yet it needs to be downloaded again through the IR tower every time user power down the RCX for more than a few seconds, namely by removing the batteries.&lt;br /&gt;On top of the firmware there is user code and the stored data. The software on the PC converts the RCX Code into a format that is more compact and readable by the RCX processor (that is, bytecode). The RAM is logically divided into different sections: 16 Kb for the firmware, 6 Kb for storing user grams, and the rest used for interpreting the byte code and handling data for the program’s execution. Even if they are all in the same physical area, following o layer-based logical structure, we can consider the programs to be in a higher&lt;br /&gt;Note that when turning the RCX off, the RAM remains connected the power supply so that it can retain its contents (both the firmware and the program data), so it will slowly consume the batteries even when switched To avoid this, user can remove the batteries if he plans not to use the unit for a long time, but remember that he will have to redownload the firmware (and a program you had already stored in RAM) before attempting to use it again.&lt;br /&gt;&lt;br /&gt;Summarization of the process in a top-to- bottom scheme:&lt;br /&gt;Using RCX Code (or other software), user writes a program on a PC&lt;br /&gt;User program’s instructions are transformed into low-level instructions (byte codes)&lt;br /&gt;User downloads the program (in byte code form) to the RCX’s RAM using the IR transmitter tower&lt;br /&gt;The firmware interprets the byte code and converts it into machine code instructions using ROM routines&lt;br /&gt;The processor executes the machine code&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14797582-112238736383139068?l=automatrons.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://automatrons.blogspot.com/feeds/112238736383139068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14797582&amp;postID=112238736383139068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112238736383139068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112238736383139068'/><link rel='alternate' type='text/html' href='http://automatrons.blogspot.com/2005/07/introdutction-to-lego-mindstorms-lego.html' title=''/><author><name>Ankush</name><uri>http://www.blogger.com/profile/17987539290159961478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14797582.post-112229826027446920</id><published>2005-07-25T19:00:00.000-07:00</published><updated>2005-07-25T06:40:46.256-07:00</updated><title type='text'></title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/1887/1257/1600/LEGO%20MINDSTORM%209747.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This blog has been created with the aim of achieving collaboration between people from various technical departments to pursue various projects in different fields. Currently the projects are being undertaken in the following fields:&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/1887/1257/1600/LEGO%20MINDSTORM%2097471.jpg"&gt;&lt;img style="WIDTH: 173px; CURSOR: hand; HEIGHT: 99px" height="115" alt="" src="http://photos1.blogger.com/blogger/1887/1257/200/LEGO%20MINDSTORM%2097471.jpg" width="173" border="0" /&gt;&lt;/a&gt;&lt;a href="http://photos1.blogger.com/blogger/1887/1257/1600/lejos.jpg"&gt;&lt;img style="CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/1887/1257/200/lejos.jpg" border="0" /&gt;&lt;/a&gt; &lt;a href="http://photos1.blogger.com/blogger/1887/1257/1600/wireless.jpg"&gt;&lt;img style="CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/1887/1257/200/wireless.jpg" border="0" /&gt;&lt;/a&gt; &lt;a href="http://photos1.blogger.com/blogger/1887/1257/1600/java.gif"&gt;&lt;img style="CURSOR: hand" height="138" alt="" src="http://photos1.blogger.com/blogger/1887/1257/200/java.gif" width="97" border="0" /&gt;&lt;/a&gt; &lt;a href="http://photos1.blogger.com/blogger/1887/1257/1600/images.jpg"&gt;&lt;img style="CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/1887/1257/200/images.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Lego Mindstorms&lt;/li&gt;&lt;li&gt;Lejos (Java platform for lego mindstomrs)&lt;/li&gt;&lt;li&gt;Optical Wireless&lt;/li&gt;&lt;li&gt;JAVA&lt;/li&gt;&lt;li&gt;J2ME&lt;/li&gt;&lt;li&gt;Project for National Association for Blind&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14797582-112229826027446920?l=automatrons.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://automatrons.blogspot.com/feeds/112229826027446920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14797582&amp;postID=112229826027446920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112229826027446920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14797582/posts/default/112229826027446920'/><link rel='alternate' type='text/html' href='http://automatrons.blogspot.com/2005/07/this-blog-has-been-created-with-aim-of.html' title=''/><author><name>Ankush</name><uri>http://www.blogger.com/profile/17987539290159961478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
