SciPy Conference 2012 A talk on SBHS Virtual labs using Python Team SBHS led by Prof. Kannan Moudgalya Speaker Rupak Rokade Indian Institute of Technology Bombay Project funded by National Mission on Education through ICT,MHRD. December 29, 2012 Rupak Rokade SBHS Vlabs using Python 1/17
Virtual Labs ◮ Simulation Virtual lab ◮ Remote triggered Virtual lab Rupak Rokade SBHS Vlabs using Python 2/17
Single Board Heater System Rupak Rokade SBHS Vlabs using Python 3/17
Block diagram of SBHS Rupak Rokade SBHS Vlabs using Python 4/17
What does this system do? Controlling the temperature of a blade ◮ by heating with heater ◮ by cooling with a fan Rupak Rokade SBHS Vlabs using Python 5/17
Main components of SBHS ◮ Heater assembly Rupak Rokade SBHS Vlabs using Python 6/17
Main components of SBHS ◮ Heater assembly ◮ Consists of an iron plate placed at a distance of about 3.5 mm from the nichrome coil Rupak Rokade SBHS Vlabs using Python 6/17
Main components of SBHS ◮ Heater assembly ◮ Consists of an iron plate placed at a distance of about 3.5 mm from the nichrome coil ◮ Coil gets heated on passage of current Rupak Rokade SBHS Vlabs using Python 6/17
Main components of SBHS ◮ Heater assembly ◮ Consists of an iron plate placed at a distance of about 3.5 mm from the nichrome coil ◮ Coil gets heated on passage of current ◮ Iron plate gets heated due to transfer of heat from coil through convection Rupak Rokade SBHS Vlabs using Python 6/17
Main components of SBHS ◮ Heater assembly ◮ Consists of an iron plate placed at a distance of about 3.5 mm from the nichrome coil ◮ Coil gets heated on passage of current ◮ Iron plate gets heated due to transfer of heat from coil through convection ◮ Computer fan Rupak Rokade SBHS Vlabs using Python 6/17
Main components of SBHS ◮ Heater assembly ◮ Consists of an iron plate placed at a distance of about 3.5 mm from the nichrome coil ◮ Coil gets heated on passage of current ◮ Iron plate gets heated due to transfer of heat from coil through convection ◮ Computer fan ◮ Positioned below the plate Rupak Rokade SBHS Vlabs using Python 6/17
Main components of SBHS ◮ Heater assembly ◮ Consists of an iron plate placed at a distance of about 3.5 mm from the nichrome coil ◮ Coil gets heated on passage of current ◮ Iron plate gets heated due to transfer of heat from coil through convection ◮ Computer fan ◮ Positioned below the plate ◮ Meant for cooling the assembly Rupak Rokade SBHS Vlabs using Python 6/17
Main components of SBHS ◮ Heater assembly ◮ Consists of an iron plate placed at a distance of about 3.5 mm from the nichrome coil ◮ Coil gets heated on passage of current ◮ Iron plate gets heated due to transfer of heat from coil through convection ◮ Computer fan ◮ Positioned below the plate ◮ Meant for cooling the assembly ◮ Temperature Sensor Rupak Rokade SBHS Vlabs using Python 6/17
Main components of SBHS ◮ Heater assembly ◮ Consists of an iron plate placed at a distance of about 3.5 mm from the nichrome coil ◮ Coil gets heated on passage of current ◮ Iron plate gets heated due to transfer of heat from coil through convection ◮ Computer fan ◮ Positioned below the plate ◮ Meant for cooling the assembly ◮ Temperature Sensor ◮ AD590 Rupak Rokade SBHS Vlabs using Python 6/17
Main components of SBHS ◮ Heater assembly ◮ Consists of an iron plate placed at a distance of about 3.5 mm from the nichrome coil ◮ Coil gets heated on passage of current ◮ Iron plate gets heated due to transfer of heat from coil through convection ◮ Computer fan ◮ Positioned below the plate ◮ Meant for cooling the assembly ◮ Temperature Sensor ◮ AD590 ◮ Reading in µ A per Kelvin Rupak Rokade SBHS Vlabs using Python 6/17
Software architecture SBHS vlabs Server Computer Client Computer Python Python USB SBHS 1 Server HUB Client Network/ scilabwrite scilabread Internet SBHS 2 file file Database Server Scilab Web Web SBHS 7 Server Browser Rupak Rokade SBHS Vlabs using Python 7/17
Implementation Rupak Rokade SBHS Vlabs using Python 8/17
Implementation Server side Hardware access Rupak Rokade SBHS Vlabs using Python 8/17
Implementation Server side Hardware access ◮ Python is used for interfacing to hardware Rupak Rokade SBHS Vlabs using Python 8/17
Implementation Server side Hardware access ◮ Python is used for interfacing to hardware ◮ Serial library included Rupak Rokade SBHS Vlabs using Python 8/17
Implementation Server side Hardware access ◮ Python is used for interfacing to hardware ◮ Serial library included ◮ Baud rate etc can be easily set Rupak Rokade SBHS Vlabs using Python 8/17
Implementation Server side Hardware access ◮ Python is used for interfacing to hardware ◮ Serial library included ◮ Baud rate etc can be easily set ◮ Direct communication to /dev/ttyUSB* files Rupak Rokade SBHS Vlabs using Python 8/17
Implementation contd... Rupak Rokade SBHS Vlabs using Python 9/17
Implementation contd... Server side web hosting ◮ Socket, RMI, http etc.. ways of client-server communication Rupak Rokade SBHS Vlabs using Python 9/17
Implementation contd... Server side web hosting ◮ Socket, RMI, http etc.. ways of client-server communication ◮ HTTP is chosen Rupak Rokade SBHS Vlabs using Python 9/17
Implementation contd... Server side web hosting ◮ Socket, RMI, http etc.. ways of client-server communication ◮ HTTP is chosen ◮ Why? Rupak Rokade SBHS Vlabs using Python 9/17
Implementation contd... Server side web hosting ◮ Socket, RMI, http etc.. ways of client-server communication ◮ HTTP is chosen ◮ Why? Rupak Rokade SBHS Vlabs using Python 9/17
Implementation contd... Server side web hosting ◮ Socket, RMI, http etc.. ways of client-server communication ◮ HTTP is chosen ◮ Why?It is browser based Rupak Rokade SBHS Vlabs using Python 9/17
Implementation contd... Server side web hosting ◮ Socket, RMI, http etc.. ways of client-server communication ◮ HTTP is chosen ◮ Why?It is browser based Rupak Rokade SBHS Vlabs using Python 9/17
Implementation contd... Rupak Rokade SBHS Vlabs using Python 10/17
Implementation contd... ◮ Obvious need of a web server Rupak Rokade SBHS Vlabs using Python 10/17
Implementation contd... ◮ Obvious need of a web server ◮ Examples of web server, apache, nginx, IIS etc.. Rupak Rokade SBHS Vlabs using Python 10/17
Implementation contd... ◮ Obvious need of a web server ◮ Examples of web server, apache, nginx, IIS etc.. ◮ But web server will handle only requests, routine calls and traffic management Rupak Rokade SBHS Vlabs using Python 10/17
Implementation contd... ◮ Obvious need of a web server ◮ Examples of web server, apache, nginx, IIS etc.. ◮ But web server will handle only requests, routine calls and traffic management ◮ Need of server side scripting language Rupak Rokade SBHS Vlabs using Python 10/17
Implementation contd... Rupak Rokade SBHS Vlabs using Python 11/17
Implementation contd... ◮ Examples of server side scripting language, php, python, perl, asp etc.. Rupak Rokade SBHS Vlabs using Python 11/17
Implementation contd... ◮ Examples of server side scripting language, php, python, perl, asp etc.. ◮ We choose python Rupak Rokade SBHS Vlabs using Python 11/17
Implementation contd... ◮ Examples of server side scripting language, php, python, perl, asp etc.. ◮ We choose python ◮ But plane python will require coding from scratch Rupak Rokade SBHS Vlabs using Python 11/17
Implementation contd... ◮ Examples of server side scripting language, php, python, perl, asp etc.. ◮ We choose python ◮ But plane python will require coding from scratch ◮ Choose Django (python based web development framework) Rupak Rokade SBHS Vlabs using Python 11/17
Implementation contd... Rupak Rokade SBHS Vlabs using Python 12/17
Implementation contd... Why Django ? Rupak Rokade SBHS Vlabs using Python 12/17
Implementation contd... Why Django ? ◮ Session management Rupak Rokade SBHS Vlabs using Python 12/17
Implementation contd... Why Django ? ◮ Session management ◮ Data security Rupak Rokade SBHS Vlabs using Python 12/17
Implementation contd... Why Django ? ◮ Session management ◮ Data security ◮ Url management Rupak Rokade SBHS Vlabs using Python 12/17
Implementation contd... Rupak Rokade SBHS Vlabs using Python 13/17
Implementation contd... Client side ◮ Python client Rupak Rokade SBHS Vlabs using Python 13/17
Implementation contd... Client side ◮ Python client ◮ Separate settings file Rupak Rokade SBHS Vlabs using Python 13/17
Implementation contd... Client side ◮ Python client ◮ Separate settings file ◮ GET and POST technique Rupak Rokade SBHS Vlabs using Python 13/17
Implementation contd... Rupak Rokade SBHS Vlabs using Python 14/17
Implementation contd... URL’s ◮ http://vlabs.iitb.ac.in/sbhs/hardware /checkconnection Rupak Rokade SBHS Vlabs using Python 14/17
Recommend
More recommend