Home

fulltext01 - DiVA Portal

image

Contents

1. Hints get hObject Value returns position of slider get hObject Min and get hObject Max to determine range of slider B get handles slider14 Value Y B 0 4 10 Yy num2str Y yy lYy us set handles TimeP String yy k timebase delay y lk yy global PORT b serial com1 fopen b fprintf PORT y Executes during object creation after setting all properties function slider14_CreateFen hObject eventdata handles hObject handle to slider14 see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint slider controls usually have a light gray background if isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor 9 9 9 end function TimeP_Callback hObject eventdata handles hObject handle to TimeP see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject String returns contents of TimeP as text str2double get hObject String returns contents of TimeP as a double Executes during object creation after setting all properties function TimeP_CreateFcn hObject eventdata handles hObject handle to TimeP see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles no
2. Command Description Autoscale Timebase range Timebase position Channell range 4 Channell offset Run Stop Single Trigger level Trigger sweep auto Trigger sweep normal Auto setting for match input signal Sets Time division Sets Horizontal Time position Sets Voltage division Sets Vertical Voltage position Puts the oscilloscope into run mode Puts the oscilloscope into Stop mode Puts the oscilloscope into Single mode Sets trigger level Sets trigger mode into Auto Sets trigger mode into Normal The final front panel is shown as figure 35 which we will use to control oscilloscope totally by PC via RS232 cable For waveform reading function we need firstly capture the data of waveform and then plot into the axes of graphical interface as figure 35 The waveform data we captured is a CSV file which has two columns the one is x axis another is y axis This two columns file format must be selected during capturing data via the software The figure 36 shows the CSV file had 2000 sample points and it is selected during capturing data and plotted result is shown in figure 35 Agilent 54622A OSCILLOSCOPE 100MHz Port com1 Connect Connected Disconnect Autoscal View wave Horizontal Run Control Time DIV Single 50s 4 Time position 30us Vertical Trigger Voltage DIV Vol position ANN Level 0 0274
3. For getting more accurate simulate we use 500 spring elements instead of 4 elements and it can be generated via MATLAB The reason of why we choose 500 elements is described in section 3 1 In the simulation as figure 10 apply a short quick force pulse with high amplitude onto the terminal of the bar in our simulated model State Space c To Workspace2 Analog Filter Design Figure 10 Simulation of signal propagation in Iron bar system Where the uout is the original signal pressure wave and uout2 is the signal went through adding filter During the propagation wave traveling the noise will happen so we need to add a filter to let the propagation wave more clearly to analysis The setting parameters are given by the Table 2 Table 2 PARAMETERS SETTING Step Initial Value 1000 units give an amplitude Step Time 11 x 107 s To simulate a very short time Force that can be assume as a pulse signal State A B C D parameters Give certain variables which can be set matrix in with the same Space variables in m file for these parameters Filter Low pass Filter Order 8 Pass band Edge Setting bandwidth performed by angular frequency Frequency After setting related parameter in the simulation blocks and connected with ABC model we can run this MATLAB programming and get the pressure wave as figure 11 This figure shows a simulation which included the modeled pressure wave propagated in
4. SM Command Return 58 Appendix V Oscilloscope GUI programing Although we use the GUI interface to control the system there is still a m file existed which support all functions appeared on the GUI front panel and now we are going to introduce how these m code work The functions used for open and close serial port are fopen and fclose and used fprintf for writing data For example the connection button has the following code function Connect_Callback hObject eventdata handles global PORT PORT serial coml fopen PORT set handles start status String Remote fprintf PORT system dsp Remote mode start The every button has similar code to this example The port is set to COMI by a global variable that is easy to callback at all other button COMI is the first serial port installed on the computer but it can be set to any COM port desired with above command When we use fopen function it will be set to its default values band rate 9600 data bits 8 parity none stop bits 1 We also need send statement Remote mode start to the screen of oscilloscope by following command after the port is open fprintf PORT system dsp Remote mode start Where the PORT means the port you want to send command to system dsp is a command which can display words on the screen and Remote mode start is the real statement which going to be shown on the screen The ON OFF text indicator is commanded where needed with foll
5. global PORT b serial com1 fopen b fprintf PORT yt fclose b Executes during object creation after setting all properties function Trigger_CreateFcn hObject eventdata handles 72 hObject handle to Trigger see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint slider controls usually have a light gray background if isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor 9 9 9 end function edit _Callback hObject eventdata handles hObject handle to edit see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject String returns contents of edit as text str2double get hObject String returns contents of edit as a double Executes during object creation after setting all properties function edit6_CreateFcn hObject eventdata handles hObject handle to edit6 see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint edit controls usually have a white background on Windows See ISPC and COMPUTER if ispc amp amp isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject
6. handles output function editl_Callback hObject eventdata handles hObject handle to edit see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject String returns contents of editl as text str2double get hObject String returns contents of edit as a double Executes during object creation after setting all properties function editl_CreateFcn hObject eventdata handles hObject handle to editl see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint edit controls usually have a white background on Windows See ISPC and COMPUTER if ispc amp amp isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor white end 66 Executes on button press in Connect function Connect_Callback hObject eventdata handles hObject handle to Connect see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA global PORT set handles ONOFF String Load PORT serial com1 fopen PORT fprintf PORT system dsp Remote mode being start set handles ONOFF String On Executes on button press in Disconnect function Disconnect_Callback hObject
7. The figure 31 shows the GUT interface The detail of this software MATLAB will be described in Chapter 6 Where the Connect button makes PC and driver connected Disconnection button stops the controlling for the driver Hold up button lets hammer go back for certain angle and Beat button lets hammer strike the Iron bar very quickly Bos EA ma Figure 32 Final Control Panel The ficture 32 shows how the final visual interface looks like and this is exactly what we will use to control the motor 27 28 Chapter 6 Oscilloscope s PC controller In this chapter one oscilloscope controlling method is presented This is a classic method to send commands via RS232 serial port The oscilloscope we used is Agilent 54622A and then programming by using MATLAB This method is very general because 1t can control any oscilloscopes and equipment even if they have no driver 6 1 Introduction This chapter presents how to build own oscilloscope driver The Agilent 54622A has 100MHz bandwidth It is connected with one PC and be controlled via the RS232 serial port The oscilloscope is an analog digital oscilloscope It has an RS232 serial port and a microcontroller with certain commands given by product datasheet Some command functions are not easy to implement without a computer like saving a graph from the oscilloscope or sending a graph to the oscilloscope For the final visual panel programmed it is better buttons ha
8. gui_OpeningFen matlabTEST_OpeningFcn gui_OutputFen matlabTEST_OutputFcn gui LayoutFcn gui Callback if nargin amp amp ischar varargin 1 gui State gui Callback str2func varargin 1 end if nargout varargout 1 nargout gui mainfcn gui State varargin else gui mainfcn gui State varargin end End initialization code DO NOT EDIT 65 Executes just before matlabTEST is made visible function matlabTEST_OpeningFcn hObject eventdata handles varargin This function has no output args see OutputFen hObject handle to figure eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA varargin command line arguments to matlabTEST see VARARGIN Choose default command line output for matlabTEST handles output hObject Update handles structure guidata hObject handles UIWAIT makes matlabTEST wait for user response see UIRESUME uiwait handles figure 1 Outputs from this function are returned to the command line function varargout matlabTEST_OutputFen hObject eventdata handles varargout cell array for returning output args see VARARGOUT hObject handle to figure eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Get default command line output from handles structure varargout 1
9. order to have a visual representation of that filter we also show the simulation result with 200KHz filter as above figure 12 for comparing with 10KHz filter The simply reason of why the 200KHz filter be used is that it has broad bandwidth and has low enough price and the detail analysis will be introduced in section 3 3 2 Sensor and filter selection In order to perform this experiment with physical equipment we need choose a suitable strain gauge sensor and an amplifier with suitable physical filter 12 3 3 1 Sensor The strain gauge sensor has a certain length The sensor measurement of the pressure wave is an average across the sensor length In order to measure the propagation wave the sensor length has of course to be significantly shorter compared to the iron bar length The shorter it is chosen the more accurate measurement signal will be generated A very short sensor will possibly give a too low measurement signal amplitude To match the sensor choice the amplifier has to have a suitable bandwidth A short strain gauge sensor asks for a high amplifier bandwidth In order to keep the cost not too high we have chosen a standard strain gauge sensor and not very high bandwidth in the amplifier The used strain gauge sensor has the length 1 mm which can be found in the data sheet of KFG 1 350 C1 11 A sensor length of one mm is consistent with having about 500 sections in the simulation of the 600mm long iron bar 3 3 2 Amplifier
10. 31 amp amp Time lt 32 a 0 00000005 set handles Tim String 5 ns else set handles Tim String Out of range end Tip num2str a 60 kYt timebase range tm kYt Tip fprintf PORT tm Where Tip num2str a is transforming parameter a to string tm kYt Tip is a combination of two string kYt and Tip and the fprintf PORT tm is sending string tm to certain port named PORT The method of setting Time position Voltage DIV Voltage position and Trigger level are all almost same as above Time DIV setting The main line is getting value from slider first and then sends it to the oscilloscope But only different is using related command which already mention at previous USED COMMAND TABLE For pop up menu the programming is shown as below It need uses switch to select commands of auto mode or normal mode As following code said tt get handles popupmenu2 value global PORT switch tt case 1 fprintf PORT trigger sweep auto otherwise fprintf PORT trigger sweep normal end For waveform reading we need firstly capture the data of waveform and then plot into the axes into graphical interface as following aa csvread View csv 1 1 1 1 2000 1 bb csvread View csv 1 0 1 0 2000 0 plot handles axes1 bb aa Where Wiew csv is a csv file captured by using the software and this procedure is introduced in section 6 4 This file has two columns the one is x axis another is y axis This two colum
11. BackgroundColor white end Executes on selection change in popupmenu2 function popupmenu2 Callback hObject eventdata handles hObject handle to popupmenu2 see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints contents cellstr get hObject String returns popupmenu2 contents as cell array contents get hObject Value returns selected item from popupmenu2 tt get handles popupmenu2 value global PORT switch tt case 1 fprintf PORT trigger sweep auto otherwise fprintf PORT trigger sweep normal end Executes during object creation after setting all properties function popupmenu2_CreateFcn hObject eventdata handles hObject handle to popupmenu2 see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called 73 Hint popupmenu controls usually have a white background on Windows See ISPC and COMPUTER if ispc amp amp isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor white end Executes on slider movement function slider14_Callback hObject eventdata handles hObject handle to slider14 see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA
12. Different bandwidth will generate different averaging of the signals Comparison with different bandwidth 10KHz 100KHz 200KHz 1MHz is shown as figure 13 and from these comparison it is easy to see that during bandwidth increasing and the signal went through filter became as same as simulated result signal It can be judged that a 200KHz bandwidth filter seems consistent with choosing about one mm resolution in the sensor choice and in the simulation element length So the strain gauge amplifier with 200KHz is used in this project and in the chapter 7 it describes how to use this amplifier Pressurewave character 10KHz Pressurewave character 100KHz T T T T T T T T 0 015 0 015 T T Original signal adding filter T Original signal adding filter 0 005 0 005 0 01 X 0 0001194 Y 1 809e 017 BE X 0 0001597 Y 2 354e 005 0 005 0 005 0 01 X 0 0001194 Y 9 198e 005 Y 0 0001366 P 13 Pressurewave character 200KHz T T T T T 0 015 0 01 0 005 T T Original signal adding filter 0 015 Pressurewave character 1MHz T T T T T 0 01 T T Original signal adding filter lu 1 0 005 X 0 0001196 X 0 0001229 Y 0 0001282 X 0 0001194 x 04 Y 9 198e 005 I Y 04 0 005 0 005 0 01 1
13. by below list Pin 1 Brown Pin 2 Red Pin 5 Green Pin 6 Blue Pin 8 Grey Pin 9 Black O O O O O O O O O Pin 3 Orange Pin 4 Yellow Pin 7 Violent Oscillator input Blue port 15 input Supply 15V input 15 input Supply 15V input OV Supply Ground Amplifier Output Output signal OV Supply Ground ID Resistor Connection Ground N C N C Give 1 voltage input port A and B to Pin 1 Oscillator input and ground by the voltage divider as following picture shown Where R1 is 240 Q and R2 is 60 Q R1 47 e Connect oscilloscope probe with Pin 5 The final connection of Strain gauge Pre Amplifier is shown as below picture Until here the physical connection is complete and below picture shows the completely system connection 48 Software operating Now turn on all powers and then open the interface of this system as below B matiabTEsT r Hammer Control 0 3Kg weight Port com2 Connection Disconnection Hold up Agilent 54622A OSCILLOSCOPE 100MHz Port comi Connect Disconnect Autoscal View wave Rui JA Horizontal Run Control o o c lt Status Stop 07r Time position 0 6 4 Single Vertical z Trigger 04r Voltage DIV Level Vol 4 Auto Mode M Vol position e Click Connect to active oscilloscope operation and then
14. connecting between the remote PC and the local PC There are a lot of ways to perform it If you using WIN 7 system it is easy to create a password in the local PC and make it remoteable and then open the mstsc in the remotely PC and setting the local IP address and password Figure 4 Remote control system The picture 4 shows the final remote control system It include one local PC one oscilloscope one iron bar one strain sensor glued on iron bar one sensor amplifier one voltage supplier for the amplifier one hammer mechanism and one remotely PC 15 Measurement amp Modeling results Below figure 5 and figure 6 are the measurement result which got from oscilloscope by the force generated on the iron bar and the modeling result of this experiment We can see there is a lot of reflection that because of the pressure wave traveling in the iron bar caused multi reflection Figure 6 shows the simulation result and figure 5 shows the signal from measurement The time in between the peaks in both figures are the travelling time spent on return trip on iron bar Pressurewave character Original signal 0 01 0 009 0 008 0 007 0 006 0 005 0 004 0 003 0 002 0 001 D 0 02 04 06 08 1 12 14 16 18 2 Figure 5 Measurement result Figure 6 Simulation result Where the left hand figure 5 measurement result we got is coming from a 200KHz filter we can see that the time delay bet
15. e ii 37 T DANDO CONNECTIONS iio 38 7 3 Strain Gauge Bridge CONNECHON Sri O AA 39 CONCISO a e sine sinne 41 Referentes siii 43 Fa 6 01a cibi eL ee 45 Distance Lab s User Manual aia 45 JADDEDUDE DD aee Se ong ttt iege s mie re sc AAAA 53 Software Setting of EiBotBoard 2 ite a len Rn line 33 Appendix Il ns NM TET 55 Updating EBB Tirta est unse 55 A O casi tise 57 Test EBB board with Tera Term Pro i a e eet need eee te rei led cu ped 57 RAPPER V os p 59 Oscilloscope GUI pr gra ming nennen la nina 59 PRPS SAONA O ORKA 63 GUL OF Motor controller ae EB 63 SA lm 65 Distance Lab Interface Programming Code ie nase 65 Chapter 1 Introduction This report introduces a distance laboratory including measurement of the pressure wave propagation in an iron bar The experiment measurement of wave propagation in an iron bar will be arranged to be managed as distance laboratory Anyone can perform the experiment via internet from anywhere by using PC connected to the distance laboratories IP address at the Blekinge Institute of Technology BTH Sweden Via a virtual front panel the whole experiment can be controlled and possibly several students will enjoy this experiment 11 Distance Lab Distance Lab is a research initiative for digital media technology and design innovation focused on addressing the many problems and opportunities found in rural and remote areas of the world In addition
16. eventdata handles hObject handle to Disconnect see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA global PORT fprintf PORT system dsp Disconnected fclose PORT set handles ONOFF String Off Executes on button press in Autoscal function Autoscal_Callback hObject eventdata handles hObject handle to Autoscal see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA ss serial com1 fopen ss global PORT fprintf PORT autoscale fclose ss Executes on button press in pushbutton5 function pushbutton5_Callback hObject eventdata handles hObject handle to pushbutton5 see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Ogq csvread View csv 1 1 1 1 2000 1 Ox csvread View csv 1 0 1 0 2000 0 plot handles axes1 Ox Oq function Y_P_Callback hObject eventdata handles hObject handle to Y_P see GCBO 67 eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject String returns contents of Y P as text str2double get hObject String returns contents of Y P as a double Executes during object creation af
17. for pressure wave in an Iron bar This chapter is going to introduce how to model and simulate the pressure waves propagated in an Iron bar 3 1 Modeling and simulation of system We will model a steel bar from Altas Copco having the length of about 600mm The Iron bar is modeled as a lumped model with a high number of elements The higher number of elements the better accuracy is achieved A very high number of elements will give a long simulation time The number of elements is chosen according to the resolution of the used sensor for measuring the pressure wave in the iron bar The sensor and the measurement amplifier are chosen in order to get a low cost system The modeling and simulation is performed with 500 elements a Mos corresponding to a lumped iron bar model E having about one mm long elements Determining the mass and spring constant for each of elements and derive an equation system for the bar The equation system will x Ax Bu y Cx Du Stste Spsce To Workspace c be given as a system matrix with a diagonal eS 4 vout2 band structure Filter Design To Worispace2 A designed in MATLAB and Figure 9 Simulation of the system Simulink The Simulink model can use ABC model That is shown in figure 9 3 2 ABC model of signal propagation Building of model of previous four elements is shown as formula 3 1 0 0 0 0 1000 0 0 0 0 0
18. gauge changing we need to use related amplifier to amplify this signal Since we have introduced the strain gauge sensor in section 1 3 and section 3 3 1 in this chapter the amplifier connection will be described The figure 41 shows the strain gauge sensor glued on the iron bar We can see that there are four wires out coming from the sensor that will be connected with sensor amplifier Figure 40 Strain gauge sensor Figure 41 Strain gauge sensor installed on the Iron bar 7 1 Strain Gauge Amplifier The board used in the project is named Strain Gauge Pre Amp Board with 9 pin D Type Cable It used to connect with the strain gauge sensor The figure 42 shows this amplifier This pre amplification circuitry is designed to amplify resistance changes within a full Wheatstone bridge strain gauge to produce a signal suitable for measuring in oscilloscope 37 Figure 42 Strain gauge amplifier The amplification circuitry uses a low power general purpose instrumentation amplifier offering excellent accuracy suitable for strain gauge bridge amplification Current feedback input circuitry provides wide bandwidth even at 200KHz 7 2 D type connections The pin out of the D type connector is designed for directly connecting to the THORLABS s product but in this project need to connect it with a normal oscilloscope so we cut the wire then matching each wire with each color just as figure 44 illustrated Figure 43 Ports of the Ca
19. handles structure with handles and user data see GUIDATA Hints get hObject String returns contents of Status as text str2double get hObject String returns contents of Status as a double Executes during object creation after setting all properties function Status_CreateFcn hObject eventdata handles hObject handle to Status see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint edit controls usually have a white background on Windows See ISPC and COMPUTER 75 if ispc amp amp isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor white end Executes on button press in Motor hold function Motor hold Callback hObject eventdata handles hObject handle to Motor hold see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA global PORT M fprintf PORT_M SM 1000 2000 set handles Motor_up_dowm String Go up Executes on button press in Motor_heat function Motor_heat_Callback hObject eventdata handles hObject handle to Motor_heat see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA global PORT_M fprintf PORT_M EM fprintf PORT_M S
20. iron bar This report introduces some equipment selection especially strain gauge sensor and the connection between different equipment and also introduces how to install this system and how to use this system In terms of software this report describes some related programming which is used to let hardware oscilloscope and motor be controlled by a PC via internet Finally the completed interface is created for controlling whole system and this visual controlling panel has high speed of communication between a PC and equipment The modeling represented in the beginning is used to analysis the real physical system by a theoretical way This is also a typical way that used to check the physical experiment to see if there is any error existed Now we do not only have the complete distance lab but also have affiliated software to control it and theoretical method supporting the related calculation and related working procedure So this report can be used by who is very interesting in this distance system 41 42 References 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 O Thomas Holland and Patrick Marchand Graphics and GUIs with Matlab Third Edition Graphics amp GUIs with MATLAB 25 Nov 2002 A L Window Strain Gauge Technology Springer 2 ed Edition 30 Nov 1992 ISBN 13 987 1851668649 Principles of Measurement Systems John P Bentley Publisher Prentic Ha
21. set the relative parameter as you want e Click Connection to active mechanism system e Click Hold up to make the hammer have a center angle with iron bar e Click Hit to let the hammer hit the iron bar to finish pressure wave generating e Before open IntuiLink Data Capture click Disconnect to disconnect oscilloscope with PC e Open IntuiLink Data Capture From the Instrument menu choose 54620 serial e click set T O then click on Find Instrument to initiate a search e Select which address the instrument currently used e Click Identify Instrument s All the parameters should be as COMI Settings a same as set in the oscilloscope especially HandShake should set Baud Rate as XOn XOff Then press OK 3600 zl e Now your oscilloscope should be shown at right blank After Parity Size None e y click Connect a green icon appears to the left of the instruments that is connected Then press OK Ben XOr XDIf 49 r identified Instruments on My Computer Instrument s with Instrument Type in bold are supported Disconnect Connected Cancel e The I O address is changed for current data just click OK to finish Get waveform SetI 0 170 address C0M1 BAUD 3600 PARITY NONE SIZE 8 HANDSHAKE gt 0N_ gt 0FF To download data form the instrument select from the instrument menu and select your instrument or select the Get Waveform icon after Connected to th
22. 100 X 0 0 0 0 001 0 a 0 x 0 0 0 0 00 0 1 f x E k k 5 gt D 60 00 90 A 0 4 x k 2k k X4 1 F 3 1 i E 0 0000 m Xi m m m X2 0 Xi k 2k k X3 a 0 0000 0 Xi m m m X4 0 k 2k 0 0 0000 m m Where the parameters meaning in above model are described as Table 1 Table 1 Description of parameters Parameter Description xj position of each element Xj velocity of the pressure wave propagation into Iron bar X Accelerated velocity of the pressure wave propagation into Iron bar k Spring constant m Mass of each element F Input signal the force knocking at the end of iron bar The spring constant follows formula 3 2 K E A L 3 2 Where K is spring constant E is young s modulus 1 9x10 pa A is area of transverse surface 1 96 x 10 m and L is length of iron bar 0 6m The initial equations of designing whole system are written as below ALE F K x x2 when j 1 3 3 1 X K xj 1 x K G xj44 when j 1 3 4 The ABC differential equation system is given as x Ax Bu 3 5 y Cx 3 6 For this case we measure the velocity at the end of bar x4 Where the u is the input signal the y is the output we want to figure out 0 0 0 0 1000 6 0 0 0 0100 0 0 0 0 0010 0 0 0 0 000 1 k ek al x 0 0 0000 an k E E n 0000 M M M jo LE UE 0000 M M M 6 0 E GE ub 00 M M 0 0 0 0 B 1 3 8 M 0 0 0 C 00000001 3 9
23. 4 1 l 1 1 L 1 l 0 01 1 1 1 1 1 1 1 1 1 Figure 13 Filter comparison with different bandwidth Give the sensor we try to find a suitable bandwidth in the amplifier on base of how the sensor affect the pressure wave The velocity of pressure wave propagation v in a solid iron bar is given by formula 3 10 The velocity is dependent on density and elastic properties of the media see 11 v etas property E 3 10 Where B Bulk modulus p density The Bulk modulus of Iron is 200 GPa and density is 7 874g cm 7 874 g cm 7874 Kg m 3 11 200GPa 200 x 10 N m 3 12 The velocity of propagation as below v O RE 5039 846 m s 3 13 7874 Kg m3 Our strain gauge sensor on the Iron bar has 1mm length The wave will travel across the sensor during T seconds where T is given by d 0 001m s oem o dn 3 14 14 In order to have a good measurement from the chosen sensors we need choose a suitable bandwidth in the amplifier Figure 14 Phase shift We introduce a concept that is phase lag As we can see on the above figure 14 the red line preform original signal and blue line preform the signal passed low pass filter The assumed phase lag in the measurement sensor implied that we have not use for a very high bandwidth in the measurement amplifier Let s assume that we choose a filter bandwidth that not further will affect the measurement signal We then state that the delay should be visible as a visibl
24. Bachelor Thesis School of Engineering June 2012 Distance Laboratory Measurement of Signal Propagation in an Iron Bar Yunfei Wang Xi Zhang School of Engineering Blekinge Institute of Technology SE 37179 KARLSKRONA SWEDEN Phone 46 45585000 Contact Information Authors Yunfei Wang E mail wangyunfeisweden O gmail com Xi Zhang E mail xizhangsw gmail com Supervisor Anders Hultgren Email anders hultgren O bth se Section Unit ING School of Engineering Blekinge Institute of Technology School of Engineering Phone 46 455 3850 00 E mail info bth se Fax 46 455 38 50 57 Webpage www bth se eng ABSTRACT In the laboratory it should be possible to perform an impulse response experiment of the iron bar A mechanical system for generating the impulse input the end of the iron bar should be developed At the one end of the Iron bar there are strain gauge sensors and measurement amplifiers mounted It should be possible to connect one channel from an oscilloscope to the output form the measurement amplifiers Contents Ito JU COM TEES 1 14 Distance Ec S 1 1 2 The Mechanical System Iron Bar a A A 1 1 3 Strain gauge SensoLb ya kabat i teli Cose ted persius dtes ducere ti suas a 2 LAs Internet interlace seo air 3 1 5 Measurement amp Modeling results eet in ttis na 3 Inns surdus Ae EN A OE 5 2l Distance LAD za aa dt ottenuti dete ati Pac i 5 2 2 Pressure waves 10 ron Bats cep
25. Color set hObject BackgroundColor 9 9 9 end function Tim_Callback hObject eventdata handles hObject handle to Tim see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject String returns contents of Tim as text str2double get hObject String returns contents of Tim as a double Executes during object creation after setting all properties function Tim_CreateFcn hObject eventdata handles hObject handle to Tim see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint edit controls usually have a white background on Windows See ISPC and COMPUTER if ispc amp amp isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor white end Executes on slider movement function Trigger_Callback hObject eventdata handles hObject handle to Trigger see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject Value returns position of slider get hObject Min and get hObject Max to determine range of slider t get handles Trigger Value set handles edit6 String num2str t st num2str t kt trigger level yt kt st
26. M 1000 10000 set handles Motor_up_dowm String Go down Executes on button press in Motor_connection function Motor_connection_Callback hObject eventdata handles hObject handle to Motor connection see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA global PORT_M PORT_M serial com2 fopen PORT M fprintf PORT_M SM 1000 1000 set handles Motor_Con_status String On Executes on button press in Motor_disconnection function Motor_disconnection_Callback hObject eventdata handles hObject handle to Motor_disconnection see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA global PORT_M fclose PORT M set handles Motor Con status String Off set handles Motor up dowm String Status function Motor Con status Callback hObject eventdata handles hObject handle to Motor Con status see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject String returns contents of Motor Con status as text str2double get hObject String returns contents of Motor Con status as a double 76 Executes during object creation after setting all properties function Motor_Con_status_CreateFcn hObject eve
27. Vol E Auto Mode 0 05V 0 002 Figure 35 Final front panel 32 LJ 1 00E 03 9 99E 04 9 98E 04 9 97E 04 9 96E 04 9 95E 04 9 94E 04 9 93E 04 9 92E 04 9 91E 04 chi 5 63E 02 5 94E 02 5 63E 02 5 94E 02 5 63E 02 5 94E 02 5 94E 02 6 25E 02 5 94E 02 5 94E 02 Figure 36 CSV waveform data 33 6 4 Waveform Data Capture This section describes a software IntuiLink Data Capture which is designed by Agilent to capture data directly from equipment It gives a convenient processing to do so The waveforms are actual time and voltage data from the oscilloscope IntuiLink Data Capture displays them graphically but they are stored as a table of time voltage pairs This data can be stored in several other formats of copied to other programs for further analysis such as MATLAB Remark 1 Oscilloscope waveform data capture with IntuiLink Data Capture Remark 2 Oscilloscope waveform got via camera sec Volt r Data as st tm 563m C raw data byte word Stop rss 1 seau 825m scaled data Interval 1388 Bm 825m ivi Display Mode Normal i 5 28 2012 6 40 PM Figure 37 LintuiLink Data Capture Figure 38 Waveform on the Oscilloscope 34 The Agilent Data Capture is a dependent program for the purpose of downloading waveform data from Agilent Oscilloscopes It provides the fo
28. an Iron bar and one added filter to describe the measurement system The most important cost related property of the measurement system is the bandwidth In order to model the limited bandwidth a low pass filter is added in the simulation 10 Pressurewave character with 10KHz 0 015 Original signal adding filter 0 01 0 005 0 005 Figure 11 Signal comparison with 10KHz filter In figure 11 the amplitude does not have real meaning but for the real propagation wave it will mean the voltage the blue pulses sequence represents the original pressure wave and red pulses sequence is the wave went through the addition 10KHz bandwidth filter Here using 10KHz bandwidth filter just for taking an example to see how the original signal and the adding filter s signal look like We use different measurement amplifier with different bandwidth in order to find a suitable bandwidth for the amplifier using the iron bar element length of about one mm We also can see in the figure 11 there are a lot of reflections that because the pressure wave travelled in the iron bar over and over and the time between two top points is the travelling time that pressure wave travelled one round trip 11 Pressurewave character with 200KHz 0 015 Original signal adding filter 0 01 0 005 0 005 0 01 0 Figure 12 Signal comparison with 200KHz filter As comparison the filter we have chosen in the real measurement has 200KHz bandwidth In
29. ble Figure 44 Ports inside the Cable Table 4 Pin description Pin Number Input Output Pin 1 Brown Voltage Oscillator input Pin2 Red 15 input Supply Pin 3 Orange 15 input Supply Pin 4 Yellow OV Supply Ground Pin 5 Green Output signal Pin6 Blue OV Supply Ground Pin 7 Violent ID Resistor Connection Ground Pin 8 Grey N C Pin 9 Black N C 38 By following Table 4 we connect these wires with power supply and have a correct connection way that can use oscilloscope to measure the output signal from this filter Connection details are shown as below figure 45 Figure 45 Amplifier connection with related input or output 73 Strain Gauge Bridge Connections Connections of the full Wheatstone bridge amplifier circuit are shown in detail in figure 46 Table 5 Wheatstone bridge connection Color Port Input Output Blue port Positive output of strain gauge bridge Same port with Pin 1 Yellow port Negative output of strain gauge bridge Red port Oscillator input of strain gauge bridge Black port Ground 39 Blue ve 4 R2 dummy R1 active Vo R4 active dummy Y Yellow ve Red ve VEX Black ve Bridge Excitation Voltage Figure 46 Full Wheatstone Bridge Connection According to this Wheatstone bridge connection as figure 46 and the Table 5 we can see that R1 active RA active both are Strain Gauge sensors attached o
30. d with strain gauge sensor one Strain Gauge Pre Amplifier one power supply one 15voltage power supply one Agilent 54622A Oscilloscope one oscilloscope probe one PC Below pictures list these elements Appendix fig 1 Distance lab equipment 45 Physical system connection First we connect these elements as one entire system e Connect oscilloscope RS232 port with RS232 cable then connected with USB converter finally insert into PC s USB port e Connect EiBotBoard with 15voltage power supply and USB cable then insert USB cable into PC s USB port Also connect EiBotBoard with stepper motor as below picture shown Appendix fig 2 Motor connection e Insert the hammer onto stepper motor as below picture shown Appendix fig 3 Hammer connected with motor e Coordinate the hammer with iron bar that the hammer can hit iron bar s end glued strain gauge sensor perfectly 46 Connect Strain Gauge Pre Amplifier with strain gauge as below appendix fig 3 shown Where the four red wires are coming from strain gauge The connection follows the below appendix fig 4 Blue ve 4 R2 dummy R1 active active Red ve Vex T Bridge Excitation Voltage T Appendix fig 3 Strain gauge amplifier connection Appendix fig 4 Connection description Where in the right picture R1 and R4 are strain gauge sensor and R2 R3 are two 350 Q resistor respectively Give relative input of Strain Gauge Amplifier
31. e Instrument File Edit View Instrument Window Help Ma Select the channel and Number of points wanted to download 50 mL Get Waveform Set I 0 Channel Number of points 2 Off Math Off om Click Include X axis data on save then save data to a file that can be read by MATLAB CSV file that named View csv The saving path must belong to the file where the system s interface in File Edit View Instrument Window Help Su B Point sec Vot _ pDa aas Stat 6 Fm 563m raw data byte word Stop 1888 1 883u 825m scaled data Interval 1999 2m 625m Display Mode Noma 0 00 0 01 0 02 0 03 0 04 0 05 0 06 0 07 L 5 28 2012 640 PM A ID COD TRE Fr Favorites B Desktop Ji Downloads T Recent Places System Folder y Network E System Folder File name View csv Ci Tab delimited b Text space delimited prn Binary bin IAN C 8 28 2012 542 PM 51 e To show this wave in MATLAB interface just click View wave button in the interface It actually just plot the CSV file View csv Hammer Control 0 3Kg weight Port com2 Connected Disconnection Waiting r Agilent 54622A OSCILLOSCOPE 100MHz Port comi Connected Horizontal Run Control Single Time position Trigger Volta
32. e phase shift at the bandwidth Below bandwidth f calculations are shown for phase shifts between to m T zare 3 15 gg wo Eg SP cera fol 316 30 nf lt 3 3 16 lefa 3 17 or GT en etg 3 18 60x0198us 6x0198ps 918 Ld PZ 1 3 19 60x022x10 5 f x022x10 5 on 0 084 x 10 Hz lt f lt 0 84x 106 3 20 84KHz f lt 840KHz 3 21 So we can say that if we select one first order filter had frequency between 84K Hz and 840KHz the delay time of 0 198 ys is enough visible in the output 15 In this chapter we discussed how to select a suitable filter for matching the original signal In order to get a good filter that do not change the strain gauge signal too much but has a suitable price we chose different bandwidth to simulate pressure wave to see how the signal changing The model we used in this chapter was separated the entire iron bar by 500 elements Since the length of iron bar is 0 6m the each element is 1 2mm length Compared with sensor we used had 1 mm the length of each iron bar element is short enough So this model can be used to investigate which suitable bandwidth is By other words if the filter does not affect the simulated signal it should not affect the measured signal too much 16 Chapter 4 Stepper Motor Before select one motor we need to know how much torque is enough for moving hammer For this testing we put the iron bar vertical and let an iron ball free fall from the iron bar
33. ekinge Inst Of Technol Ronneby Sweden Source Proceedings of the Fourth IEEE International Caracas Conference on Devices Circuits and system Cat No 02TH6611 p 1025 1 5 2002 A remote access laboratory for electrical circuit experiments Gustavsson I Dept of Telecommun amp Signal Process Blekinge Inst Of Technol Sweden Source International Journal of Engineering Education v19 n3 p409 19 2003 Remote operation and control of traditional laboratory equipment Gustavsson I Dept of Singal Process Blekinge Inst Of Technol Ronneby Sweden Zackrosson J Akesson H Hakansson L Claesson I Lago T Source nternational Journal of Online Engineering v2 nl p8 pp 2009 43 18 Anytime Everywhere Approaches to Distance Labs in Embedded Systems Education Markus Proske and Christian Tr dhandl Vienna University of Technology Institute of Computer Engineering Vienna Austria 19 Development of Distance Real laboratory System Kazutake Kozono Hidenori Akiyamma and Naoyuki Shimomura Graduate School of Science and Technology Kumamoto University Department of Electrical and Electronic Engineering Tokushima University 20 Atlas Copco company s breaker http www atlascopco se sesv 44 Appendix I Distance Lab s User Manual This lab consist of one RS232 cable one RS232 USB converter one USB cable one stepper motor one EiBotBoard one hammer one iron bar glue
34. en explained in the Charpter 4 So we just use that way to screw the motor on the EBB Figure 27 shows the six wires out coming from motor We just ignore two of middle wires when connected with EBB since the motor is uni polar and EBB is prepared for bi polar motor CO COLORS OF LEAD WIRES UNI POLAR BLK A GRN amp A s 5 0 iB k B RED WHT BLU Figure 27 Wires Distribution The Yellow one and White one in figure 27 are center wires will be ignored The final connection is represented as figure 28 Figure 28 Connection of motor and driver 25 5 7 Generate force with hammer and motor In this section the mechanical system will be combined completely Connect a hammer with the motor to generate a force via PC controlling But we need drill some holes for inserting into the motor firstly Figure 29 Hammer There are two holes in the figure 29 the one is the main hole for inserting into motor and another is a screw hole which will be screwed a nut for fixing the motor with the hammer Figure 30 Mechanical Hammer System Figure 30 shows how the mechanical system looks like 26 5 8 Graphical User Interface Control QGH s mmoc smfuditE gt r Panel Push Button Slider Edit Text e Radio Button Current Point 235 257 Position 520 543 558 257 Figure 31 Motor Driver Interface Here we use MATLAB GUI to control this driver
35. f Bipolar Stepper Motor 4 5 Drive uni polar stepper by bipolar driver The certain stepper motor must need a matched driver so unipolar stepper motor has to be driven by unipolar driver and bipolar stepper has to be driven by bipolar driver respectively In some case we have to use bipolar driver to control unipolar stepper So the special connection is needed For connecting unipolar stepper with bipolar driver it need ignore the center tap and rest of them can connect as bipolar stepper s way The detail connection is shown as figure 22 Figure 22 Connection of Uni polar Stepper and Driver 20 Chapter 5 Stepper motor controller Since we already choose one stepper motor In order to control it in real time by a PC we need to choose one controller to control it We just decide to use EiBotBoard EBB to complete this mission This chapter also discuss how to connect EiBotBoard EBB stepper motor controller with stepper motor and how to programing it to achieve real time controlling 5 1 EiBotBoard EBB Overview This EiBotBoard was originally designed for the Egg Bot project It is a two stepper motor driver with USB microcontroller It is developed based on UBW board and it supports all of commands of UBW The way of this board controls two stepper motors moving is sending command from a PC over a USB connection This is accomplished by two micro stepping chopper stepper motor drivers and a Microchip PIC microcontroller wh
36. ge DIV 0 02744 Vol 4 Vol position Auto Mode Until here we have introduced how to connect equipment and how to use interface to control this system All the controlling can be operated by distance way You only need have a PC to ed Connection Extras Help access the local PC by internet There are a lot of Free license non commercial use only software can do this and what we used is named ROTOR Meeting Team Viewer This can be free downloaded Allow Remote Control Control Remote Computer from internet Both local PC and remote PC have folleving ID and password 1f rou order to control the remote o m to install this software and it will give your ID and Partner ID Your ID 613 553 371 password that you can use it to access the local PC TP i asswor Remote control Th 1 li k C fi 1 h gt File transfer en simply click Connect to partner to finis a Alternatively psa your predefined remote controlling m to control this computer Following above description you can install all the equipment and then can access this distance lab in anywhere MO Ready to connect secure connection Computers amp Contacts 52 Appendix II Software Setting of EiBotBoard After install the UBW driver we need to see or change the port number by following below steps Go to Start gt gt Control panel gt gt Hardware and Sound gt gt Device Manager gt gt Extend Port COM a
37. gro A4983s are bi polar driver chips so any stepper motors which purposed connecting with EBB are need wired in bi polar mode Blueprint of EiBotBoard is shown as figure 24 In order to control ours uni polar stepper motor MOTRO lor MOTOR 2 can be used for connecting with the motor as bi polar model Power supply and USB connector must be connected Since the motor which we already choose need 2A phase to get maximum torque so when d T T e B5 JP H oam EiBotBoard 3 3 psoe 2 4 Released e od amp Conmons m s t ic ncie Figure 24 EiBotBoard back side the motor is driven by EBB its maximum torque will be approximate 40N cm The figure 25 shows how the motor system connected Figure 25 System connection of the motor 22 5 3 Software setting When first time using this EBB in a PC it need install a UBW driver to be known by the PC After that it can be plugged into your computer via a USB cable And this time it will show up as a serial port When it is done installing and your EiBotBoard LED is slowing flashing you can see this device s port number even changing the port number The detail steps are shown in the Appendix II 54 Updating EBB firmware We use this EBB by Windows7 and need update firmware before using this board In this procedure the HIDBootLoader exe updating software is going to be used You will find this software on the webpage of EBB It also needs a USB cable a power supp
38. ich supports USB connection It will be known by a PC as a serial port when you plug this EBB board into your PC USB port That will let you can very easy to build your own application to send commends to EBB for controlling stepper motors Need to note that different board version have different features as some output changed or some requirements changed In this project we use the EiBotBoard version 1 4 as figure 23 shown Figure 23 EiBotBoard 5 2 Hardware connection The EiBotBoard consists of a PIC18F46J50 microcontroller and two Allegro A4983 stepper derivers It works with some voltage regulators and USB connection hardware And it takes 6 24V DC input with one barrel jack connector This directly powers the motor driver chips and then be dropped down to 5V to supply power to RC servos and down to 3 3V to power the microcontroller You can set the maximum current allowed to motors from 46mA to 1 25A per phase by adjusting the current adjustment 21 potentiometer which in the center of the EBB More two push buttons allow for resetting the EBB and entering into bootloader mode to update the firmware via USB which will be described on section 5 4 updating EBB firmware Three LEDs indicate the 3 3V power stepper direction and USB connection status The screw terminals support for connecting with many types of stepper motor but they are must either be 4 wire stepper motor or 6 7 8 wire motors The reason is the two Alle
39. ime gt 22 amp amp Time lt 23 a 0 00005 set handles Tim String 5 us elseif Time gt 238 6 Time lt 24 a 0 00002 set handles Tim String 2 us elseif Time gt 24 amp amp Time lt 25 a 0 00001 set handles Tim String us elseif Time gt 25 amp amp Time lt 26 a 0 000005 set handles Tim String 500 ns elseif Time gt 26 amp amp Time lt 27 a 0 000002 set handles Tim String 200 ns elseif Time gt 27 amp amp Time lt 28 a 0 000001 set handles Tim String 100 ns elseif Time gt 28 amp amp Time lt 29 a 0 0000005 set handles Tim String 50 ns elseif Time gt 29 amp amp Time lt 30 a 0 0000002 set handles Tim String 20 ns elseif Time 30 amp amp Time lt 3 1 a 0 0000001 set handles Tim String 10 ns elseif Time 3 1 amp amp Time lt 32 a 0 00000005 set handles Tim String 5 ns else set handles Tim String Out of range end Tip num2str a kYt timebase range tm kYt Tip fprintf PORT tm 71 Executes during object creation after setting all properties function Time_CreateFcn hObject eventdata handles hObject handle to Time see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint slider controls usually have a light gray background if isequal get hObject BackgroundColor get 0 defaultUicontrolBackground
40. is the density for iron A mechanism whith a hammer connected to a motor is used for hitting the iron bar end and introduce the pressure wave This mechanism will be described in chapter 4 and chapter 5 1 3 Strain gauge sensor A strain gauge sensor is used to measure press wave inside the iron bar The strain gauge shape is the one that shown as right figure and it can transform length of mechanical structures to resistance changing It is glued on a mechanical structure and if the mechanical structure is changed in length the glued resistance is also changed in length According to the formula 1 1 the resistance R changes dependent on the length L The glued resistance is connected to a Wheatstone bridge that measures the resistance with high accuracy The measurement signal is proportional to the change in length of the mechanical structure Figure 2 Strain gauge sensor L When a pressure applied on it but do not exceed its limit do not break it the mechanical structure will become longer or narrower Electrical resistance will increases or decrease respectively See figure 3 and formula 1 1 Compression area thickens resistance decreases Figure 3 Visualization of the Working Concept This is one way which from the measured electrical resistance of the strain gauge the amount of applied stress can be inferred 14 Internet interface Due to the project dependent on internet control the users have to set the remote
41. les YPosition Value set handles Y_P String num2str Y t stY num2str Yt kY channell offset y Y kY stY global PORT b serial coml topen b fprintf PORT yY Executes during object creation after setting all properties function YPosition CreateFcn hObject eventdata handles hObject handle to YPosition see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint slider controls usually have a light gray background if isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor 9 9 9 end Executes on slider movement function Time Callback hObject eventdata handles hObject handle to Time see GCBO 69 eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject Value returns position of slider get hObject Min and get hObject Max to determine rangeof slider global PORT Time get handles Time Value if Time set handles Tim String Waitting elseif Time gt 1 amp amp Time 2 a 500 set handles Tim String 50s elseif Time gt 2 amp amp Time lt 3 a 200 set handles Tim String 20s elseif Time gt 3 amp amp Time lt 4 a 100 set handles Tim String 10s elseif Time gt 4 amp amp Time lt 5 a 50 set hand
42. les Tim String 5s elseif Time gt 5 amp amp Time lt 6 a 20 set handles Tim String 2s elseif Time gt 6 amp amp Time lt 7 a 10 set handles Tim String 1s elseif Time gt 7 amp amp Time lt 8 a 5 set handles Tim String 500 ms elseif Time gt 8 amp amp Time lt 9 a 2 set handles Tim String 200 ms elseif Time gt 9 amp amp Time lt 10 a 1 set handles Tim String 100 ms elseif Time gt 10 amp amp Time lt 1 1 a 0 5 set handles Tim String 50 ms elseif Time gt 11 amp amp Time lt 12 a 0 2 set handles Tim String 20 ms elseif Time gt 12 amp amp Time lt 13 a 0 1 set handles Tim String 10 ms elseif Time gt 13 amp amp Time lt 14 a 0 05 set handles Tim String S ms elseif Time gt 14 amp amp Time lt 15 a 0 02 set handles Tim String 2 ms elseif Time gt 15 amp amp Time lt 16 a 0 01 set handles Tim String ms elseif Time gt 16 amp amp Time lt 17 a 0 005 70 set handles Tim String 500 us elseif Time gt 17 amp amp Time lt 18 a 0 002 set handles Tim String 200 us elseif Time gt 18 amp amp Time lt 19 a 0 001 set handles Tim String 100 us elseif Time gt 19 amp amp Time lt 20 a 0 0005 set handles Tim String 5O us elseif Time gt 20 amp amp Time lt 21 a 0 0002 set handles Tim String 20 us elseif Time gt 21 amp amp Time lt 22 a 0 0001 set handles Tim String 10 us elseif T
43. ll 4 edition ISBN 10 0130430285 Modeling of Dynamic Systems Lennart Ljung and Torkel Glad Publisher Prentice Hall 1 Edition May 5 1994 ISBN 10 0135970970 Arik D Brown Electronically Scanned Arrays MATLAB Modeling and Simulation CRC Press 1 edition 8 May 2012 ISBN 10 1439861633 Howard W Johnson and Martin Graham High Speed Signal Propagation Prentice Hall 1 edition 24 Feb 2003 Giovanni Bianchi Electronic Filter Simulation amp Design McGraw Hill Professional Har Cdr edition 1 July 2007 ISBN 10 0071494677 Harprit Singh Sandhu Running Small Motors with PIC Microcontrollers McGraw Hill professional l edition 1 Aug 2009 ISNB 10 0071633512 DAVID G ALEXANDER and R E SMELSER Delivering an Engineering Laboratory Course Using the Internet the Post Office and a Campus Visit www bigtopmania co uk pdf downloads HSE Guidance hss guide to wacker use pdf http hyperphysics phy astr gsu edu hbase sound souspe2 html Foss B A Malvig K E Eikaas T T Remote Experimentation New Content in Distance Learning Proceedings of the ICEE 2001 Conference in Oslo Norway August 6 10 2001 Benson H University Physics John Wiley amp Sons Inc 1991 pp41 42 Johnson D Johnson J Hilburn J Scott P Electric Circuit Analysis Third edition Prentice Hall International Inc 1997 Remote laboratory experiments in electrical engineering education Gustavsson I Dept of Telecommun amp Signal Process Bl
44. llowing functionality e Download waveform data and display the data as a simple image e Save the data as binary or text files e Load saved data back into the application Connecting to the Instrument It needs few steps to connect this software to the oscilloscope in order to read wave And this procedure is introduced in the Appendix I in detail So you can only follow those steps to finish connection Display of Waveform Data After complete the connection between the software and oscilloscope the wave will directly be shows in window just as same as wave in the oscilloscope as figure 39 shown File Edit View Instrument Window Help a En mi CA Users FEN Desktop matlab control oscil View csv Point sec Volt Data as Start o E dm 56 3 m C raw data byte word Stop i999 Jesu 825m ie cscsled dats Interval 1999 2m 6 25 m pi Display Mode Nomi 5 28 2012 6 40PM Figure 39 Waveform with setting scaled data Save to a File Since the wave reading function we programmed in the user s interface just plots a CSV file So we have to save data to a file that can be read by MATLAB The format has lot of types such as Text Tab delimited Text space delimited CSV and Binary But we need to save as CSV file in this project in order to be plot by the MATLAB interface 35 36 Chapter 7 Measurement of Pressure wave In order to read the strain
45. lt Enable 2 gt parameter is not needed o When setting microstep values with Enable 1 gt will enable both axis in 1 16st step mode default on boot u 2 will enable both axis in 1 8 st step mode u 3 will enable both axis in 4 st step mode u 4 will enable both axis in st step mode u 5 will enable both axis in full step mode o Note that any time an SM command is executed both motor become enabled before the move starts thus it is almost never necessary to issue a EM 1 1 command to enable both motors e Example EM 2 this command will set both motor in 1 8st step mode e Return Packet OK The SM Command Stepper motor move Format SM lt duration gt axis 1 gt axis 2 gt o duration is a value from 1 to 65 535 and is in milliseconds It represents the total length of time you want this move to take o axis 1 gt and axis 2 are values from 32 767 to 32 767 and represent the number of steps for each motor to take lt duration gt milliseconds o If both lt axis 1 gt and lt axis 2 gt are zero then a delay of lt duration gt ms is executed lt axis 2 gt is an optional value and if it is not included in the command zero steps are assumed for axis 2 The maximum speed that the EBB can generate is 25 000 steps s Example SM 1000 250 u Return Packet OK 24 5 6 Drive with motor Now we need connect the driver and motor and the connection way has be
46. ly for EBB a HEX file downed from website that you want to program into this EBB When it is successful you will see the figure 26 The detailed steps are introduced in appendix III A NN cn m l Open Hex File Erase Device Read Device BpotHx Allow Configuration Word Programming Erase Started no status update until complete may take several seconds Erase Complete Programming Started Programming Complete Verify Running Erase Program Verify Completed Successfully Figure 26 EBB firmware updating 5 5 Used commands This EiBotBoard firmware is based on the UBW firmware The same basic command processing framework is used so the same types of commands are used and the same types of errors are returned There are list some important commands used in our project and some explanation The V Command version testing e Format V 23 e Return Packet EBBv 13 and above EB Firmware Version 2 1 5 The EM Command enable motor e Format EM Enable 1 gt Enable 2 gt o To enable a motor driver set its Enable parameter to 1 o To disable a motor driver set its lt Enable gt parameter to 0 o To set the microstep mode of BOTH motor driver the same signals go to both drivers so you can t set them separately use a value of 1 2 3 4 or 5 for lt Enable 1 gt When you use a value of 1 2 3 4 or 5 for lt Enable 1 gt the
47. mp LPT You will see your UWB device inside this tree as Right click UWB device and choose Properties gt gt select Port Settings and Advanced gt gt Now you can change the COM port number directly Below figures show some steps of this port number changing Standard Serial over Bluetooth link COM Properties usa a COM18 Advanced Settings for 0419 COM20 s COM21 7 Use FIFO buf COM22 COM23 COM24 Select lower CO M2 U wg 14 g High 16 16 Figure Appll I COM Port Properties Figure Appll 2 Port number selection 53 54 Appendix III Updating EBB firmware e Power on the EBB with the power supply and connect the USB cable to your PC e Press and hold the PRG button while pressing and releasing the RST button then release the PRG button e Run the HIDBootloader exe program e You should see it says Device attached e Click Open Hex File and select the HEX file that you want to download e Click Program Verify e When programming is complete click Reset Device e When the Inkscape extension finds your EBB it will tell you the firmware version number so you can verify that the new version is detected properly Some interim results are shown below Device attached Figure ApplIII 1 55 Sn Allow Configuration Word Programming Erase Started no status update until complete may take several seconds Erase Complete P
48. n the Iron bar So we give the R2 R3 as normal resistor 3500 respectively The sensor resistance is 350 Q and the dummy s resistance must be as same as active s resistance The Red port is an oscillator signal receiving port We give signal as 1 voltage supply Since considering certain equipment there is only one supply which can generate 5V fixed voltage so the voltage divider has to be introduced The circuit is designed as figure 47 R1 Figure 47 Voltage divider circuit Since we want to have a 1V output from this voltage divider the rate of R4 and R should 4 1 R4 24R The two terminals A B will be as a oscillator supply for the wheatstone bridge so the load must be considered But the value of load s resistance is unknown We have to try it by several times to decide which R is suitable The basic method is that R should be small enough compared with load Finally Rz is decided as 600 and Ry is 240 Q So the Red port and Black port will be connected with two terminals A and B 40 Chapter Conclusions This project is mainly created for distance lab Using those programmed software you can perform every things just like doing this experiment physically The experiment can be performed at any time any place and students will don t have to go to Lab room This way will protect hardware not be destroyed and also save time for students and teachers This distance lab system is mainly analyzing the pressure wave propagation in an
49. ndle to ONOFF see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject String returns contents of ONOFF as text str2double get hObject String returns contents of ONOFF as a double Executes during object creation after setting all properties function ONOFF_CreateFcn hObject eventdata handles hObject handle to ONOFF see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint edit controls usually have a white background on Windows See ISPC and COMPUTER if ispc amp amp isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor 77 set hObject BackgroundColor white end 78
50. ng an impulse forces at one terminal of a bar in axial direction a pressure wave is generated and propagated along the bar It is possible to model wave propagation in a bar by meaning of modeling the Iron bar as 1 lumped model consisted of a large set of rigid masses connected by springs such as figure 7 illustrated The reference about this iron bar modeling is at reference 4 Mass element Spring element Figure 7 Model of a lumped bar Figure 7 shows a model of a lumped bar The bar is sectioned in four mass parts with intermediate springs The coordinate x means the positions of the each mass element The formula of modeling this spring mechanical system is as formula 2 1 f K x x2 2 1 When a force generated at one terminal of the iron bar this force will transmit itself element by element until the force is consumed During this process the element will be extended or be compressed And it also will make the sensor glued on the surface of iron bar extend or compress So the resistance of sensor is changing when we knock the iron bar and for this reason we can measure the pressure wave by using strain gauge sensor Section 3 1and 3 2 describe how to model this mechanical system and section 3 3 introduces the sensor in detail which will be used There are a lot of industrial applications apply this system Fine 8 Breaker such as breakers as you can see from figure 8 See 20 Chapter 3 Modeling and Simulation
51. ns file format must be selected during capturing data via the software Following graph of the CSV file has 2000 sample points also selected during capturing data and the plotted result is shown as figure AppV 1 61 9 99E 04 9 98E 04 9 97E 04 9 96E 04 9 95E 04 9 94E 04 9 93E 04 9 92E 04 9 91E 04 2 3 4 5 oo JH m m 1 00E 03 5 63E 02 5 94E 02 5 63E 02 5 94E 02 5 63E 02 5 94E 02 5 94E 02 6 25E 02 5 94E 02 5 94E 02 Figure AppV 2 The buttons under Run Control only simply send the commands to oscilloscope by following code fprintf PORT run fprintf PORT stop fprintf PORT single 62 Appendix VI GUI of Motor controller The main programming procedure of motor controller is described as below Following code indicate how the Hold up button works global PORT fprintf PORT SM 500 5000 Where the SM command is already described in the section 5 5 it moves 5000 steps in 500 ms Although the motor has 200 steps per revolution due to there is inertia existed we find that the 5000steps moving is almost moving one revolution And the 500ms is the fastest time that for moving one revolution Following code describe how the Beat button works global PORT fprintf PORT SM 500 5000 Where the command SM 500 5000 indicates moving hammer 5000 steps in 500 ms Doc Panel gt MOS Figure AppVI 1 Final Control Panel Figure A
52. ntdata handles hObject handle to Motor_Con_status see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint edit controls usually have a white background on Windows See ISPC and COMPUTER if ispc amp amp isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor white end function Motor up dowm Callback hObject eventdata handles hObject handle to Motor up dowm see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject String returns contents of Motor up dowm as text str2double get hObject String returns contents of Motor_up_dowm as a double Executes during object creation after setting all properties function Motor_up_dowm_CreateFcn hObject eventdata handles hObject handle to Motor_up_dowm see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint edit controls usually have a white background on Windows See ISPC and COMPUTER if ispc amp amp isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor white end function ONOFF Callback hObject eventdata handles hObject ha
53. owing command Set handles start_status String Remote Set handles start_status String Local Where start_status is the indicator identifier and string is the parameter that is changed and after that is the statement Remote or Local With this command almost every parameter can be changed like size or position For the Time DIV setting first we read the value of the slider with the following command Time get handles Time Value 59 Agilent 54622A OSCILLOSCOPE 100MHz Port com1 Connect Disconnect Connected Horizontal Autoscal View wave Run Control 0 01 0 02 0 03 50s 30us Time DIV Time position Single Single n Vertical Trigger 0 04 0 06 0 05V 0 002 Voltage DIV Vol position 0 0274 Vol 4 Level Auto Mode X 0 07 4 1 r Figure AppV 1 Final Front Panel Where Value is the value read from slider Then I enumerate each time division which can be set from oscilloscope with following command if Time 0 set handles Tim String Waitting elseif Time gt 1 amp amp Time lt 2 a 500 set handles Tim String 50s elseif Time gt 2 amp amp Time lt 3 a 200 set handles Tim String 20s elseif Time gt 3 amp amp Time lt 4 a 100 set handles Tim String 10s elseif Time gt 4 amp amp Time lt 5 a 50 set handles Tim String 5s elseif Time
54. ppVI1 shows the final complete controlling panel which we can directly control the motor also the hammer without any other procedures 63 64 Appendix VII Distance Lab Interface Programming Code Below is the m file used in the system GUI panel function varargout matlabTEST varargin MATLABTEST MATLAB code for matlabTEST fig MATLABTEST by itself creates a new MATLABTEST or raises the existing singleton H MATLABTEST returns the handle to anew MATLABTEST or the handle to the existing singleton MATLABTEST CALLBACK hObject eventData handles calls the local function named CALLBACK in MATLABTEST M with the given input arguments _MATLABTEST Property Value creates anew MATLABTEST or raises the existing singleton Starting from the left property value pairs are applied to the GUI before matlabTEST_OpeningFcn gets called An unrecognized property name or invalid value makes property application stop All inputs are passed to matlabTEST_OpeningFcn via varargin See GUI Options on GUIDE s Tools menu Choose GUI allows only one instance to run singleton See also GUIDE GUIDATA GUIHANDLES Edit the above text to modify the response to help matlabTEST Last Modified by GUIDE v2 5 09 May 2012 14 58 32 Begin initialization code DO NOT EDIT gui_Singleton 1 gui State struct gui_Name mfilename gui_Singleton gui Singleton
55. r of people that educate themselves after their working hours or as part of their professional development Furthermore universities and high schools already use the Internet extensively for communication with their students This combined with the recent developments with regards to the internet and information technology has seen the need for internet based teaching grow rapidly In engineering education of Universities most of experiments require instruments or some expensive equipment to be performed Some equipments are very sensitive with temperature and some of them are too heavy to move so the distance laboratories are used by Blekinge Institute of Technology The BTH provides one that convenient to control and with exactly same experience as traditional experiment As so far there are some examples like Vienna University s distance laboratories see 18 Kumamoto University s distance real laboratory system see 19 The BTH also provides traditional lab sessions in a remote laboratory for circuit analysis see 15 In our distance lab the local PC is connected with a motor and an oscilloscope and the oscilloscope is connected with a strain gauge sensor amplifier See 2 3 Users can use their PC control local PC over internet to active the motor and hammer to knock the iron bar and the sensor will generate signals that can be captured by the oscilloscope also can be seen by user PC 2 2 Pressure waves in Iron Bars When applyi
56. rd ra 5 Modeling and Simulation for pressure wave in an Iron bar sse 7 3 1 Modeling and simulation of system A A au qu E buius 7 3 2 ABC model of signal propa tl Onis us ieu O RA 7 3 3 Sensor and filter selection eiie pera ta 12 SHE SEISOL cat AEO cand Galea ak baat tte o eet tiie 13 2 22 AMPUFE NO 13 SIEDDEPIVIOPUE are ee en ANET 17 A EA rr OE A A ad da ea 18 4 2 Stepper motor operation prinemple a O AA 18 4 3 Unipolar steppet HiIOLDOE usa 19 44 BIPOLAR e duree 19 4 5 Drive uni polar stepper by bipolar driver 20 SIEPper motor Controller sa E 21 5 1 EiBotBoard EBB Overview erionenn a a a er a I EASE a R Eaa 21 9 2 HardWare connect li on sli 21 3 3 A REC 23 n dpda ng BEBOBEHRWAES era 23 s Used COMMING RR 23 526 Drive with motor as e ied dto de dad 25 5 7 Generate force with hammer and MOtoT ccccccnonononicoccnnnonononenicnocncncnnononananacncnccnononanininos 26 mo Graphical User Interiace Control ee 27 Oscilloscope s PC controller Annas el u 29 6 1 Introduction so e ee ORIN eS 29 62 MATLAB Overview ra 29 6 3 Graphical Interface Programming auae od say deaths Good ede bu ceded dae e a ta edo pad e vd 30 64 A ayetorm Data puto Narren 34 Connecting to the Instrument asa R a arial RES nn Ba 35 DDS Play or Wavetorm Dd SS A a 35 a e P RA SA 35 Measurement f Pressure wave A ie d AAAA 37 Jl Strain Gauge Amplifier inicia i I Ad
57. rogramming Started Programming Complete Verify Running Erase Program Veri Figure AppllI 2 Allow Configuration Word Programming Figure ApplIII 3 56 Appendix IV Test EBB board with Tera Term Pro In order to test Section 5 5 s command and if the board received the commands successfully we use Tera Term Pro a software that can send command to equipment via serial port to send those commands The procedure is going to be represented step by step Connect USB cable and you can see the USB LED is light Fig Applll 1 Figure AppIV 1 Cable connection Open software and choose serial port which you are using Press OK Figure AppIV 2 Port selection Send V command and we can see the return packet shown the board version and the firmware version Figure AppIV 3 FE Tera Ter File Edit Setup Control Window Help EBBv13 and above EB Firmware Version 2 1 5 Figure AppIV 3 Board Version Return 57 Send EM 3 command and we can see the return packet OK as Fig AppIV 4 File Edit Setup Control Window Help sense EB Firmware Yersion 2 1 5 Figure AppIV 4 EM Command Return u Send SM 1000 100 command we also can see that OK Note this doesn t mean that the motor must move but it means that this command is sent successful See Fig AppIV 5 File Edit Setup Control Window Help NS EB Firmware Version 2 1 5 OK Figure AppIV 5
58. rotation of a stepper motor At position 1 we can move the rotor clockwise the upper electromagnet is deactivated and the right electromagnet is activated causing the rotor to move 90 degrees clockwise aligning itself with the active magnet 18 This process is repeated in the same manner at the south and west electromagnets until we once again reach the starting position 4 3 Unipolar stepper motor The Unipolar stepper motor has 2 coils simple lengths of wound wires The coils are identical and are not electrical connected Each coil has a center tap which is the one wire coming out from the middle of coil length as figure 18 shown Since a center tap is added between the two leads uni directional current flow in each 12 of winding See figure 19 purple arrowhead Power 2 Power 1 ta 2b gt tb 2a Figure 18 Unipolar stepper motor s 2 coils Figure 19 Conceptual Model of Unipolar stepper Motor 4 4 Bipolar stepper motor The Bipolar stepper motor has 2 coils The coils are identical and not electrically connected It has a single winding per phase The current in a winding needs to be reversed in order to reverse a magnetic pole so the driving T X circuit is more complicated 1a0 ob Each lead is taken separately and Bi directional current flow 2a 0000 b through entire winding at a time See blue arrowhead in the Figure 21 Figure 20 Bipolar stepper motor s 2 coils 19 Figure 21 Conceptual Model o
59. s the Time DIV and Volt DIV parameters most optimal to the acquisitioned signal For setting the horizontal Time position and vertical Vol position of the signal sliders were used For setting the timebase Time DIV and the amplitude Vol DIV also sliders were used Since in the physical controlling oscilloscope the range of variation is not linear changing so we will use some ways to make the interface controlling as much same as physical controlling And the detail of this part is described in the Appendix VI In the oscilloscope there are two buttons named and Single in the Run Control sub window So we need implement all functional buttons in the graphical interface We created Run Stop and Single buttons inside the Run Control sub window of graphical interface For setting the trigger we need set the level of trigger and select modes There are two modes Auto mode and Normal mode and we create this selecting by adding a Pop up Menu in the graphical interface For writing the waveform from oscilloscope to PC the View wave button was used The waveform data we got from oscilloscope is captured by using a software which can return a good result with more sampling frequency And this software is introduced in section 6 5 The below table Table 3 lists the commands used in programing this interface and these commands can be obtained from the oscilloscope user manual of this oscilloscope series 31 Table 3 Used commands
60. scope interface sliders Push buttons pop up menus controls and edit text axes indicators were used In the figure 34 we can see we have a Connect button for connecting the computer to the oscilloscope This buttons sends the command which puts the equipment in remote mode During this time on the graphical interface the text indicator at right of Connect button will shows Connecting after finish connecting At the same time the Remote will also be shown on the screen of oscilloscope Depending the state of the oscilloscope remote or local the text indicator also can be shown as Disconnect when they are disconnected by clicking Disconnect button 30 EJ matlabTEST fig le Eile Edit View Layout Tools Help OcGu mnaoc Eba ae gt A fp Agilent 54622A OSCILLOSCOPE 100MHz st Push Button ze Slider Radio Button Horizontal p Run Control Check Box Time DIV Aok THU Static Text op up Menu 3 ICI pent E M F Toggle Button E Table r Vertical Trigger del Axes Voltage DIV Level Ta Panel 4 b 4 gt 5 Button Group X ActiveX Control V position gt Auto Mode X D Tag figurel Current Point 168 493 Position 520 305 1028 495 Figure 34 MATLAB Graphical User Interface The Auto scale button from the user interface has the same effect as the Auto scale button physically presented on the oscilloscope It set
61. t created until after all CreateFcns called 74 Hint edit controls usually have a white background on Windows See ISPC and COMPUTER if ispc amp amp isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor white end Executes on button press in Run function Run_Callback hObject eventdata handles hObject handle to Run see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA global PORT fprintf PORT run set handles Status String Run Executes on button press in Stop function Stop_Callback hObject eventdata handles hObject handle to Stop see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA global PORT fprintf PORT stop set handles Status String Stop Executes on button press in Single function Single_Callback hObject eventdata handles hObject handle to Single see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA global PORT fprintf PORT single set handles Status String Single function Status_Callback hObject eventdata handles hObject handle to Status see GCBO eventdata reserved to be defined in a future version of MATLAB
62. tdata handles hObject handle to slider9 see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject Value returns position of slider get hObject Min and get hObject Max to determine range of slider A get handles slider9 Value Y A 0 4 0 05 Yy num2str Y yy Yy V set handles Vol String yy 68 str num2str A k channell range y k str global PORT b serial com fopen b fprintf PORT y tclose b Executes during object creation after setting all properties function slider9_CreateFcn hObject eventdata handles hObject handle to slider9 see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint slider controls usually have a light gray background if isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor 9 9 9 end 9o Executes on slider movement function YPosition Callback hObject eventdata handles hObject handle to YPosition see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject Value returns position of slider get hObject Min and get hObject Max to determine range of slider Yt get hand
63. ter setting all properties function Y_P_CreateFcn hObject eventdata handles hObject handle to Y_P see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint edit controls usually have a white background on Windows See ISPC and COMPUTER if ispc amp amp isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor white end function Vol Callback hObject eventdata handles hObject handle to Vol see GCBO eventdata reserved to be defined in a future version of MATLAB handles structure with handles and user data see GUIDATA Hints get hObject String returns contents of Vol as text str2double get hObject String returns contents of Vol as a double Executes during object creation after setting all properties function Vol_CreateFcn hObject eventdata handles hObject handle to Vol see GCBO eventdata reserved to be defined in a future version of MATLAB handles empty handles not created until after all CreateFcns called Hint edit controls usually have a white background on Windows See ISPC and COMPUTER if ispc amp amp isequal get hObject BackgroundColor get 0 defaultUicontrolBackgroundColor set hObject BackgroundColor white end Executes on slider movement function slider9 Callback hObject even
64. to conducting academic research Distance Lab works with briefs from industry and governmental partners providing advice generating ideas and building prototypes that can lead to new products and services Laboratory exercises in electrical engineering courses can be performed remotely using real equipment A number of user defined experiments have been conducted over Internet at Blekinge Institute of Technology BTH Sweden The experiments have been carried out in different locations using the same experimental hardware located in a small closed laboratory at BTH 1 2 The Mechanical system Iron Bar The Iron bar that will be used in the experiment is about 0 6 meter long and has a diameter of about 0 05meter The material is steel The iron bar is part of the equipment used in Atlas Copco machines such as breakers as figure 2 2 2 shown In order to describe the iron bar system we derive a mathematical model of the mechanical system A mechanical system can be modeled by use of the variables force and velocity and by using of three parameters mass spring constant and dissipation Figure 1 Mechanical system Tron is elastic to some extent The elasticity is given by the material property Bulk modulus The elasticity is increasing with increasing length of the bar and is decreasing by increasing cross section area of the bar A spring constant in the axial direction of a bar can be calculated The mass for a bar also can be calculated
65. ve same name same range and same function as those presented on the oscilloscope Before controlling with PC we must set the XON handshaking inside the I O setting in order to match the PC setting 6 2 MATLAB Overview The proposal is to make a simply to control but efficient driver for the oscilloscope via RS232 interface The programming software used is MATLAB This software implemented higher programming language is very simple and powerful It also has graphical interface which will be used for our oscilloscope driver programming The disadvantage of MATLAB is that it only has Windows style controlling By other words if need changing voltage from MATLAB have to apply slider instead of real rotary button The advantage of MATLAB is that any change on the graphical interface will immediately directly generate related MATLAB m code file 29 6 3 Graphical Interface Programming A gt Agilent 546220 Mesa Z 100 MHz FEE 010 un Run Control mum MIXED SIGNAL OSCILLOSCOPE m At C Soco H w ase eso Channel WAM LETT a A X D15 D0 1 2 Use recommended cable only Figure 33 Agilent 54622 Oscilloscope MATLAB graphical interface can be accessed when the guide command is typed at the command prompter This command will open a window like the one in figure 34 Here the user can drag and drop buttons sliders and other windows style controls and indicators needed In the oscillo
66. ween each two peek is 250us 0 25 x 1073s The right hand figure 6 simulation result shows the original pressure wave We also can see that the time delay between each two peeks is around 0 25 x 1073s This time delay is the time that press wave takes to travel around the iron bar So the velocity can be calculated by the length of iron bar and half time delay see formula 1 2 Where d is length of the iron bar 0 6m and the T is half time delay Comparing with the theoretical velocity 5000 m s as calculated by formula 3 13 in section 3 3 1 we can say that we have a deviation that can be accepted d 0 6m V 5 1 4800m s 1 2 z X 0 25 x 1073s In this report there are seven chapter included The chapter 2 introduces some background of distance lab and pressure wave in iron bars The chapter 3 introduces how to model the pressure wave and some description of sensor and filter selection The chapter 4 introduces the hardware stepper motor and chapter 5 introduces the hardware stepper motor controller also the PC controlling interface of the stepper motor controller The chapter 6 describes the PC controlling interface of the oscilloscope used in this project The chapter 7 describes the measure of pressure wave also describe some hardware connection of the strain gauge sensor with related amplifier Chapter 2 Background 2 1 Distance Lab Distance learning has been promoted across the entire education sector due to the increasing numbe
67. with certain high until the ball hit the end of iron bar After several testing we find the pressure wave can be performed very well when the iron ball free fall from iron bar with 15cm high In this case the torque is calculated by formula 4 1 t mgh 0 3kg 0 98N kg 15cm 4 41Ncm 4 1 Where the m is the weight of iron ball g is acceleration of gravity and h is the height from iron bar So the 4 41Ncm torque is enough We choose this unipolar stepper motor which has 90N cm holding torque Stepper motor s advantages are very easy to control the speed rotated direction and determine the shaft position ae E b Figure 15 Stepper Motor Figure 16 Hammer system 17 4 1 Types of stepper motor Stepper Motors family be made up of a variety of sizes and strengths The basic types of stepper motor are Bipolar and Unipolar The bipolar stepper usually has 4 wires The unipolar stepper usually has 5 6 or 8 wires This chapter is going to discuss how unipolar stepper works and how to differ with bipolar stepper 4 2 Stepper motor operation principle Stepper motor consist of a permanent magnet rotating shaft normally called the rotor and electromagnets on the stationary position that surrounds the motor called the stator on 4 4s of ef we em En p m 4 3 eh 5 3 N err v CTI 2 2 BE E i s p r 2 Figure 17 Stepper motor working principle Figure 17 illustrates one complete

Download Pdf Manuals

image

Related Search

Related Contents

G-Power Install_SPANISH2.qxd    Fiche inscription ( PDF - 93.6 ko) - Ville de Saint-Jean  重要 - 東都フォルダー工業  Approx appUA100RCP  Alan 78 Plus Multi manual  Gigabyte GZ-X9  Procesador de sonido Nucleus® CP810 y mando a distancia  Nokia 1280 User Guide  OPEratING INStructIONS For Flow Meters of the Product Series ”rS“  

Copyright © All rights reserved.
Failed to retrieve file