Scilab GUI based robot.


                
             This is the project in which our bot or any system using microcontroller is controlled from our computer. Concept seems to be easy, but we are interested to use GUI i.e graphical user interface to control our bot. Just say, you will be able to control your bot by clicking push buttons on computer screen. This will be our GUI application. Initially while talking with computer and microcontroller communication , we should take care of the fact that both work on different frequencies. So computer can't directly communicate with the micro controller. It has to do something before sending the data to microcontroller and also microcontroller at the receving station has to some extra task to understsnd that commands. This whole process can't summerized by saying , we will use serial communication between our PC and microcontroller in BOT. There can be two different ways to do communication.
 1) Parellel communication   2) Serial communication
But in my project I will be using serial communication . Because as per my opinion, parallel port has big size and more number of pins as compared to serial. So using parallel port will not be compatible for locomotion of our bot. But parallel port is more faster than serial so , there will be some drawback in case of time for serial communication.
                  This project is devided in two components:
1) Software part on the Computer .
2 ) Hardware part on robot.
              In the software part we are going to design and code graphical user interface (GUI) application for our bot. That is software for our bot , and hardware part includes assembly of bot, choice of microcontroller, devolopment board , and code on that microcontroller. 
             Here I am going to list all the softwares and hardware , I have used in this project.
   1) software part :
               1) Scilab  5.5.0 (64 bit windows)
               2) Windows 8.1 platform
               3) atoms serial communication toolbox
               4) atoms guibuilder toolbox
               5) Arduino  1.0.5-r2  IDE(integrated delelopment env.)
   2) Hardware part
              1) Arduino uno delelopment board
              2) L293D motor driver circuit.
              3) Motors and bot hardware.

           One thing you all can notice all the things I am using here are open source except windows, but it also be eliminated with linux or ubuntu easily, so that does't matter. Scilab , is open sourse software equivalent to MATLAB . 

Why open source ? Why Scilab ?  :
            Some days ago , I was working on MATLAB r2008a version and i was trying to execute serial communication commands . But they didn't worked with that version of MATLAB. Actually that version of MATLAB has this bug ( as per information from mathworks.com) and this bug is eliminated in new versions of MATLAB. But matlab not being opensource. There are some limitation on use of it. And it is big application so takes time to update to new version. And more specifically it's illigal to use it without license. So best option to us is Scilab these days. 
              Scilab being open source , is available for free. It's code is shared. So in the end of this project I may get some idea about it's source sode and can contribute to it for it's future development, just like happened with linux. by the way it's safe and easy to use open source , isn't it ? One more thing we are not doing any image processing in this project so we actually don't require image processing toolbox. Being open source , it may be easy while debuging our code and all this things.
              So , Scilab will be the best option for begining projects, where not more sopisticated applications required in project.So this project can be referred as open source project.  Most of the commands in scilab are same as that of MATLAB, so it will not take much efforts to switch from MATLAB to Scilab.

Steps :
Main steps towards creation of GUI based bot are as :
    1) Assembling of bot with motor driver circuit.
    2) Establishing Serial Communication from computer in scilab.
    3) development of GUI application in Scilab.
    4) Linking serial communications with GUI.
    5) Writing code for Arduino for receving serial commands and to perform designated tasks after that.
    6) Debuging 

1) Assembly of bot :
         
  2) Serial communication between computer and bot :
             In Scilab first to start the serial communication . We have to initialise it by defining the serial variable. Here , Scilab doesn't come with preinstalled serial communication toolbox. So if you have just installed scilab then serial communication commands won't work. First install Atoms serial communication toolbox by downloading it from Atmos website or by typing command.
         atomsInstall('Serial');
        After installing it, scilab will atomatically load this toolbox wen you start the Scilab next time. Now to establish serial communication . We have command for defining serial varialbel 'h'as :
        h = openserial(4,'9600,n,8,1");
Here h is out serial variable , to which we will be refering weenver we have to send data to . number 4 is COM4 thst is PORT used by our Arduino board. It can change over computer to computer so we have to see which COM port we are getting for our Arduino. TO check COM port, We can just click ' This PC' --> properties -->Device manager -- > ports and see which COM number is assigned to our arduino.
           
                    Now with baud rate 9600 (default) , and start bit 1 our serial object is ready to use . NOw we can use it by sending data over this COM4 port by commands.
                    writeserial(h,'string');
                               readserial(h);
In Our GUI application we will be using same commands to communicate with our microcontroller. 

3) Development of GUI application on scilab : 
               This is the main task of this project. For preparing efficient GUI's we have to use guibuilder in scilab. BUt here also first we have to innitialise it by downloading it from Atoms website and using the command : atomsInstall('guibuilder'); After that gui builder is radey to use. But as compared to MATLAB is it somehow hard to use gui builder and develop gui apps, but still scilab is not fully developed yet, and you can say , this can be the sector were scilab needs some contribution from me and you.   
 


 

    
     


No comments:

Post a Comment