Report on the Strength of materials i lab

5,145 views
4,886 views

Published on

Ishola, B.I., "On the Development of the Strength of Materials Laboratory: A Non-EE/CS iLab for Static Bending Test". Final Year Project Thesis, March, 2012

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
5,145
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
60
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Report on the Strength of materials i lab

  1. 1. FINAL REPORT ON THE DEVELOPMENT OF STRENGTHOF MATERIALS REMOTE LABORATORY: A NON-EE/CS iLAB FOR STATIC BENDING TEST BY ISHOLA, BABATUNDE ISAAC (EEG/2006/064) SUBMITTED TO DEPARTMENT OF ELECTRONIC AND ELECTRICAL ENGINEERING OBAFEMI AWOLOWO UNIVERSITY ILE – IFEIN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE AWARD OF BACHELOR OF SCIENCE DEGREE ELECTRONIC AND ELECTRICAL ENGINEERING JANUARY, 2012.
  2. 2. Department of Electronic & Electrical Engineering, Faculty of Technology, Obafemi Awolowo University, Ile-Ife. Osun State. 22th January, 2012.The Coordinator,EEE 502: Final Year Project,Department of Electronic & Electrical Engineering,Ile-Ife.Osun State.Dear Sir, LETTER OF TRANSMITTAL Kindly accept the accompanying copy of project proposal of my final year project titled“Development of Strength of Materials Remote Laboratory: A Non-EE/CS iLab for StaticBending test”. This was undertaken in partial fulfillment of the requirements for the awardof a Bachelor of Science Degree from the Department of Electronic and ElectricalEngineering, Obafemi Awolowo University. Thank you. Yours Sincerely, ISHOLA Babatunde I. EEG/2006/064
  3. 3. CERTIFICATION This is to certify that this report was prepared by ISHOLABabatunde Isaac (EEG/2006/064) inaccordance with the requirements stipulated for the execution of a final year project as afulfilment of the requirements for an award of Bachelor of Science (B.Sc) degree in Electronic andElectrical Engineering. ………………………………… Dr. K.P. Ayodele (Project Supervisor) DEDICATIOIN“But there is a spirit in man: and the inspiration of the Almighty giveth them understanding.” -Job 32:8 (Holy Bible KJV)
  4. 4. ACKNOWLEDGEMENT“Blessed be the Lord my strength, which teacheth my hands to war, and my fingers to fight:”-Ps.144:1I recognize my source of strength and intellect – My Lord and Savior Jesus ChristI am especially grateful to my supervisor, Mr.AyodeleK.P. for his ready help and continualcontributions
  5. 5. To all the members of the iLab-Project team and all G12 members, I can but express meager thanks.To all my friends without whom I would be a total stranger in this world, I say thank you for beingthere.Words can describe my gratitude to all members of my family: my mother and brothers. I couldn’thave wished for a better company.
  6. 6. ABSTRACTThis project report introduces the concept of remote virtual laboratories, discusses thevarious implementations of remote laboratories with emphasis on MIT’s iLab Framework, itsarchitecture and unique design which makes it the choice for implementation of Strength ofMaterials lab. Contained in this chapter also is a brief discussion on the static bending testexperiment, the pedagogics of the experiment, how it is performed traditionally and withvirtual instrumentation. Equipment and machines used in testing the strength of materialsfor experimentation and industrial application would also be considered here.The main goal of the project is to develop a remote online laboratory called the Strength ofMaterials laboratory, a platform for performing static bending test over the internet. Theexperiment is for determining the properties, such as the Young Modulus of beam.The designprocess, components, devices and equipment needed to build the Static bending testmachine is described in this report. Described also is the use of sensors, actuators, softwarecomponents and programming platform used in achieving the design goal.Major challenges faced ranging from remote application of load to getting the right sensorto read the deflection of the beam, proposed solution; the design of the automated systemfor performing the beam deflection experiment, control flow/block diagram, work done sofar; circuit already constructed, programs already written, challenges encountered duringdevelopment are all discussed in this report. TABLE OF CONTENTLETTER OF TRANSMITTER…………………………………………………………………………………………………………………..II
  7. 7. CERTIFICATION………………………………………………………………………………………………………………………………….IIIDEDICATION……………………………………………………………………………………………………………………………………...IVACKNOWLEDGEMENT…….……………………………………………………………………………………………………………….…VABSTARCT……………………………………………………………………………………………………………………………………….…VITABLE OFCONTENT………………………………………………………………………………………………………………………….VIILIST OFFIGURES………………………………………………………………………………………………………………………………..IXCHAPTER ONE ....................................................................................................................................... 11INTRODUCTION ..................................................................................................................................... 11 1.1. BACKGROUND ....................................................................................................................... 11 1.2. SCOPE .................................................................................................................................... 12 1.3. OBJECTIVES ........................................................................................................................... 13 1.4. JUSTIFICATION....................................................................................................................... 13CHAPTER TWO ...................................................................................................................................... 16LITERATURE REVIEW ............................................................................................................................. 16 2.1. STATIC BENDING TEST ........................................................................................................... 16 2.1.1. BASIC THEORY ............................................................................................................... 16 2.1.2. EXPERIMENT PEDAGOGICS ........................................................................................... 18 2.2. STRENGTH OF MATERIALS LABORATORIES, EQUIPMENT AND MACHINES .......................... 19 2.3. REMOTE VIRTUAL LABORATORIES ........................................................................................ 23 2.3.1. ILABS-PLATFORM FOR REMOTE EXPERIMENTATION.................................................... 23 2.3.2. THE iLAB SHARED ARCHITECTURE................................................................................. 24CHAPTER THREE .................................................................................................................................... 28METHODOLOGY .................................................................................................................................... 28 3.1. RESTATING THE TASK AHEAD................................................................................................ 28 3.2. KEY ISSUES ............................................................................................................................. 29 3.3. PROPOSED SOLUTION/DESIGN ............................................................................................. 30 3.3.1. LINEAR ACTUATOR-LOAD APPLICATION ....................................................................... 30 3.3.2. LOAD SENSOR – FORCE MEASUREMENT ...................................................................... 32 3.3.3 POTENTIOMETER – DEFLECTION MEASUREMENT ........................................................ 35
  8. 8. 3.3.4 BEAM REPLACEMENT .................................................................................................... 36 3.4. WORK DONE – PHASE 1 ........................................................................................................ 38 3.4.1 PHASE 1 - THE MICROCONTROLLER UNIT ..................................................................... 38 3.4.2. PHASE 1 - LOAD SENSING .............................................................................................. 46 3.4.3. PHASE 1 - THE ROBOTIC ARM ....................................................................................... 48 3.4.4 PHASE 1 - AUTOMATED RACK AND CHASSIS DESIGN ................................................... 58 3.5. Challenges and Solution ........................................................................................................ 60 3.5.1. POWER ISSUES .............................................................................................................. 60 3.5.2. READING FROM SENSOR ............................................................................................... 60 3.5.3. CONTROLLING COUPLED DYNAMIXEL........................................................................... 60 3.6. PHASE 2 - REDESIGNING ....................................................................................................... 61 3.6.1 PHASE 2 - USE OF NI DAQ AND LABVIEW...................................................................... 61 3.6.2 PHASE 2 - ROBOTIC ARM CONTROL .............................................................................. 62 3.6.3 PHASE 2 - RACK AND CHASSIS DESIGN .......................................................................... 65 3.6.4. DETERMING WHEN THE BEAM REACHES BREAKS ........................................................ 65 3.6.5. PHASE 2 - LAB CLIENT DEVELOPMENT .......................................................................... 65 3.6.6. PHASE 2 - THE EXPERIMENT EXECUTION ENGINE............ Error! Bookmark not defined. LIST OF FIGURESFigure 2.1.a: Beam BendingConfiguration……………………………………………………………………………….7
  9. 9. Figure 2.1.b: Typical setup of theLab...….....…………………………………………………………………………….7Figure 2.2.a: NI LabVIEW Strength of MaterialsLab………………………………………………….………….10Figure 2.2.b: 2820-040 Bend fixtures forwood……………………………………………………………………..10Figure 2.2.c: Yoke Deflectometer withextensometer…………………………………………………….…….10Figure 2.3: Materials testing machine with 30 KNcapacity…………………………………………………………………12Fig. 2.4: Overview of the iLab Shared Architecture ………………………………………………………..……16Figure 3.1: 150 lbs Force Linear Actuator from FirgelliAutomations………………………………….….21Figure 3.2.a: iLoad Digital USB Integrated Load Cell- loadsensor………………………………………...24Figure 3.2.b: experiment testbench………………………………………………………………………………..……24Figure 3.3: Block Diagram of the MCU showing its interaction with thePC…………………………………………29Figure 3.4.a: relay interfacingcircuit…………………………………………………………………………………….30Figure 3.4.b: schematic diagram for linearactuator………………………………………………….…………..30Figure 3.5.a: USB PIC Programmer……………………………………………………………………………………………………..32Figure 3.5.b: Usbpicprog:0.2.0application………………………………………………………………………………………..…32Figure 3.6: MicrocontrollerCircuit………………………………………………………………………………………..34Figure 3.7.a: +/- 12VPSU……………………………………………………………………………………………………………………35Figure 3.7.b: Max233 RS232Schematic……………………………………………………………………………………………….35Figure 3.8.a:Command set for the loadsensor………………………………..……………………………………37
  10. 10. Figure 3.8.b:load sensing applicationwindow……………………………………………………………..………..37Figure 3.9.a: Original design with 7 AX12 + 5DOF………………………………………………………………………………..40Figure 3.9.a: (b) Modified design with 5 dynamixel +4DOF……………………………………………………..……….40Figure 3.10: System connection for controlling multipledynamixels…………………………………….41Figure 3.11: Control table for the AX12 dynamixel……………………………………………………………..44Figure 3.12.a:USB2 Dynamixel Back view………………………………………………………………...45Figure 3.12.b: USB2 Dynamixel front view…………………………………………………….………….45Figure 3.13.a: Power supply schematic for powering the roboticarm………………………………………….……46Figure 3.13.b: Power supply circuit for powering the roboticarm……………………………………………………...46Figure 3.14: Different views of the Static Bending Test Machine…………………………………………………….…..49Figure 3.15: LabVIEW VI for controlling theexperiment....…………………………………….……………….53Figure 3.16: The Static Bending Test Lab ClientInterface…………………………………………………………………57Figure 3.17: Showing the streaming of the live video feed from the server………………………………………58Figure 3.18: (a) Experiment ExecutionEngine……………………………………………………………………………………60Figure 3.18: (b) LabVIEW front panel called by the LabVIEWdll…………………………………………………………60
  11. 11. CHAPTER ONE INTRODUCTION1.1. BACKGROUNDThe Engineers Council for Professional Development in the United States define engineeringas the creative application of scientific knowledge in order to design and develop machines,apparatus, structures and manufacturing processes to construct or operate; or to forecastthe behaviour of certain operating conditions. The application of this scientific or theoreticalknowledge taught in classes is realized through the use of laboratory experimentation; toverify theories and also empower students to design and develop systems for the benefit ofmankind.Experiments are indispensable for developing skills to deal with physical processes andinstrumentation. Students perform experiments to verify the theories taught in class, analysesystems and ultimately project laboratory experienceto real life applications. However,because of the rising cost of undergraduate laboratory equipment, increasing undergraduateenrolments, coupled with the chronic underfunding of tertiary institution (particularly in adeveloping country like Nigeria), the use of traditional laboratories has declined a great deal.Over the years, with the decline in quality and quantity of traditional laboratories, laboratoryexperimentation has metamorphosed and now we have different alternative toexperimentation. Among such include simulations, virtual laboratories and remotelaboratories. While simulation and virtual laboratories are both “all-software”, remotelaboratories are a hybrid of virtual laboratory and the traditional laboratory as it has bothhardware and software components. Virtual laboratories can be seen as online simulation.Remote Laboratories on the other hand is real laboratory equipment controlled remotely.
  12. 12. 1.2. SCOPEThe scope of the project involves development and deployment of a remote onlinelaboratory for static bending test, a civil engineering experiment to determine the strengthof materials. Traditionally, the experiment is performed by applying a known force on abeam supported at both ends and measuring the resulting deflection of the beam. Theamount of deflection gives an indication of the material of the beam. Hence it is also calledbeam deflection experiment.The task at hand is to make this experiment available tostudents but remotely via the internet.The first phase of the project involves design and construction of a control system that willautomate the whole process of the experiment allowing remote configuration andmeasurement of the variable of the experimental setup. The application of a user-specifiedforce on the beam, measurement of the resulting deflection, ensuring availability of the labat all times and having it in mind that all these have to be achieved remotely with no humanintervention. Also, a computer program that will control/coordinate the execution of theexperiment would be developed.The second phase involves creating the user interface to the lab that would allow remoteaccess to the experimental setup over the internet. This would involve developing an internetapplication, establishing a communication link between the user interface and the remoteexperimental setup over the internet using web services, setting up a web site that managesthe experiment records, and other administrative issues like login, authentication,authorisation among other function. A database where experiment specification would bestored to be loaded by a computer program that interfaces with the control system.
  13. 13. 1.3. OBJECTIVESA laboratory experiment usually involves a finite set of elements being configured in a finitenumber of ways, with measurements being carried out at certain nodes of the setup. Theprimary objective of this project is to bring the laboratory experience to the students. A wayto achieve this is to have a reconfigurable experimental setup remotely and providing ameans of accessing it over the internet.For this particular laboratory, i.e. the strength of materials laboratory, providing a remoteaccess to it would involve first setting up the experiment and as there is no suchexperimental setup before, there is need to develop an automated system for performing theexperiment and creating a set of software suite for manipulating the system over theinternet. The aims and objectives are highlighted below.  Design and construction of the control system that will automate the whole process of the experiment-requires understanding of how it works in the traditional setting.  Providing a remote access to the laboratory experiment over the internet  Setting up a central system for managing experiments, administration, record keeping etc.  Integrating the experiment into the MIT iLab Framework [iLabs]  Deployment of the Strength of Materials laboratory during the rain semester for use by 200 level students of the faculty of technology, OAU offering CVE 202  Ensuring reliability and availability of the lab1.4. JUSTIFICATIONIn a Civil Engineering 200 level course (CVE 202) usually offered by students of the faculty oftechnology, one of the topics taught is Strength of Materials, where we are taught how thedeflection of a beam under load is related to its modulus of elasticity; a property unique to
  14. 14. all materials. In essence, the nature/material of a beam could be determined by a simplebeam deflection experiment usually known as the static bending test. As part of the coursecontent, the student is supposed to have a laboratory session to demonstrate this theory.Unfortunately, this laboratory session has been ruled out over a decade ago probably due tolack of funding and logistics. This however in the long run have a negative effect on thestudents as they can’t relate all those formulas and complex equations been taught in classto the real world.In a bid to rescue the situation, we proposed using an alternative to the traditionallaboratory. One is the use of a virtual laboratory and the other is the use of a remotelaboratory. Development of a remote laboratory for the Strength of Materials Lab ratherthan students having physical contact with the lab, making it an online remote laboratoryeffectively overcome many of the logistics associated with the traditionallaboratories.Students don not have to be physically present in the laboratory beforeinteracting with the lab equipment to perform the experiment. All lab configuration andmeasurement are done remotely hence making the lab so flexible. Students can access thelab anytime and from anywhere in the world as long as there is internet connection; performexperiments at their leisure time, from their hostel, on holiday etc. thus improving student’sefficiency and at the same time overcoming most of the challenges of accompaniedwith atraditional laboratory setup such as space constraint, time constraint and most especiallycost as only one setup can serve all students saving the university the extra cost of buyingmultiple equipment.The Strength of Materials laboratory to be developed would be a unique one as all currentlyoperational remote laboratories in the university are electrical engineering/computer science
  15. 15. laboratories. This reflects a global trend as most remote labs are in these fields. The reasonfor this is that it is much more difficult to build remote labs for other domains since such labswould need to use a lot of sensors and actuators to convert the quantities and parameter ofinterest in such domains to electrical signals that can be transferred over the internet. Thislab however is in the field of civil engineering so a way has to be found to convert the variousparameters into electrical signals. So it would be the first of its kind.
  16. 16. CHAPTER TWO LITERATURE REVIEWThis chapter presents a review of subject matter for this project. This subject matter is ratherwide – from Static Bending Test Experiment, to remote virtual laboratories. Hence, forbrevity, only the aspects of subject matter which have an important relation to the projectdevelopment, and which are necessary for a better grasp and understanding of the projectsessentials are presented here.2.1. STATIC BENDING TEST2.1.1. BASIC THEORYThe Young Modulus is a material property that describes its stiffness and is therefore one ofthe most important properties in engineering design. The material property which tells ushow stiff it is within its elastic limit is called its Modulus of Elasticity (MOE) or simply YoungModulus, E. The bending of beams is one of the most important types of stress inengineering. Bending is more likely to be a critical stress than other types of stress - liketension, compression etc. In this experiment, we will determine the MOE of the variousmaterials and using Solid Edge to determine the Second Moment of Area for the differentcross-sections. To do this, we perform a beam deflection experiment which is known as theStatic bending test. Figure 2.1.a below, we show the different ways the beam deflectionexperiment can be configured
  17. 17. (a) (b)Figure 2.1: (a) Beam Bending Configurations (b) Typical setup of the Lab
  18. 18. Bending EquationsUnits: Force (Newton), Span Length (mm), Stress (MPa)E = Youngs Modulus or Mod of Elasticity (MPa)I = 2nd Moment of Area or Area Moment (mm4) which can be calculated using Solid Edge sketchFor a rectangular beam, we use the formula So that E = (W x L3)/(48 x d x I)2.1.2. EXPERIMENT PEDAGOGICSOBJECTIVE: The objective of this laboratory experiment is to determine the Young’s Modulusi.e. the Modulus of Elasticity of a material.APPARATUS: Beam, Support, Weight, Vernier scale.INTRODUCTORY INFORMATION: Probably the most common type of structural member isthe beam. A beam may be defined as a member whose length is relatively large incomparison with its thickness and depth, and which is loaded with transverse loads thatproduces significant bending effects. Whenever a real beam is loaded in any manner, thebeam will deform such that an initially straight beam will assume some deformed shapedepending on the modulus of elasticity of the beam.The modulus of elasticity of a material is the ratio of the stress to the strain of the material.The modulus of elasticity is determined by the value of deflection of the beam under aBending Static Test. The value of deflection is used to calculate the moment of elasticity ofthe material. The modulus of elasticity of a beam depends on the following factors:  The applied load / force  The span or length of the beam  The width of the beam and its thickness
  19. 19. PROCEDURE: The experiment involves using a simply supported beam with two ends fixed.The length of the beam is specified and should be kept constant throughout the experiment.Note that the length of the beam here is the distance between the two fixed ends. A knownweight is applied on the beam at any point between the two fixed ends and thecorresponding deflection measured. Additional weight is either added or removed and theresulting deflection measured. This is done severally and a table showing force and itscorresponding deflection is obtained.From the table we can plot the graph of force vs.deflection and the modulus of elasticity of the material can be determined. Figure 2.1.bshows a typical setup of the static bending test experiment.2.2. STRENGTH OF MATERIALS LABORATORIES, EQUIPMENT AND MACHINESNI Strength of Materials Lab: This Strength of Materials Lab is based on the NI DistributedI/O platform and the NILabVIEW graphical programming software. The Lab consists of a setof elementsrequired to build particular devices for specific laboratories and NI measurementdevicesrequired to acquire sensor readings and transfer them to a computer. Thecomputerprocesses the readings and helps visualize the data in time domain. Dataacquisition andprocessing is done with the help of NI LabVIEW.Fig. 2.2. (a) shows the NIStrength of Materials Lab hardware setup and NI LabVIEW interface.2820-04x Series (Bend Test Fixtures for Wood): 2820-04x Series bend fixtures shown in fig.2.2. (b) are designed forstatic bend/flexure testing on a range of wood andtimber productsaccording to common InternationalStandards. The beam attaches to the testinstrumentusing simple mechanical interface which allows it tobe removed when not in use.Deflection of the specimen can be measured using theoptional deflection measurement yokeand a suitableextensometer.
  20. 20. (a)(b)(c)Figure 2.2. (a) NI LabVIEW Strength of Materials Lab (b) 2820-040 Bend fixture for wood (c) yoke deflectometer with extensometer
  21. 21. Strength of Materials Laboratory at University of MACAU: The objective of this particularstrength of materials lab at University of Macau is to demonstrate the basic principles in thearea of strength and mechanics of materials and structural analysis to the undergraduatestudents through a series of experiments. Tests such as the tension tests of a steel coupon,torsion of model circular sections and bending of a steel bar are conducted in the lab. It alosintroduces students to data acquisition system (Strain gauges and dial gauges etc) used inexperimental study.This computer controlled machine records the load displacementrelationship of the test specimen. Load can be applied through either load or strokecontrol. The computer data acquisition can process the data and display the stress-straindiagram of the test-materials instantaneously. The material testing machine is shown in fig.2.3. below.National Institute of Technology,Tiruchirappalli- Strength of Materials Laboratory:ThisStrength of Materials Laboratory offers facilities for testing building materials for theirstrength, behaviour and suitability for various applications.Strength of Materials Laboratory, ANNA University: have experiment for determining theYoung’s modulus of the material of the steel beam by conduction deflection test
  22. 22. Figure 2.3. Materials testing machine with 30 KN capacity:
  23. 23. 2.3. REMOTE VIRTUAL LABORATORIESDue to the various challenges associated with traditional laboratory setting, theadvancement in technology has brought about alternative to laboratory experimentation.The various options range from simulation, virtual laboratories and remote laboratories.Simulations are software applications that use the theory behind the experiment to model alaboratory setting. Virtual laboratoriesare more like simulation except that they are internetbased applications that is run over the internet.Remote laboratories however area hybrid ofvirtual laboratories and traditional/conventional laboratories. It is important to emphasizethat remote laboratories are real laboratories. Simply put, it is a real experiment remotelylocated. There are a number of remote laboratories all over the world cutting acrossdifferent engineering disciplines like electronics, electrical, computer, mechanical, Also, thereare different approaches to the implementation to internet accessible remote laboratoriesexamples include the iLab Project at Massachusetts Institute of Technology (MIT), remotelab at University of South Australia (UNISA),Remote laboratory at Blekinge Institute ofTechnology etc. For this project, the iLabs waschosen as the platform for developing theStrength of Materials remote laboratory as because of its uniqueness.2.3.1. ILABS-PLATFORM FOR REMOTE EXPERIMENTATIONiLabs are remote laboratories based on the MIT iLabs Shared Architecture, whose multi-tier topology makes them suitable for bandwidth-constrained environments. The iLabproject at MIT is dedicated to the creation of a movement to develop and disseminatetechnology and pedagogy for sustainable and scalable iLabs so that they can be sharedworldwide.
  24. 24. Based on the experiences of the different iLab development teams, the iLabs Projectdeveloped a suite of software tools that would make it efficient to bring online complexlaboratory experiments, and provides the infrastructure for user management. The iLabsShared Architecture has the following design goals:  Minimize development and management effort by providers of remote labs.  Provide a common set of services and development tools.  Scale to large numbers of users worldwide.  Allow multiple universities with diverse network infrastructures to share remote labs.iLabs employ on-line laboratories to enrich higher education in Africa by sharing laboratoryfacilities in science and engineering. With the rising cost of undergraduate laboratoryequipment and increasing undergraduate enrolments, it is a novel solution to the problemsof inadequate funding of undergraduate laboratories. Examples include remoteexperimentation in the fields of microelectronics, chemical engineering, polymercrystallization, signal processing etc.2.3.2. THE iLAB SHARED ARCHITECTURETo facilitate the rapid development and effective management of iLabs, the iLab team in MIThas developed a toolkit of reusable modules and a set of standardized protocols and webservices referred to as the iLab Shared Architecture. This software framework is now beingused by several iLab groups worldwide to develop new iLabs. This effort forms the kernel of amajor new programmatic and institutional initiative at MIT to promote shared access tolaboratory equipment by educational institutions around the world.
  25. 25. The iLab Architecture is a three-tiered architecture consisting of the Lab Client, ServiceBroker and the Lab Server. Fig. 2.1 shows the iLabs architecture overview. These three tiersare connected together using web services; web Application Programming Interface (API)used for communication between client and server over HyperText Transfer Protocol (HTTP).iLab’s design pattern separates online laboratories into three distinct modules connected bya web service architecture.Lab Client: The Lab Client is an application that runs in a web browser which the studentsinteracts with to configure experiment, send the experiment specification and retrieve result.The Lab Client is the front end of the system. It is the interface (usually graphical) throughwhich a student interacts with the remote experiment. The interface is a depiction of the reallab and allows the student to make modifications (set experiment specification) therebyplacing the interface in one of a large number of finite states. Lab Client are usuallydeveloped using Java, C# or LabVIEW but recently, iLab OAU has pioneered the use ofanother technology, the Adobe Flex Framework to develop Lab Client.
  26. 26. Fig. 2.4. Overview of the iLab Shared Architecture
  27. 27. Service Broker: The Service Broker is the middle tier, a web application that provides webservice with a number of APIs. It is essentially is the middleman that links the Lab Client withthe Lab Server (hardware backend) by providing the shared common services. It also servesadministrative and storage purposes. The Service Broker was developed by the iLab MITteam using the Microsoft.NET Framework: Active Server Pages (ASP) plus C# as the code-behind. The student’s client communicates solely with the Service Broker, which forwardsexperiment specifications to the Lab Server. The Service Broker has a very rich web serviceinterface through which it communicates with the Lab Client and Lab Server. Usually theService Broker will reside on a server machine different from the clients system. The ServiceBroker performs administrative, authorisation, authentication functions; it takes care of theauthentication and the authorization of users, user session, and experiment data storage,forwarding experiment specification to the Lab Server and retrieving the result.Lab Server: The Lab Server is the hardware backend, the remotely located laboratoryexperiment setup. It executes the experiments (based on the experiment specification sentby the student) on the real hardware equipment and sends back the result of the experimentto the Lab Client through the Service Broker. The Lab Server has two components thesoftware and the hardware. The software components include the Generic Servercomponent (Lab Server web service), the experiment execution engine and a database whilethe hardware is the laboratory device we are interacting with.
  28. 28. CHAPTER THREE METHODOLOGY3.1. RESTATING THE TASK AHEADThe task at hand is to create a platform for performing static bending test experiment overthe internet using the MIT iLab framework. So it involves development of the Lab Client andthe Lab Server and deployment of the experiment on the Service Broker. The Lab Clientwould be developed with the Adobe Flex Framework; a programming platform from AdobeSystems Incorporated for creating Rich Internet Application (RIA). The Lab Server wouldconsist a Microsoft SQL Database, a C-Sharp program that coordinates the execution of theexperiment and would serve as entry point into the hardware, and of course the staticbending test machine that would be constructed for performing the experiment. The ServiceBroker however would be the OAU iLab Service Broker for batched experiments developed bythe MIT iLab team. Hence the only task here would be configuring the Service Broker andsetting up the lab client and lab server on it so the experiment is available on the OAU iLabwebsite.To make an existing traditional laboratory experiment an iLab, a series of questions neededto be answered. The first most important question we need to answer is can we control thelab equipment from a personal computer? To what extent do we have control over theparameters and quantities involved in the experiment? If the answer to the first question isno, then it’s basically impossible to make such an experiment an iLab. If the answer to thefirst question is yes then we start thinking of how to make that computer a server so that aclient computer can have access to such system. So it’s like a (user) computer controllinganother (server) computer that controls the equipment.
  29. 29. 3.2. KEY ISSUESMaking an experiment an iLab involves sending and receiving of electrical signal forconfiguring and measuring of quantities and parameters associated with the experiment.Hence most iLabs are in the domain of electronic/electrical and computer engineering. TheStrength of Materials iLab being discussed here is however an exception to the trend as it liesin the domain of civil engineering and materials science. This makes it somewhat difficult tomake it an iLab. Nevertheless, with the right combination of sensors and actuators it ispossible to convert physical variables/quantities into electrical signals.We once again reiterate the steps involved in carrying out the experiment.  A beam supported on a pivot at both ends  A known force is applied at any point between the two pivots  The beam deflects due to the load applied  The deflection of the beam is measured using a deflection measuring instrument  The value of deflection is used to calculate the modulus of elasticity which is a unique property for every material.Developing a remote online laboratory for this experiment involves the use of a number ofsensors and actuators to create a control system for virtual experimentation. The keyproblems to be solved would involve:  How do we apply a user-specified force on a beam located remotely?  How do we measure the amount of force applied on the beam  How do we measure the resulting deflection of a beam due to the applied force since the deflection is not an electrical signal?
  30. 30.  In case the beam breaks due to excessive load applied on it or rather reaches critical limits as yield/plastic limit, what happens next? How will the experiment continue? How do we ensure the continuity of the experiment?  How do we even known if the beam is broken?Answering these questions and having it in mind that there is absolutely no humanintervention and that the whole process has to be automated brings us a step closer todesigning the fully automated system that would allow this experiment to be carried out.3.3. PROPOSED SOLUTION/DESIGNTaking the highlighted issues one after the other, we propose a conglomeration of hardwareand software, sensors and actuators connected to a central computer which also acts as anetwork server allow remote configurability of the system over the internet.3.3.1. LINEAR ACTUATOR-LOAD APPLICATIONFor the remote application of load, we use the FA-PO-150-12-8" (20:1) Linear Actuator withPotentiometer Feedback from FIRGELLI AUTOMATIONS shown in fig. 3.1 with a 2-12 inchesstroke that extends and retracts when operated in forward and reverse mode. The end of thestroke is mounted on the system under test i.e. the beam and when operated applies avertical downward force on the beam. To operate the actuator in the forward mode, a +12volt dc power supply is applied while operating it in the reverse mode requires a -12 volt dcpower supply. Consequently, 3 modes of operation can be identified; FORWARD, REVERSEAND STOP. The forward mode is that of increasing force, in the reverse mode-decreasingforce and for the stop mode, force is constant.
  31. 31. Figure 3.1. 150 lbs Force Linear Actuator from Firgelli AutomationsSo to apply an amount of load with no initial load, we start out with operating the actuatorin the forward mode and when the load reaches the desired limit, we switch to the stopmode. Assuming we are applying a load which is less than initial load, we operate the
  32. 32. actuator in the reverse mode and stop when we get the desired load. A PIC microcontrollercircuit is used to control the linear actuator from a PC in the first phase of development butin the second phase the PIC was replaced with NI USB 6009, a small Data Acquisition Device(DAQ). A detailed description of this is given in section 3.4.1.3.3.2. LOAD SENSOR – FORCE MEASUREMENTTo measure the amount of force applied on the beam requires a sensor that can that senseforce and convert it to electrical signal. As the load is being applied by the linear actuator,we need a sensor that can measure the force on the beam in real time so that when thedesired load value is reached the actuator can stop. Using iLoad Digital USB Integrated LoadCell manufactured by Loadstar SENSORS shown in fig. 3.2(a), a load sensing device thatsenses the force applied on it and outputs it to a computer system through the USB portusing a Virtual COM port. The iLoad Digital USB load cells offer direct measurement of staticloads via the USB port of a PC. No need for signal conditioners, data acquisition systems orspecial software. It provides unprecedented integration of sensing and measurementelectronics to provide Plug and Sense simplicity for compressive load and forcemeasurement.Its distinguishing features includes: Plug and Sense Simplicity, Digital Integrated Electronics,Standard USB output, Power supplied via USB port, integrated power conditioning, StoredCalibration. The iLoad Digital sensor appears on the PC as a virtual COM port. Using astandard terminal emulator, we can send commands to the sensor to directly display sensoroutput in pound (lb) as ASCII text. You can query loads one reading at a time or get acontinuous stream of readings using a terminal emulating program.
  33. 33. Two iLoad sensors would be placed at the two ends of the beam with a wedge mounted on itto provide a sharp pivot and also distribute the load towards the centre of the device. Thebeam would be mounted on the wedge and the actuator applying a downward force at thecentre of the beam (see fig. 3.2(b)). The downward force due to the linear actuator equalsthe sum of the two upward forces at the ends of the beam. Each sensor can sense thereaction on it due to the applied force. Hence if we can read the force value on each of thesensors and sum them, we can get the exact force acting on the beam i.e. F = R1+R2.
  34. 34. (a) Linear Actuator R1 R2 Load Sensor F (b)Figure 3.2. (a) iLoad Digital USB Integrated Load Cell- load sensor (b) experiment test bench
  35. 35. 3.3.3 POTENTIOMETER – DEFLECTION MEASUREMENTOn the application of force on the beam, the beam deflects by a particular amount. Weneed to communicate the value of the deflection to the user. One easy way that could bedone is providing a visual feedback using webcam but the problem with this approach is thatthe deflection usually is in millimetre range. The user might not be able to measureaccurately the deflection using this technique due to parallax and resolution. Therefore werule out this method.If a way can be found to measure the amount by which the linear actuator applying the forceextends or retracts, then we can have a measure of the deflection as this would beproportional. The linear actuator used is a 12 Stroke 150lb Force Linear Actuator (describedin section 3.3.1) with built in 10K ohms Potentiometer. As stated earlier, the actuatorextends or retracts based on the polarity of the voltage supply. The built in 10K ohmspotentiometer is used to measure the deflection.The potentiometer value changes as the actuator protrudes and retracts and the resistancevalue is proportional to the linear displacement action of the actuator. By measuring theresistance value of the potentiometer, we can calibrate the system to get the value ofdeflection. In the first phase of development, we used a PIC microcontroller with an inbuilt10 bit analogue to digital conversion (ADC) module; we can accurately measure thedeflection thus achieving the conversion of the physical variable (deflection) to electricalsignal (voltage). In the second phase, we replaced the PIC with the NI USB 6009 as it couldmeasure with an even higher resolution of up to 14 bits. This would be described in details insection 3.4.1.
  36. 36. 3.3.4 BEAM REPLACEMENTIn case of deformation or damage of the beam, there is no lab attendant to replace thebeam as this is a remote laboratory where everything is expected to be automated and theexperiment must continue. During the course of the experiment, a student might apply anextremely high force on the beam to the extent that the beam breaks into two. In this kind ofscenario, two options came to mind: 1. We can put a limit as to what the student can do, like putting a limit on the force applicable from the user interface, so that a particular amount of force that would cause the beam to break or deform is disabled even from the user interface. But the problem with such method is that the pedagogics of the experiment is altered already and the critical points disabled are very important in the experiment for the concept to be fully understood. Though the student will still be able to perform the experiment, the experience might not be as that in a real laboratory setting. 2. The second way which is the most efficient but hard way is to allow the students to do whatever they would on the beam, even if they have to break it to get maximum output from the lab experience. Now the problem arises if the beam breaks or deforms. Continuing the experiment on the same test subject will give unreliable result so there is need to replace the beam with a new one. Going for the second option, i.e. allowing the student to have the complete laboratory experience will require a configuration of automated systems which will include a robotic arm for replacing the beams, an automated rack system holding the beams.
  37. 37. A robotic arm such as those used in assembly line by manufacturing industries for highprecision jobs will be used solely for the purpose of picking a new beam on the rack andplacing it on the test bench in the event of a beam break.To ensure the accuracy, precision repeatability and reliability of the robotic arm, we tryas much as possible to avoid the robotic arm going to pick beam at different location onthe rack. Rather, we automate the rack itself so that the beams are always arranged sothat a beam is always available at a particular location.Assuming the robotic arm pick a new beam at location X, the rack arranges theremaining beams such that another beam replaces that taken at location X and the nexttime the robotic arm needs a new beams it just goes to the same location X and avoiddetermining where the next beam is. So the automated rack is for ensuring a beam isalways available at a specified location.
  38. 38. 3.4. WORK DONE – PHASE 1This section gives a detailed description of devices, components and parts of the system. Thehardware, firmware and software that have been developed and those that are still beingdeveloped are discussed under this section. The process of design and development of eachof the component part including the controller unit, power supplies, robotic arm, chassis andrack are all discussed here. Most of the design described here is work in progress as it is thefirst phase of the project development. Significant change was made in the design and thesewould be discussed in the second phase of the project design.3.4.1 PHASE 1 - THE MICROCONTROLLER UNITIn the first phase, the microcontroller unit (MCU) coordinates the operation of the LinearActuator, measuring the deflection and the communication between the circuit and the PC.The block diagram with arrows indicating control flow presented in fig. 3.3 shows themicrocontroller and how it interacts with the linear actuator, measure deflection through afeedback loop and a two-way channel for communicating with the computer system throughthe serial port. The microcontroller unit used is Programmable Integrated Circuit (PIC) of the18F family specifically PIC 18F2550, a 28 pin re-programmable Integrated circuit.Controlling the linear actuator from the PIC involves the use of relays as switches as MCUcannot directly control the actuator. This is due to the fact that PICs generally use +5V powersupply and the linear actuator uses a +/-12 V power supply which makes it impossible for themicrocontroller output pin to directly control the actuator. Two relays are used, one forswitching to +12V and the other for switching to -12v. The relay is connected to the outputpin of the PIC and the firmware (embedded program) on the PIC controls when the relaysswitch on/off. The relay switches on when the output pin of the microcontroller goes HIGH
  39. 39. and off when output goes LOW. A transistor BC547 was used to switch on/off the relay. Fig.3.4.(a) shows the schematic of the interfacing a relay to a MCU.Figure 3.3: Block Diagram of the MCU showing its interaction with the PC
  40. 40. (a) (b)Figure 3.4. (a) relay interfacing circuit (b) schematic diagram for linear actuator
  41. 41. The value of the potentiometer on the actuator is measured using the Analogue to DigitalConverted module of the same PIC used to control the actuator. Fig. 3.4.(b) shows theschematic diagram of the actuator. The blue and white wires are connected to the positiveand negative voltage reference (+5V and Gnd) of the PIC for the ADC conversion. The yellowwire connected to any analogue input pin of the PIC so its value can be read by the internalADC module of the PIC.The circuit that does the control action plus the ADC was first simulated in Proteus (a circuitsimulation software) see appendix I. The firmware (see appendix II) that controls themicrocontroller was written in C language using the PIC C CCS Compiler and after successfulcompilation and build, the compiler automatically generates an HEX file which can beembedded into the PIC using a PIC programmer.The PIC programmer hardware (shown in fig. 3.5.(a)) used in burning the hex code into thechip was home-made with the original circuit from www.usbpicprog.org. Custom softwarethat is being used with the programmer is usbpicprog version 0.2.0. The interface of theusbpicprog application is shown in fig 3.5.(b). The programmer connects to the PC through aUSB interface.The PIC 18F2550 to be programmed is mounted on the programmer, the usbpicprog:0.2.0application detects the programmer and the type of PIC chip on it. The hex code generatedby the CCS complier is loaded into the software and written into the chip by clicking on the“program” command. On successful programming, the programmer is disconnected and PICremoved and can then transfer back to the main circuit board.
  42. 42. (a) (b)Figure 3.5. (a) USB PIC Programmer (b) Usbpicprog:0.2.0 application
  43. 43. The microcontroller circuit shown in fig. 3.6 was built on a vero board in modules consisting  +/-12V power supply circuit,  The relay circuit  The circuit that interfaces the PIC with the PC.The power supply circuit (schematic-fig.3.7.(a) ) consist a 240/12V 500mA transformer, abridge rectifier, regulator ICs, capacitors, diodes, resistors and LEDs. The bridge rectifierconverts the AC signal to DC and the capacitor straightens the waveform and the regulatorICs 7812 and 7912 produces the constant +12V and -12V respectively. The relay circuit hasbeen described already in section 3.4.1. and the schematic is shown in fig. 3.4. (b).For interfacing the PIC with the PC, we use the RS232 protocol for serial port communication.Components used include: Max233 IC, DB 9 female connector, USB to Serial Converter Cableand Prolific USB to serial driver to be installed on the PC. A terminal emulator program waswritten in C# to send command to the PIC. The 3 basic commands used (for now) is “f”, “r”and “s” where f instructs the PIC to operate the actuator in forward mode, r corresponds toreverse mode while s instructs the PIC to stop the actuator and return the analogue value ofthe potentiometer to the PC. The source code of the firmware controlling the PIC is attachedin appendix II.
  44. 44. Figure 3.6: Microcontroller Circuit
  45. 45. (a) (b)Figure 3.7: (a) +/- 12V PSU (b) Max233 RS232 Schematic
  46. 46. 3.4.2. PHASE 1 - LOAD SENSINGTo measure the force applied on the beam, we use the iLoad Digital Sensor. As mentionedearlier, it’s a Plug and Sense device which allows easy load measurement via the USB port asit presents itself as a Virtual COM port to the PC. A computer program that cancommunicate with the serial port of the computer was written in C-Sharp which has a set ofAPI for serial port communication; the System.IO.Ports class. Before using the device, FTDIdriver must be installed on the PC so as to present the USB device as a virtual COM port. TheCOM setting for the device is as follow: BaudRate = 9600bps, DataBits = 8, StopBit = One, Parity = NoneInteracting with the load sensor requires knowing the specific commands that the sensorreceives and the corresponding output hence the use of the device’s datasheet is imperative.The datasheet was downloaded from the support page of the manufacturer’s website(www.loadstarsensors.com). The set of command that can be issued to the load sensor andthe corresponding output is shown in fig. 3.8 (a) below.For example, sending a command o0w0 with a carriage return outputs the forcecontinuously. To do this, we first define the port setting as above, open the port and writethe command to the COM port. For example the program line below SerialPort com = new SerialPort(); com.WriteLine("o0W1" + "r");implies we write the command o0W1 to the COM port and in response to this command, thesensor returns a continous stream of ASCII text to the PC which can be read using theDataReceivedEventHandler function. Fig. 3.8. (b) shows the command window of the
  47. 47. (a) (b)Figure 3.8. (a) Command set for the load sensor (b) load sensing application window
  48. 48. running application that communicates with the load sensor through the virtual COM port.The surce code for the application running above is attached in appendix III.3.4.3. PHASE 1 - THE ROBOTIC ARMThe Design: A modified version of the AX-12 Robotic Arm originally designed by Alex Kirk ofCrustCrawler is to be used for replacing of the system under test (i.e. the beam). It uses atotal of 5 dynamixel (servo) units and has 4 degrees of freedom (DOF). The robotic kit waspurchased from CrustCrawler, a company that designs robots. The kit contains 7 AX-12dynamixels with the component parts that make up the robotic arm. The AX-12 dynamixel isa powerful and feedback rich servo motor module manufactured by Robotis(www.robotis.com). The technical specification of the AX12+ servo is listed below: • Blazing fast 1,000,000 bps communication speed • Full feedback on position, speed, load, voltage and temperature • 300 degree movement in 1024 increments • Full control over speed and torque in 1024 increments • Built in LED status indicator • Automatic shutdown based on voltage, load or temperature • Single cable network connections • Servo movement range can be set by the userThe robotics kit was assembled following the instruction manual that came with the kit. Theassembled robotic arm is shown in fig. 3.9. (a) with 7 AX12 dynamixels with 5 DOF consistingthe base, shoulder, elbow, wrist and gripper.During the course of experimenting with the robotic arm, the original design had to bemodified to reduce the complexity of the forward and inverse kinematics and torquebalancing issues and most important to suit our application. The modified version of the
  49. 49. robotic arm now has 4 degrees of freedom and 5 dynamixel units. The two servos at theshoulder joint have been removed and the new design given below in fig. 3.9. (b). It has abase that can turn 360 degrees, elbow wrist and gripper. The end effector being the gripperwould be used for picking the beams.Communication Protocol: The communication protocol for the AX12 dynamixel is halfduplex asynchronous serial communication with port setting 1Mbps, 8 bit, 1 stop bit and noparity. A multi-drop method of connecting multiple dynamixel actuators to a single node isemployed by using the half duplex UART. Thus a protocol that does not allow multipletransmissions at the same time should be maintained when controlling the dynamixelactuators. The main controller communicates with the Dynamixel units by sending andreceiving data packets.There are two types of packets; the “Instruction Packet” (sent from the main controller tothe Dynamixel actuators) and the “Status Packet” (sent from the Dynamixel actuators to themain controller.) For the system connection in fig. 3.10., if the main controller sends aninstruction packet with the ID set to N, only the Dynamixel unit with this ID value will returnits respective status packet and perform the required instruction. If multiple Dynamixel unitshave the same ID value, multiple packets sent simultaneously collide, resulting incommunication problems. Thus, it is imperative that no Dynamixel units share the same ID ina network node.
  50. 50. (a) (b)Figure 3.9. (a) Original design with 7 AX12 + 5 DOF (b) Modified design with 5 dynamixel + 4DOF
  51. 51. Figure 3.10. System connection for controlling multiple dynamixels
  52. 52. The instruction packet is the packet sent by the main controller to the dynamixel units tosend commands. The structure of the instruction packet is as follows:The datasheet that describes the AX-12 dynamixel unit shows its control table with the RAMand ROM address having read/write attributes allowing instructions to be written to andread from the a specified address. The control table for the AX12 dynamixel is shown in fig.3.11. The set of instructions which can be sent to the dynamixel includes Read, Write,Reg_Write, Sync_Write, Action, Ping etc. For example, to move the servo to a particularposition, we write the desired value (0-1024) to the specific address (30) for goal position.Another row on the control table allows for speed manipulations, another for torgue etc.
  53. 53. To operate the dynamixel actuator, the main controller must support TTL level half duplexUART. Hence, to control such dynamixel unit from a PC, a TTL level converter is needed. Oneof such devices is the USB2Dynamixel (fig. 3.12.). The USB to dynamixel is basically a “VirtualSerial Port” that attaches to the USB port on a PC. USB2Dynamixel is the connector betweenthe dynamixel units and the computer. It interfaces the computer through the USB port thusa TTL to USB converter. Command is sent to the dynamixel through the USB2Dynamixel. TheUSB2Dynamixel is a USB device so it cannot power the dynamixel unit. Hence a separatepower supply is needed.Power Supply: To power the robot arm, we need a 9V, 4.5A power supply as we need topower 5 dynamixel actuators with each actuator needing about 900mA current at 9V. Thepower supply circuit uses a pass transistor (MJ2955) to deliver the high current needed. Theschematic diagram for the 9V, 6A power supply is shown in fig 3.13 (a) and the constructedcircuit in fig. 3.13 (b).
  54. 54. Figure 3.11. Control table for the AX12 dynamixel
  55. 55. USB Connector Serial Connector 4 Pin Connector 3 Pin Connector (a) Function selection Status display LED switch (b)Figure 3.12. USB2 Dynamixel (a) Back view (b) and the front view
  56. 56. (a) (b)Figure 3.13. Power supply circuit for powering the robotic arm (a) schematic (b) circuit board
  57. 57. Programming: There are varieties of platforms programming languages by which we cancontrol the robotic arm which includes using PIC C for microcontroller application or from thesystem using a high level programming language like C#, java, LabVIEW, MatLab, VB.NETetc. Since our experiment engine would be written in C#, it is a better choice to use C# toprogram our robotic arm.Using a set of Dynamic Linked Libraries (DLLs) to interface the dynamixel hardware and theC# program we can send control signals to the dynamixel and consequently get a feedbackthrough the same channel. The DLLs presents the functions that can be used to manipulatethe dynamixel hardware. Hence it serves as an entry point into the dynamixel module.For example, the code snippet bellow moves a dynamixel servo with id 4 to a position 1000with speed 300 using the INST_WRITE command. Position and Speed are both 2 bytes hencethe high (1000 & 0xFF00 / 0x100) and low (1000 & 0xFF). For every communication, thedynamixel.dxl_initialize method must be called and so also the terminate() function at theend of all command blocks. dynamixel.dxl_initialize(); dynamixel.dxl_set_txpacket_id(4); dynamixel.dxl_set_txpacket_length(7); dynamixel.dxl_set_txpacket_instruction(dynamixel.INST_WRITE); dynamixel.dxl_set_txpacket_parameter(0, 0x1E); dynamixel.dxl_set_txpacket_parameter(1, (byte)(1000 & 0xFF)); dynamixel.dxl_set_txpacket_parameter(2, (byte)((1000& 0xFF00) / 0x100)); dynamixel.dxl_set_txpacket_parameter(3, (byte)(300 & 0xFF)); dynamixel.dxl_set_txpacket_parameter(4, (byte)((300 & 0xFF00) / 0x100)); dynamixel.dxl_tx_packet(); dynamixel.dxl_terminate();Moving more than one unit at a time using the write command is impossible because it usesa single bus, so we use the REG_WRITE plus ACTION command. The REG_WRITE only storesthe instruction on the ram area but never executes it until an ACTION command is sent. The
  58. 58. action command is usually sent through the broadcast ID (254 which means instruction issent to all units). Any unit with stored instruction executes it once the action commend issent. Say we want to control 3 units together, each unit is sent a REG_WRITE command andthen an action command is sent through the broadcast id and so all instruction getsexecuted at once.A C-Sharp program to demonstrate controlling of the robotic arm; one or two servos at atime was written and the source code is attached in appendix IV. This however is not thecomplete program that would perform the action of beam replacement but it’s sufficient toestablish the fact that we can now move the robotic arm to any desired location. Thecomplete program would require precise value of the dimension of the chassis, and the rackso as to be able to solve the inverse kinematics equation that would be used to determinethe end effectors (gripper) position. The design of chassis and rack as at the time of writingthis report has not been accomplished.3.4.4 AUTOMATED RACK AND CHASSIS DESIGNThe rack holding the beams (for replacement) is also an automated system. This however is still inconceptual stage and is yet to materialize. The rack is expected to make sure a new beam is alwaysavailable at a particular location in reach of the robotic arm. The beams would be arranged in therack in such a way as to maximize space so more beams can be supplied to the rack and ensure afairly large interval between beam replacements when all the beams on the rack might have finished.The chassis holds all the systems together including the test bench, robotic arm and rack mechanism.Fig. 3.14. shows what the whole system would look like.
  59. 59. Figure 3.14. different views of the Static Bending Test Machine showing test bench, robotic arm andrack
  60. 60. 3.5. Challenges and SolutionA number of challenges were faced while designing the power supply circuit, controlling the roboticarm, programming; both hardware and software, designing of the mechanical systems etc. A fewproblems were surmounted while few still remains a mystery.3.5.1. POWER ISSUESThe first major issue I encountered was building the 9V 6A power supply circuit. The usually powersupply circuit I was familiar with was the simple low current PSU. With help from my supervisor, Iunderstood I was to use a high pass transistor to deliver the extra-high current required. Afterdesigning this circuit, measuring the output current (no load attached) using a multimeter I got 2A orthereabout. So I thought it didn’t work. As ridiculous as it might seem, I spent about 3 weeks on it! Itwas later I discovered that it worked all the while and that all that is needed is to connect the loadand the required current will be delivered.3.5.2. READING FROM SENSORBeing the first time I would be writing a program to read and write to the serial port, it wasquite challenging. I had to do a lot of “googling” before I could understand how to use theserial port class in C#. Writing to the device at first seems quite easy, the problem came Itried reading from the device. It took a while before I could figure out what the problem was.I was missing a carriage return (CR) at the end of the command and from the datasheet ofthe load sensor; a CR must always be at the end of every command. It’s more like thepressing the enter button after inputting a command.3.5.3. CONTROLLING COUPLED DYNAMIXELMoving two dynamixels coupled together involves the use of REG_WRITE + ACTION.Controlling the elbow joint is such an instance when this is needed as it consists of 2 coupledjoints. Because of the way the servos are joined together in this particular case they tend tomove in opposite directions when given directive to move to the same position value.Initially, I was given the two servos to move to the same position value and what I observed
  61. 61. each time was that each time, it always returns error after it has moved for a short period. Ilater discovered that since the servos are facing opposite directions, given them command tosame position value would only move them in opposite directions and the effect is; onemoving clockwise and the other counter clockwise.To make sure they are synchronously moved, I simply inverted the position value of one andgive it to the other. Inverting a value implies subtracting its value from 1024 (which is themaximum position value). Say we want to, move the 2 coupled units with id 3 and 4 toposition x where x lies between 0 and 1024, we simply move 3 to x and 4 to (1024-x).3.6. PHASE 2 – REDESIGNINGAfter finishing the first phase of the development, a number of issues were considered andthis lead to a complete change of the development tools, controlling unit among others.Also, in the first phase of the development, the lab client was left out completely. Thoughthis was intentionally planned so that the lab client development will be among the activitiesof the final phase of development. Then we focus more on tying together all the variouscomponents of the lab i.e. integrating the remote laboratory equipment, experiment engine,database, service broker and the lab client to create a full-fledged iLab. During this period, the project did undergo significant change in design as we explore bettermeans of solving the challenges at hand and also ways of making the project better. Anhighlight of the activities carried out in the second phase of development is listed here:3.6.1 PHASE 2 - USE OF NI DAQ AND LABVIEWIn the phase 1, we used a PIC micro controller circuit to control the actuator, read theresistance feedback, and communicate to the computer. For the ADC we used a PIC of the18F series which has a 10 bit ADC resolution. This resolution is high but might not be high
  62. 62. enough to measure very little changes in deflection. So we are considered using NI USB-6009, an 8 inputs, 14-bit, Multifunction I/O in place of the microcontroller unit. Its ADCresolution is 14 bit which is significantly larger than PIC 18F2550 (10bit). It has bothanalogue and digital I/O hence it could also be used to control the actuator. It is also a veryportable data acquisition (DAQ) device (see fig. 3.15), so it is a good replacement for theMCU. In addition, we also considered reading the load sensor through the device. A LabVIEWVI program was created to operate the actuator in forward, reverse and stop mode, also thepotentiometer was connected to this same device in differential configuration so it could useall of its 14 bits for ADC. The same program was used to read from the load sensor and theresult from the load sensor compared to the load value specified by the student whichdetermines when to forward, reverse or stop the actuator. The LabVIEW VI program isshown below in figure 3.15.3.6.2 PHASE 2 - ROBOTIC ARM CONTROLSo far, we have been able to demonstrate is the control of one or more dynamixel at same ordifferent time. This is sufficient only to prove the fact we can now send control signal to thedynamixel servos but is not sufficient to replace a beam in the course of an experiment.Controlling the robotic arm would required correct measurement of the dimensions roboticarm, rack, chassis, test bench and beam location. All these dimensions would go into thederivation of the inverse kinematics equation. Only after the equation has been derived andsolved can the program for controlling the robotic be written. The complete C# program forcontrolling the arm was developed. 4 paths were program; default path, and 3 other pathsfor picking beams at 3 different locations at relative position of 90 degrees. A thread sleepwas introduced as it was discovered that when a command is sent to a joint, it wouldn’t getto it position before another command would be sent to another joint to move, so it was
  63. 63. imperative to introduce a kind of delay into the system. The Threading class in C# was usedto delay the next operation hence allowing the previous command to finish all its coursebefore initiating the next command.
  64. 64. Figure 3.15: LabVIEW VI for controlling the actuator, measure resistance and read from loadsensor
  65. 65. 3.6.3 PHASE 2 - RACK AND CHASSIS DESIGNReferring to figure 3.14, we designed the rack and chassis to specification with dimensions.Also the whole project was simulated using 3D Max Studio. The result of the simulation wasalso shown in figure 3.143.6.4. DETERMING WHEN THE BEAM REACHES BREAKSAs at the time of writing this report, I don’t have a definite way of knowing when the beamreaches a limit where it is no longer ideal for the experiment. Maybe using a kind of sensor,or determined from software. This portion of the work would be considered latter. So rightnow it would be hardcoded into the program that when the load reaches a particular limit,the robot arm should swing into action before the next specification to replace the beam.3.6.5. PHASE 2 - LAB CLIENT DEVELOPMENTLab Client was developed using Adobe Flex, a programming platform for creating richinternet applications (RIAs). An interface with control for specifying the value of force theuser wants to apply on the SUT. Also, a video feed was incorporated into the client programso as to show the user what is happening at the location of the remote lab, allowing the userto see how the “robot” configures his experiment. By this we believe we would havesucceeded in removing all doubts by the student as to whether it is a real lab or simulationthus helping the student to have maximum user experience. The Lab client allows the user tospecify the force to be applied in either metric or imperial unit, and forward it to the server forexecution. It has a unit converter for converting force and length from one standard to another. Aquick help section for hints about the lab. The client makes a connection to the server via the servicebroker web service and it consequently submits the specification to the lab server. The lab serverexecutes the experiment and returns the deflection value to the lab client when ever it requests for it.The deflection would be shown a dial guage so the student can measure the deflection by reading off
  66. 66. its value from the dial gugae. This in a way improves the pedagogics of the experiment as in a reallaboratory the student would most probably use a dial guage and not a digital meter.The video feed is a live stream of the activities on the lab server streamed live from the server. TheAdobe Flash Media encoder was used for capturing and streaming the video to a server which is theAdobe Media Server Development edition. The Lab client streams directly from this server. A snapshot of the lab client is shown in figure 3.16 and the flash media encoder with the adobe mediaserver in action in 3.17
  67. 67. Figure 3.16: The Static Bending Test Lab Client Interface
  68. 68. Figure 3.17: Showing the Adobe Media Server administrator console with the adobe flash mediaencoder
  69. 69. 3.6.6. PHASE 2 - THE EXPERIMENT EXECUTION ENGINEThe experiment execution engine is a C# program that controls the execution of the experiment.When experiment is forwarded to the lab server for execution from the service broker, it goes directlyto the lab server database (a MS SQL database). The experiment engine which is always polling thedatabase every 2 seconds, retrieves any new experiment, deserializes it (as the experimentspecification is in xml format) and extracts the force specified by the student. This force value isforwarded to the LabVIEW VI using a dll as the entry point. A dll was created from the LabVIEW VIand this allows a C# program to call the required LabVIEW function based on the argument specifiedin the dll. The method allows us to specify whether we want the LabVIEW to operates the actuator inthe forward, reverse or stop mode and the load specified by the student. This method is a non-voidmethod as it returns a value which is the resistance of the potentiometer feedback on the actuator.This allows us after careful calibrations to get the extent of protrusions of the actuator hence thedeflection of the beam. The deflection value is serialized and converted to an xml format which isthen sent to the lab server database to be retrieved by the student when the measure deflectionbutton is clicked, which consequently brings up the dial gauge which shows the deflection as ananalogue value. The Figure 3.18 shows the experiment engine in action, the LabVIEW front panel thatwas launched when the LabVIEW dll was called. This same program is responsible for controlling therobotic arm. This is a separate class of which an instance of the class will be called when it’s time tochange the beam.
  70. 70. Figure 3.18: (a) Experiment Execution Engine (b) LabVIEW front panel called by the LabVIEW dll
  71. 71. APPENDIX ISCREENSHOT OF THE PROTEUS SIMULATION OF THE MICROCONTROLLER CIRCUIT
  72. 72. APPENDIX II Source Code for Linear Actuator System PIC C using CCS compiler<code>#fuses HS,NOWDT,NOPROTECT,NOLVP#use delay(clock = 20000000)#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)#include <string.h>void main(){ char cmd; long deflection; setup_port_a( ALL_ANALOG ); setup_adc( ADC_CLOCK_INTERNAL ); do { cmd = getc(); if(cmd == f) { output_low(PIN_B1); printf("forward mode"); output_high(PIN_B2); } else if(cmd == r) { output_low(PIN_B2); printf("reverse mode"); output_high(PIN_B1); } else if(cmd == s) { output_high(PIN_B1); output_high(PIN_B2); printf("stop"); set_adc_channel(0); delay_us(1000); deflection = Read_ADC(); printf("nr%4Lu", deflection); } }while(TRUE);}</code>
  73. 73. APPENDIX IIISOURCE CODE FOR THE LOAD SENSOR – READING AND WRITING TO VIRTUAL COM PORTProgram.cs<code> using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SerialCom { class Program { private static int forceValue; static void Main(string[] args) { Console.WriteLine("Force applied: "); forceValue = int.Parse(Console.ReadLine()); ComCom com = new ComCom(); com.openPort(); com.writeCommand(); while (forceValue > int.Parse(com.data)) { } Console.WriteLine("max value attained @ "+com.data); } }}</code>
  74. 74. ComCom. Cs<code> using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO.Ports; using System.Timers; namespace SerialCom { public class ComCom { private SerialPort com = new SerialPort(); public String data = "0"; public ComCom() { com.PortName = "COM7"; com.BaudRate = 9600; com.DataBits = 8; com.Parity = Parity.None; com.StopBits = StopBits.One; //com.ReadTimeout = 1000; com.DataReceived += new SerialDataReceivedEventHandler(com_DataReceived); } public void openPort() { if (!com.IsOpen) { com.Open(); } } public void closePort() { com.Close(); } public void writeCommand() { com.WriteLine("o0w0r"); } /* public void interact() { try { if (com.IsOpen) com.Close(); else
  75. 75. { com.Open(); //com.WriteLine("o0w0r"); com.WriteLine("slcr"); tim.Enabled = true; tim.Interval = 10; tim.Start(); //tim.Interval = TimeSpan.FromSeconds(1.0); //tim.Start(); //Console.WriteLine("Data = " + com.ReadExisting()); } //com.Close(); } catch (Exception ex) { Console.WriteLine("exception thrown @ "+ex); } }*/ public void com_DataReceived(object sender, SerialDataReceivedEventArgs e) { data = com.ReadExisting(); Console.Write(""+data+"t"); } /*public void tim_Tick(object sender, EventArgs ea) { inc++; Console.WriteLine("hey"); if (inc == 5) Console.WriteLine("d: " + com.ReadLine()); }*/ } }</code>
  76. 76. APPENDIX IVSOURCE CODE FOR CONTROLLING THE ROBOTIC ARM-SENDING SIGNAL TO THE AX-12 DYNAMIXEL<code>using System;using System.Collections.Generic;using System.Linq;using System.Text;/*Motion Controller * Author: ISHOLA Babatunde Isaac <id>techbossmb</id> * Description: Class for manipulating the AX-12 Robotic Arm * Date: 10/06/2011/* * #1 define a simple method for basic control of the robot arm 11:11 - 12:07 am in! * #2 (2:13 pm)synchronously writing to the RAM of the dynamixel + feedback system design * #3 18/06/11 fixed a bug in the code and wrote the part to control two dynamixels * # blogged @ 11:19 18/06/11 1. One of the coupled dynamixels was biased, offset * 2. The coupled units moves in opposite directions that explains the reason why the units alwaysreturn with error. * #4 Need to start working on the feedback 11:19 */namespace MotionController{ class Program { static int id,id1, id2, position, position2, position1, speed; static string cmd; static bool inTouch = true; static int joint; static void Main(string[] args) { while (inTouch) { Controller control = new Controller(); //indicate program start, all 7 indicators should come on control.onLed(254, 1); control.onTorgue(254, 1); Console.WriteLine("Arm Controller (TM)nType Start to begin and Exit to quit"); cmd = Console.ReadLine();
  77. 77. if (cmd == "Start"){ //indicates intiating command control.onLed(254, 0); control.onTorgue(254, 1); //TODO(12:11): synchronous write + action command for multiple dynamixel units Console.Write("1 or 2?"); joint = int.Parse(Console.ReadLine()); if (joint == 1) { //specify id, position and speed Console.Write("Dynamixel ID:"); id = int.Parse(Console.ReadLine()); Console.Write("Specify Position between 0 and 1023:"); position = int.Parse(Console.ReadLine()); Console.Write("Specify Speed between 0 and 1023:"); speed = int.Parse(Console.ReadLine()); //execute instructions control.rotateOne(id, position, speed); } else if (joint == 2) { //specify ids, position and speed Console.Write("Dynamixel ID1:"); id1 = int.Parse(Console.ReadLine()); Console.Write("Dynamixel ID2:"); id2 = int.Parse(Console.ReadLine()); Console.Write("Specify Position between 0 and 1023:"); position = int.Parse(Console.ReadLine()); position1 = position; if (position <= 512) { position2 = 512 + (512 - position); } else if(position > 512) { position2 = 512-(position - 512); } Console.Write("Specify Speed between 0 and 1023:"); speed = int.Parse(Console.ReadLine()); //execute instructions control.rotateTwo(id1,id2, position1, position2, speed); }}else if (cmd == "Exit"){ control.onLed(254, 0);
  78. 78. control.onTorgue(254, 0); inTouch = false; } } } }}</code>
  79. 79. APPENDIX IV Shots from Development Phase of the remote backendShowing the test bench – robotic arm and linear actuator mounted on a locally fabricatedframeShowing NI 6009 being used to acquire data from the sensors and control actuation

×