seesaw report gmit 2011 (physics and instrumentation course)

Upload: kaineuhaus

Post on 06-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    1/55

    A system balancing a sphere on a seesaw

    James Murphy, Kai Neuhaus, Song Yan

    GMITGalway Mayo Institute of Technology

    Modul: Physics & Instrumentation: Intstrumentation Design Laboratory

    Technical Project 3.1

    Modul Leader: John Cunningham, Gareth Roe

    March 8, 2011

    Abstract

    A team project to construct and build an controlled system. A seesaw system wasselected as an controlled system with different sensor arrangements for feedbacksignals. The seesaw system can balance a sphere on its lever by adjusting theinclination driven by a stepper motor and according to the sensor signals. Differentsensor arrangements were prepared including an sensor less approach to compare

    with. The stepper motor and sensors were interfaced with intermediate electronicscircuits and the DAQmx interface from National Instruments [4]. Subsequentlythe signal processing and stepper motor logic was implemented with labview fromNational Instruments. The seesaw system finally can demonstrate its properties asan feedback system compared to the open loop system without sensors. The systemcan stabilize the sphere on the lever by continuously changing the inclination fromone side to the other and the use of one or two sensors. In open loop mode withoutsensors the sphere cannot be kept on the lever and falls down.

    http://www.youtube.com/playlist?list=PLCA00BC1089C52DA1

    1

    http://www.youtube.com/playlist?list=PLCA00BC1089C52DA1http://www.youtube.com/playlist?list=PLCA00BC1089C52DA1
  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    2/55

    CONTENTS CONTENTS

    Contents

    1 Introduction 4

    2 Investigative and Developmental Work 52.1 Selection of System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Mechanical Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.3 Motor Specs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.4 Stepper Motor Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.5 Sensor Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.6 Sensor Specs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.7 Labview Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    2.7.1 Stepper Motor Process . . . . . . . . . . . . . . . . . . . . . . . . 112.7.2 Oscillation Process . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    2.7.3 Single Sensor Process . . . . . . . . . . . . . . . . . . . . . . . . . 142.7.4 Double Sensor Process . . . . . . . . . . . . . . . . . . . . . . . . 15

    2.8 System Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.8.1 Estimation of speed of sphere with one sensor . . . . . . . . . . . 162.8.2 Angle of Inclination to stop sphere . . . . . . . . . . . . . . . . . 172.8.3 Step Size of angle of Seesaw . . . . . . . . . . . . . . . . . . . . . 182.8.4 Estimating Forces acting on motors axis . . . . . . . . . . . . . . 192.8.5 Analysis of the Control System . . . . . . . . . . . . . . . . . . . 20

    3 Final System 24

    3.1 LabView Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243.2 Overall Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    4 Test and Calibration of LabView Processes 26

    5 Conclusion 27

    6 List of Equipment and Components 28

    7 References 29

    A Labview Diagrams 30

    A.1 Double-Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31A.2 Single-Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39A.3 Oscillation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42A.4 Motor-Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47A.5 Inc-Dec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53A.6 Bin2Nr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    Project: Seesaw System as a controlled system (February 26, 2012) 2/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    3/55

    LIST OF FIGURES LIST OF FIGURES

    List of Figures

    1 Overall connection schematic of the phases of the stepper motor to driverand DAQmx. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    2 Detail schematic for one output channel of the driver showing the opencollector output and the protection diode. . . . . . . . . . . . . . . . . . 8

    3 Overall connection schematic of the sensor interface board and DAQmx. 94 Detail schematic for one sensor input. The relay separates the 20V sensor

    voltage from the DAQmx. . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Block Diagram of the motor interface in labview . . . . . . . . . . . . . . 116 Detail Figure 5 Sequence tables . . . . . . . . . . . . . . . . . . . . . . . 127 Detail Figure 5 Incrementor / Decrementor . . . . . . . . . . . . . . . . . 128 Block Diagram: Incrementor / Decrementor . . . . . . . . . . . . . . . . 129 Block Diagram: Oscillation Process . . . . . . . . . . . . . . . . . . . . . 13

    10 Block Diagram: Single Sensor Process . . . . . . . . . . . . . . . . . . . . 1411 Block Diagram: Time Loop in Sensor Loop . . . . . . . . . . . . . . . . . 1512 Block Diagram: Delay with dt sensor 2 . . . . . . . . . . . . . . . . . . 1513 Using the sensors field of sensing (operating range 0.008m) to estimate

    the speed of a sphere. The diameter for one sphere was measured with0.019m. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    14 Rail with two sensors. L is the length of one site of the rail and D thedistance of a sensor from the pivot point. . . . . . . . . . . . . . . . . . . 17

    15 Compared to Figure 14 a geometrical representation of the rail inclined byan angle of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    16 Relation of forces caused by the sphere over the rail and gear system actingon the motor axis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    17 Block diagram showing components and values of the feedback system inthe two sensor system of the seesaw. . . . . . . . . . . . . . . . . . . . . 22

    Project: Seesaw System as a controlled system (February 26, 2012) 3/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    4/55

    1 INTRODUCTION

    1 Introduction

    Author: all

    The goal of this project was to construct and build a controlled system with feedback ina team effort during a defined period of time (9 weeks and anticipated 6 hours a week).The team was assembled of three members - the authors of this report.

    The first step of the project comprised the selection of a suitable system to be constructed.The system was supposed to exploit features of an controlled system with feedback thatis interfaced with labview from National Instruments.

    A seesaw system was selected, as it appeared to provide all the features demanded.

    Further more, such a system promised to provide a wider variety of different modes as ancontrolled system. On the other hand does the seesaw provide a different and abstractapproach that may offer a deeper look inside a controlled system compared to othersystems.

    It was easy to conceive, that already with a different arrangement and amount of prox-imity switches, a variety of different experiments may be created.

    The choice of an stepper motor to control the inclination of the lever appeared to besuitable, though speed considerations and the holding force of the motor turned out to

    be critical.

    Using proximity switches was restricted due to availability but neverless an interestingand finally a bit chellanging choice.

    The construction of the system demanded the sharing of different tasks between themembers, i.e. research and planning of system components, dimensioning and construct-ing interface electronics, computer processing with labview, test and calibration as wellanalysis of the system and the documentation.

    Project: Seesaw System as a controlled system (February 26, 2012) 4/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    5/55

    2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    2 Investigative and Developmental Work

    Author: all

    2.1 Selection of System

    The seesaw system was selected as it promised to supply a rich set of different properties toobserve within an controlled system. Basically the seesaw system exposes the controlledsystem that is usually covered below the real world. Further more the seesaw also providesan immediate visual feedback about the performance.

    A stepper motor was chosen as it appeared to provide all required properties to applysmall changes of angular movements and a certain force to lock to a certain angularposition.

    Further consideration revealed it could be of advantage that the holding torque can beincreased dramatically by using a snail worm gear. However, it turned out that this wouldhave reduced the rotational speed by a factor of 56 (the amount of teeth of the drivengear), meaning with a maximum motor speed of 130 steps per seconds. Taking also theangular change in account that would be 7.5

    56= 0.13 we would obtain an angular speed

    of 0.13s1. Therefore, turning the lever about one degree would have needed about

    8 seconds and that appeared much to slow to react appropriately to the much quickermoving sphere on the lever.

    The choice of proximity switches was dictated much more by availability. At the timeof choice, however, it was not known what exact effect single switches would have onthe performance of the system. It appeared conceivable that different systems might bearranged with up to four sensors, the maximum amount of sensor available.

    To control the system the use of labview from National Instrument was requested. There-fore, no other considerations where added at the beginning.

    To interface the stepper motor with the DAQmx [4] module from National Instruments adedicated driver chip ULN2803A was used as it was available together with the steppermotor.

    Finally a sensor interface was needed to transform the sensor output voltage from 20Vto the input level range of the DAQmx of 5V.

    Project: Seesaw System as a controlled system (February 26, 2012) 5/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    6/55

    2.2 Mechanical Setup 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    2.2 Mechanical Setup

    Author: James We use wood for the base and walls of the set up as it is easy to carve

    into shape , to assemble together and to make alterations and adjustments to. We usedbolts and nuts to hold the main axis rod in position.

    We first used the snail gear for its smooth rotation and high translation purposes. How-ever the motor was not able to supply the speed in turning required to turn the gear fastenough to control the system. There was an initial problem with connecting the motorto the gear system as it had a diff rod dimension. this was easily solved but a change inmotor.

    There had to be made a change to the assembly of the body to account for the change

    in gear system from the snail gear to the normal tooth gear. the main axis rod also hadto be re-enforced so that the teeth would not slip or jump out.

    2.3 Motor Specs

    Author: Kai

    A selection of the stepper motor specifications found in [9].

    numeric value unitspower consumption 5.3 Wmaximum pull in rate 130 s1

    maximum working torque 57 mNmmaximum holding torque 85 mNmresistance per phase 47 current per phase 240 mAstep angle 7.5 20

    steps per revolution 48direction of rotation reversible

    Table 1: significant stepper motor specifications (Type 2) [9]

    The specification [9] also state that the torque speed characteristics can be improved byadding a suitable resistor ( 6) in series with each commons and increase the voltageaccordingly.

    This option was not followed up due to time constraints of the project.

    Project: Seesaw System as a controlled system (February 26, 2012) 6/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    7/55

    2.4 Stepper Motor Interface 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    2.4 Stepper Motor Interface

    Author: Kai, Yan

    Interfacing of the stepper motor was based on the practical instruction [8] of an courseat the GMIT in Physics & Instrumentation. According to the handout [8] a driverchip ULN2803A [7] was suggested to connect up directly with the stepper motor phases(see Figure 1).

    The commons of the stepper motor are connected to the positive terminal of a powersupply with 12V. The ground connection is supplied through the driver chip.

    It may be worth to mention, that the driver chip is an array of transistors switched inopen collector configuration Figure 2. This explains the somewhat special place where

    the ground must be connected and that the commons of the stepper motor must beconnected to +12V.

    3

    2

    4

    1

    CONN1

    3

    2

    4

    1

    CONN4

    3

    2

    4

    1

    CONN2

    3

    2

    4

    1

    CONN3

    ULN2803A

    1I1

    2I2

    3I3

    4I4

    5I5

    6I6

    7I7

    8

    I8

    9

    Vee

    10

    +Vs

    11

    O8

    12O7

    13O6

    14O5

    15O4

    16O3

    17O2

    18O1

    L1

    L2

    L3

    L4

    VccVcc12V

    stepper motor coils pcb

    DAQmx

    P0.0

    P0.1

    P0.2

    P0.3

    Power Supply

    12V 600mA

    Figure 1: Overall connection schematic of the phases of the stepper motor to driver andDAQmx.

    Project: Seesaw System as a controlled system (February 26, 2012) 7/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    8/55

    2.4 Stepper Motor Interface 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    B

    C

    E

    Q1

    B

    C

    E

    Q2

    R2 R3

    D1

    R1

    COM

    OUT

    IN

    Figure 2: Detail schematic for one output channel of the driver showing the open collectoroutput and the protection diode.

    Project: Seesaw System as a controlled system (February 26, 2012) 8/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    9/55

    2.5 Sensor Interface 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    2.5 Sensor Interface

    Author: Kai

    The sensor interface is needed to adabt the output voltage of about 20V provided bythe sensors to the input voltage requirements of the DAQmx [4] to about 5V. Furthermore was the sensor interface supposed to work as input protection towards the DAQmx.Therefore, it occured best to use relaysciterelay, as these provide a nearly perfect seper-ation of voltage and current.

    The minimal set/reset time for the relays is stated with 15ms and appeared sufficientfor their anticipated use. The relays work with 12V activation voltage, this required anadditional resistor in series with the coil of 270 in accordance with the coil resistanceof 720 - those can be found in Figure 3 for the resistors R1, R2, R4, R6.

    The switch site of the relay is depicted in Figure 4 and is taken from the user manualeof the DAQmx [4]. Therefore, if the switch of the relay is open then a level of 5V issupplied over an 100k to one port and provides a level of high. If the switch is closedthe resistor is connected to ground on the DAQmx and rendering a voltage of 0V on theinput port.

    RELAY

    NO

    U4

    RELAY

    NO

    U1

    RELAY

    NO

    U3

    RELAY

    NO

    U2

    3

    2

    4

    1

    CONN1

    3

    2

    4

    1

    CONN1

    3

    2

    4

    1

    CONN1

    3

    2

    4

    1

    CONN1

    3

    2

    4

    1

    CONN1

    3

    2

    4

    1

    CONN1

    3

    2

    4

    1

    CONN1

    R2

    R1

    R4

    R6

    R3 R5

    R7 R8

    DAQmx

    P1.0

    P1.1

    P1.2

    P1.3

    Vcc

    +5V

    Vcc

    Vcc

    20V

    Power Supply

    20V 100mA

    sensor interface

    Figure 3: Overall connection schematic of the sensor interface board and DAQmx.

    Project: Seesaw System as a controlled system (February 26, 2012) 9/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    10/55

    2.6 Sensor Specs 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    Vcc

    +5V

    DAQmx

    P1.0

    P1.1

    P1.2

    P1.3

    RELAY

    NO

    U1

    R1Sensor IN

    20V

    Figure 4: Detail schematic for one sensor input. The relay separates the 20V sensorvoltage from the DAQmx.

    2.6 Sensor Specs

    Author: Kai

    A selection of specifications of the proximity sensors found in [1].

    The name used in the spec sheet is Cylindrical Inductive Proximity Sensor type TL-X.

    Special type used NPN NO TL-X 10 ME1.

    No special attention payed to the mounting type, as typical lab stands where used forputting sensors in place.

    Differential travel 1

    DC solid state TypeNPN-NO open collectorwith current source

    Max. on-state voltage drop 2VDCResponse frequency 200HzCircuit protection Output short circuit provided; automtic resetting type

    Table 2: significant sensor specifications for the used proximity sensors [1]

    1

    Naming as used in spec sheet

    Project: Seesaw System as a controlled system (February 26, 2012) 10/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    11/55

    2.7 Labview Processes 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    2.7 Labview Processes

    Author: Kai2

    2.7.1 Stepper Motor Process

    The stepper motor process was designed under the consideration that it should containa bare minimum of functions enabling just the basics of the stepper motor functions( Figure 5). Some analysis revealed that the last index the stepper motor has locked itsposition on has to be stored and has to be reused for the next step to insure a smoothforward/reverse behavior.

    Later on all other functions concerning the system were added by enclosing the steppermotor in further sub vis.

    Increment / Decrement

    sequence index

    Half / Full Step

    Full Step Sequence

    Index Array

    Decimal String To Number

    Control Displayobserving the presentactive coils

    Control Displayobserving thedecimal value ofbinary pattern

    Half Step Sequence

    output formatprev index

    prev index

    angle

    anglepresent angle

    present index

    Figure 5: Block Diagram of the motor interface in labview

    The main feature in the stepper motor vi is probably the sequence table to energize thecoils for full and half steps Figure 6. Depending on a Boolean input a table was selectedenabling it to easily switch between full and half step mode.

    The second most important part within the motor interface is most like the incremen-tor/decrementor (IncDec) ( Figure 7 and Figure 8).

    The incrementor/decrementor (IncDec) ( Figure 7, Figure 8) becomes aware of thehalf/full-step mode by a Boolean value and therefore is able to select the right maximumindex regarding the sequence table. The IncDec is also as its name suggests incrementingor decrementing the values for the index depending on another Boolean value determiningthe forward and revers action.

    2Regarding sources used for the labview process design, only the help documents included with labview

    were used.

    Project: Seesaw System as a controlled system (February 26, 2012) 11/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    12/55

    2.7 Labview Processes 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    Full Step Sequence

    Half Step Sequence

    Figure 6: Detail Figure 5 Sequence tables

    Increment / Decrementsequence index

    prev index

    angle

    Figure 7: Detail Figure 5 Incrementor / Decrementor

    Full = T

    Half = F

    previous index

    Dec == TrueInc == False

    present index

    uInt8 min_i=0;

    uInt8 max_i=0;float angle=0.0;

    if (HF>0) {max_i=3;

    angle=7.5;}else{max_i=7;

    angle=3.75;}

    if (DEC > 0){new_index = prev_index-1;new_angle = prev_angle - angle;}

    else{new_index = prev_index+1;new_angle = prev_angle + angle;}

    if (new_index > max_i) new_index = min_i;

    if (new_index < min_i) new_index = max_i;

    new_angleprev_angle

    new_index

    DEC

    prev_index

    HF

    previous angle present angle

    Figure 8: Block Diagram: Incrementor / Decrementor

    A further value to increment and decrement the angle was added for visual feedback howthe value changes depending on which mode the motor is working with. The angle valuedid not represent any motor angle and would need to be initialized for a certain positioneach time.

    The IncDec Figure 8 was implemented totally in a formula node as previous attempts of

    Project: Seesaw System as a controlled system (February 26, 2012) 12/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    13/55

    2.7 Labview Processes 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    implementation with graphical symbols obliterated the diagram with wires. Separatingthe IncDec vi in further vis may have provided another solution to obtain readable blockdiagrams but the formula node did provide a straight forward solution too.

    2.7.2 Oscillation Process

    The oscillation process was the simplest process and also a test case during the processdesign Figure 9. It represents, however, the core of the process loop for all furtherprocesses taking sensors into account described later on.

    stop

    motor-interface-0-7-1.vi

    angle

    step delay/ms

    angle

    coil index

    forward

    step count

    0 [0..3]

    False

    react only if button or sensor reading

    Half / Full Step

    Ajdust/Run

    Processing Loop

    Figure 9: Block Diagram: Oscillation Process

    The stacked sequence in Figure 9 can be seen in detail in subsection A.3 and is not offurther relevance to understand the design principles here. The sequence basically occurs

    here once more and each sequence is separated by a delay time. The delay time can beadjusted in the front panel.

    The basic functional part to be explained may be that each sequence changes the Booleanforward (as seen in Figure 9) from true to false reverse and so on. The processingloop will repeat this process until the stop button is pressed. Basically this causes themotor to forward and reverse by the amount of defined steps (see blue variable stepcount) within the loop swinging the lever from left to the right and back.

    There is one case structure that is of minor interest, except it is supposed to call the

    motor interface always and only once per button press for adjusting the initial angularposition of the lever.

    Project: Seesaw System as a controlled system (February 26, 2012) 13/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    14/55

    2.7 Labview Processes 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    2.7.3 Single Sensor Process

    The single sensor process ( Figure 10) is an extension of the sensor-less oscillation process.

    The extension in particular, as it can be seen in Figure 10, is the use of an occurrenceconnector of the sensor loop and the main processing loop.

    Wait on Occurrence

    0 [0..5]

    False

    react only if button or sensor reading

    Half / Full Step

    RIGHT

    LEFT

    Ajdust/Run

    Main Process Loop

    Sensor True step delay/ms anglecoil index

    step count

    LEFT RIGHT

    delay forward delay reverse

    single step buttons foradjusting the lever

    Enabled

    Figure 10: Block Diagram: Single Sensor Process

    The stacked sequence is basically the same than in the oscillation process but now iswaiting each time on an occurrence before switching to the next forward or reverse step(see subsection A.2). The delay times are also present here to be able to delay the changeof the inclination according to an improved reaction behavior.

    The second smaller loop below the main processing loop is the sensor loop. This loopis polling the sensor and according to a signal it switches a case structure causing anoccurrence to be raised.

    Project: Seesaw System as a controlled system (February 26, 2012) 14/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    15/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    16/55

    2.8 System Analysis 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    2.8 System Analysis

    2.8.1 Estimation of speed of sphere with one sensor

    Author: Yan

    Editor: Kai

    The speed of a sphere can be estimated considering the size of the field of the sensor andthe diameter of the sphere is known as in Figure 13. In particular for a sphere with adiameter of 19mm and an estimated field size of the sensor with 8mm the speed wouldbe v = 8mm+19mm

    t= 27mm

    t; where t is the time the sphere needs to pass through the

    field of the sensor.

    Figure 13: Using the sensors field of sensing (operating range 0.008m) to estimate thespeed of a sphere. The diameter for one sphere was measured with 0.019m.

    Project: Seesaw System as a controlled system (February 26, 2012) 16/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    17/55

    2.8 System Analysis 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    2.8.2 Angle of Inclination to stop sphere

    Author: Yan3 4

    It is possible to estimate at what angle of inclination the sphere might be brought to rest.Considering Figure 14 and Figure 15 the subsequent relationship in Equation 1 may beapplied to obtain the angle to stop the sphere at a position L (the end of the rail):

    Figure 14: Rail with two sensors. L is the length of one site of the rail and D the distanceof a sensor from the pivot point.

    Figure 15: Compared to Figure 14 a geometrical representation of the rail inclined by anangle of .

    3Addition from the author: Rotational energy = mgh = mgsin()4Used reference Yuanyuan Luo[6]

    Project: Seesaw System as a controlled system (February 26, 2012) 17/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    18/55

    2.8 System Analysis 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    1

    2v2 + mg sin() D = M g sin() (LD) (1)

    sin() =v2

    2g(L 2D) (2)

    = arcSin() (3)

    For instance, inclination of 1. Gravity can be resolved into two forces. One is parallel tothe bridge and the other is perpendicular to the bridge. We only need to pay attentionto the first one.

    F1 = mgsin(1) (4)

    and we know F = ma so a = Fm

    , a = mgsin(1), m = gsin(1).

    a =v0 v1

    t(5)

    With v0 is velocity of sphere and v1 is zero.

    Then t = v0a

    is the time to decelerate the sphere down to zero.

    This time * 2 is the time the sphere needs to return to the sensor after passing it. Thistime can be used to estimate the delay time to hold the inclination of the rail in labview.

    2.8.3 Step Size of angle of Seesaw

    Author: Yan

    In the projects system a small gear with 19 teeth and large gear with 56 teeth was usedto transfer the rotational motion from the stepper motor onto the rail of the seesaw. Thestepper motor was specified with step sizes for full step as 7 .5 and for half step as 3.75.

    For a step size of 7.5 the angles step size of the lever may occur as

    7.5 19

    56= 2.5

    Project: Seesaw System as a controlled system (February 26, 2012) 18/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    19/55

    2.8 System Analysis 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    and for half step mode with 3.75

    3.75 19

    56= 1.3

    .

    2.8.4 Estimating Forces acting on motors axis

    Author: Yan

    Editor: Kai

    Figure 16: Relation of forces caused by the sphere over the rail and gear system actingon the motor axis.

    Considering the arm length of the lever from the pivot point (see Figure 16) and assumingthe sphere resting at the very end of it, this would cause a kind of a maximum force. Ifwe further assume the lever is leveled, then the force is acting in a rectangular mannerdownwards regarding to the lever.

    F = mg (6)

    = F L (7)

    As the force acting caused by the mass of the sphere is rectangular to the lever the crossproduct to obtain the torque simplifies to a straight multiplication:

    = mg L (8)

    The velocity ratio of a gear system as described in [2] would be

    VR = small gearbig gear

    = 1956

    = 0.34 (9)

    Project: Seesaw System as a controlled system (February 26, 2012) 19/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    20/55

    2.8 System Analysis 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    It appears plausible that then the advantage can be obtained as 1V R

    reducing the forcecaused by the weight of the sphere.

    advantage =big gear

    smallgear=

    56

    19= 2.95 (10)

    If we neglect any friction in the gear system this would result in a force acting on theaxis of the stepper motor by calculating it as follow:

    axis motor =axis lever

    advantage(11)

    axis motor =mg L

    advantage(12)

    axis motor =0.026kg 9.81ms2 0.32m

    2.95=

    0.082Nm

    2.95= 0.028Nm = 28mNm (13)

    The stepper motor specification subsection 2.3 and [9] state a maximum working torque

    of 57mNm. This would suggest the system is working well in its specifications. Butthis does not account for any friction yet. Even no particular measurements had beendone to determine the frictional forces of the gear system, an estimation suggest that theforce is certainly more than 20mNm, that is to add to the force the motor has to bringup. Further more can the specification sheet [9] mentions even a reduction of torquedepending on the resting angle the axis is kept in place by the magnetic forces of thephases. Observation of the running system strongly suggest, that the motor workingtorque is exceeded at some points if the sphere reaches more than two third on one sideof the rail towards the end. At this locations of the sphere the motor was not able tochange the inclination at all or worse the motor released the rail completely.

    2.8.5 Analysis of the Control System

    Author: Kai

    At this stage only an attempt was made to find the overall structure of the whole feedbacksystem. It turned out that for each different mode (sensor less, single sensor, doublesensor) a different feedback system has to be found. Further more it is not trivial toidentify the input value and the type of it, say step input or some other more complicatedshape. Time constraints did not allow to do a in depth analysis or even a simulation.

    Project: Seesaw System as a controlled system (February 26, 2012) 20/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    21/55

    2.8 System Analysis 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    Certainly can we assume that the equation of motion in the system apply to some degreeaccording to Giancoli [3](14-21) without defining the shape of the input force Fi(t) yet:

    mx + bx + kx = Fi(t) (14)

    We may define m for the mass of the sphere, b is some coefficient of damping and k is aconstant that certainly contains g as the earths acceleration due to gravity.

    Sensor-less The sensor less system may be a typical open loop system. However,the resulting oscillation is certainly to be modeled as a forced oscillation caused by thecontinuous change of the inclination of the rail of the seesaw.

    Intuitively we might expect that such a system may be possible to get in a stable oscil-lation. That would be the case if the damping of the system matches the input force insome way. The damping component in this sensor less system is certainly the frictionalforce of the sphere acting on the rail.

    To get such a system to work it would be needed to adjust the inclination of the rail insteps small enough to achieve equivalent values to the frictional force. But as determinedin subsubsection 2.8.3 the smallest stepsize to be possible to achieve would be 1 .3. Thisturned out to be much to coarse to achieve anything close to a stable system.

    The coarse step size also rises the question about the shape of the input force. Consideringa continuously changing of the angle of inclination it might follow a sinusoidal shape. Butthis changes more and more towards a square wave if the inclination is changed as quicklyas possible from one to the other side. Maybe it is possible to account for such a forceby applying a sinusoidal force with very big amplitude and cut off at a upper and lowerlimit.

    Single Sensor The single sensor system was surprisingly much easier to tune consid-ering the sphere is only moving on one side between the end and the pivot point. This

    appears to be plausible considering the change of inclination of the rail that is causedby the weigh of the sphere. If the sphere would cross the pivot point it would introducean additional value that is not processed by the system and rendering the whole systemunstable. We could try to compensate for such a deviation but the systems design didnot allow to achieve this without a major redesign (see subsubsection 2.8.3).

    Also this system appears to be modeled as a forced oscillation and a input more or lessshaped as a square wave.

    However, the major difference compared to the sensor less system appears to be that the

    inclination of the rail now acts in two ways. Once it is acting as an input force and then itis acting as an opposing force to slow the sphere down. This suggests that we can produce

    Project: Seesaw System as a controlled system (February 26, 2012) 21/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    22/55

    2.8 System Analysis 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    a damping force that matches much better the input force. And it appears conceivablethat we are well able to achieve inclinations to one side equally close matching to theother side, even with the system coarse step size.

    Double Sensor without speed feedback The double sensor system was apparentlynot working, if the sensors only triggered the inclination to an predefined angle each timethe sphere passes the sensor on its side. The best case in this arrangement occurred ifthe sphere stabilized on one side and oscillated around one sensor alone.

    Double Sensor with speed feedback The double sensor system with a crude speedfeedback enabled a stable system to some degree. However, it did prove the advantage

    of an feedback system.

    In Figure 17 a very basic model shows a very simplified idea of the system as it wasimplemented. It is perceivable that we have to assure that the velocity of the sphere (dt)does not exceed some value as it otherwise would travel to far along the rail and fallsdown.

    stepper

    motor

    1

    labview

    1

    delay

    beforehange of angle

    1

    acceleration

    of sphere

    1

    Gain

    1

    dt

    delay

    error angle

    Figure 17: Block diagram showing components and values of the feedback system in thetwo sensor system of the seesaw.

    We dont consider here the extreme case to erect the rail with an angle of 90 to stop thesphere immediately. It would also not be possible to turn the rail in short enough timeto neglect the movement of the sphere anyway in such a case.

    The system in Figure 17 shows the principle setup of the system. The block diagramexposes the difficulties caused by the coarse step size. The angle of inclination wasactually pre-adjusted and did not change during oscillation, as any change of it wouldhave set up the system too much than it could have dealt with. Therefore the angleof inclination does not appear within the model here, yet it may appear as a possible

    constant gain during further analysis and modeling of the system.

    Project: Seesaw System as a controlled system (February 26, 2012) 22/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    23/55

    2.8 System Analysis 2 INVESTIGATIVE AND DEVELOPMENTAL WORK

    Instead of using the angle as a variable it was decided to use the time delay before therail is changed back to the new angle. Because it is perceivable, assuming an infinite longrail that the sphere must return at some point.

    The length of the rail therefore restricted the system by the speed a sphere is allowed tobe introduced into the system.

    Even though, two sensors were used, it was not yet implemented to determine the changeof speed. This even more, restricted the system such that, the time delay must carefully betuned. The time delay needs to be in a range such that the frictional force is compensatedbut does not exceed acceleration of the sphere constrained by the distance it is allowedto travel during a slow down on the other end of the rail.

    Project: Seesaw System as a controlled system (February 26, 2012) 23/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    24/55

    3 FINAL SYSTEM

    3 Final System

    3.1 LabView Performance

    Author: Kai

    The processing system designed in labview did show significant delays if many loopswhere arranged. The exact delays where not further investigated but it should be noted,that such delays will have a significant effect on anything that needs to be recorded inreal time.

    The use of occurrences was the only acceptable way to incorporated multiple independent

    sensors. However, it should be noted, that occurrences are no low level events and dontprovide any real time support.

    Though, the system suffers certainly from significant delays, it appears that these delaysare possible to compensate by appropriate tuning.

    3.2 Overall Performance

    Author: KaiThe overall performance was better than expected considering all detrimental factorsoccurring during the project development.

    The probably biggest uncertainty was introduced by the stepper motor and its workingand holding torque. Depending where the sphere was located on the lever it introducedsignificant deviations of the levers inclination and subsequently major changes in theacceleration of the sphere during movement.

    The use of single point sensors introduced another unexpected effect regarding the ability

    to control the movement of the sphere. It might be easy to conceive that we only haveto turn the lever if we detect the sphere on one end. However, depending on the speedof the sphere going in one direction the sphere comes to rest in the best case and usuallybecomes accelerated causing it to drop from the lever after only two or three oscillations,rendering the system unstable. Most interestingly this was not the case for a single sensorarrangement.

    Final tests proved that the feedback system was contributing to the stability of thesystem.

    The first test without any sensor and applying a swinging lever with a frequency of about5Hz or even a bit more, showed it was impossible to balance the sphere with such an

    Project: Seesaw System as a controlled system (February 26, 2012) 24/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    25/55

    3.2 Overall Performance 3 FINAL SYSTEM

    arrangement without feedback sensor. It was clearly to see that the sphere was travelingstraight to the one or other side of the lever as soon as it crossed the pivot point. This wascaused by the deviation due to the weight of the sphere and the inability to rigidly hold

    the inclination by the stepper motor (see subsubsection 2.8.4). To try to apply higherinclination angles in fact caused to exceed the working torque of the motor many timesand causing the motor to drop steps - the system failed totally.

    The second test was done with two sensors but no speed control yet. The system withtwo sensors turned out to be unstable too. It stabilized sometimes if the sphere remainedon one side causing to switch only with one sensor. This behavior was pointing toan interesting effect, that a single sensor system without speed feedback might be onesolution towards one stable arrangement.

    In fact a setup with an asymmetric sensor arrangement proved that it is enabling a stableoscillation of the sphere. But it was surprising, that it is not working if the sensor is placedat or close to the pivot point of the lever.

    The final approach with two sensors and speed feedback enabled the system to be stableafter extensive tuning the speed feedback gain. The two sensor system was however a verysensitive system regarding the initial speed of the sphere and sooner or later deviationsin inclination of the lever.

    Project: Seesaw System as a controlled system (February 26, 2012) 25/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    26/55

    4 TEST AND CALIBRATION OF LABVIEW PROCESSES

    4 Test and Calibration of LabView Processes

    Author: Kai

    The process design was tested regularly offline by incorporating just ordinary buttonsinstead of sensors. It should be noted, that this includes the danger that time dependentprocesses may not be possible to test appropriately.

    The system needs calibration before it may be possible to run at all.

    Adjusting the Level To adjust the lever before the first use, the step delay should beset to at least 200ms. Otherwise each button press triggers more than one step and itbecomes very difficult to adjust the lever to the right equilibrium or preset angle.

    It also should be noted, that, if the adjustment have to be done after a process wasstopped the sensors must be fired once more again manually after the adjustment modewas activated. Otherwise the adjustment buttons dont react.

    Single Sensor Setup The distance of the sensor should be chosen about 100mm fromthe pivot point - either to the right or to the left. The amount of 4 steps should beadjusted and a step delay of about 80ms.

    The delay between the inclinations did have no significant effect as long as they are largerthat the step delay and shorter than the sphere needs for each time to travel.

    Double Sensor Setup The distance of the sensors were found to be best at 120mmto each site of the pivot point. A step delay of 80ms should be chosen here.

    For the steps to the left and the right usual values between 2 and 5 were working best.However, these values only determine how dynamic the system is supposed to show up.According to the chosen values of the amount of steps the system needs to be tuned nowby the adjustment of the delay times to the left and the right. No exact values can begiven here, but it is to expect these values should lie between about 100 and 600ms.

    Any larger delay times appear to block the sensors too long and cause immediate dropsof the sphere. A too short delay time appears to bring the stepper motor in difficultiessuch that it drops steps and causes erratic jumps causing the sphere to drop.

    Project: Seesaw System as a controlled system (February 26, 2012) 26/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    27/55

    5 CONCLUSION

    5 Conclusion

    Author: all

    The overall system performance was finally better than expected. Though, the initialexpectations were positive right from the beginning, it turned out that it was finedishlydifficult to tune the system and bring the sphere to a fairly stable oscillation on the lever.

    Different other published seesaw systems [5] use a fundamentally different approach totrack the movement of an object and are not directly comparable with the system in thisproject.

    The difference is that, that it is much easier to use systems that track an object con-

    tinuously by other means than just single point sensors. Though, it might occur thatthe system exposes a two step control system with two sensors, that does not necessarilymean such systems are easier to control. Each sensor needs to be aware of the speed ofthe sphere to adjust the inclination and the time to hold the inclination of the lever togracefully return the sphere each time.

    It was however, a surprise that it was easier to tune the seesaw with an single sensorcompared to a two sensor arrangement, even though the single sensor system did notneed a speed feedback. This may be accounted by the fact that the amplitute the spherewas travelling with was much smaller and a much higher damping factor was introduced

    by the single sided inclination lever, as the system needed to keep the sphere only on oneside.

    Therefore, another test showed, that it was not possible to balance the sphere with ansingle sensor placed at the pivot point. The single sensor needed to be placed excentricallyon one side of the seesaw to obtain a stable oscillation of the seesaw system.

    And yet another chellange was the rough step size the lever was only able to turn causedby the rough gear system design.

    Considering the amount of uncertainties the system exposes it was nice to see that itis possible to obtain some stability of such an system. A lot of effort can be put intothe control system to make the system even more stable and shows the significance ofcomputer controlled systems.

    Project: Seesaw System as a controlled system (February 26, 2012) 27/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    28/55

    6 LIST OF EQUIPMENT AND COMPONENTS

    6 List of Equipment and Components

    Author: all

    PC double core processor, usb connectorLabView software installed on the computerDAQmx usb, national instrumentspower supply binary, 12V, 20VDMM measuring resistance, voltage range up to 40V, current range up to 1A

    Table 3: List of used equipment

    drilling machine, drillsscrew driver

    plierswire strippersingle core wireflexible / stranded wiresoldering iron / gun, solder, fluxing agentexperimental soldering boardmains connectors

    Table 4: Other tools and material

    Driver Chip ULN2803A

    RelaysResistorsWire Terminals

    Table 5: Electronics Components

    Project: Seesaw System as a controlled system (February 26, 2012) 28/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    29/55

    REFERENCES REFERENCES

    References

    [1] OMRON: Industrial Automation. Cylindrical inductive proximity sensor: Tl-x10 me1.

    http://www.ia.omron.com.[2] John Avison. The World of Physics. Thomas Nelson and Sons Ltd. UK, 2nd edition,

    1989.

    [3] Douglas C. Giancoli. Physics for scientists and engineers with modern physics. Pear-son Prentice Hall, 4th edition, 2008.

    [4] National Instruments. Ni usb-6008,6009.http://www.ni.com/pdf/products/us/20043762301101dlr.pdf.

    [5] Seesaw balancer. http://www.engineering.uiowa.edu/ comcon/lab/Lab2.pdf.

    [6] Yuanyuan Luo. College Physics. Jiangxi Universities and Colleges Press, 4th edition,2005.

    [7] SGS-Thomson Microelectronics. Uln2803a.http://www.datasheetcatalog.com/datasheets pdf/U/L/N/2/ULN2803.shtml.

    [8] GMIT: Galway Mayo Institute of Technology.Handout Practical; Module: Physics & Instrumentation. Subject: Digital systems3.1: Practical: The stepper motor.http://www.gmit.ie, 2010.

    [9] RS Components Ltd. UK. Unipolar 7.5 deg stepper motor, 12v 5.3w. http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=0332953.Size 2.

    Project: Seesaw System as a controlled system (February 26, 2012) 29/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    30/55

    A LABVIEW DIAGRAMS

    A Labview Diagrams

    Project: Seesaw System as a controlled system (February 26, 2012) 30/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    31/55

    sensor-pulse-0-3-1-2.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/sensor-pulse-0-3-1-2.viLast modified on 03/08/2011 at 12:41 PM

    Printed on 03/08/2011 at 12:42 PM

    sensor-pulse-0-3-1-2.vi

    Fixing the wait occurence locations in the inclination sequence such tthatthe first ssensor waits - occurence needs seperate frame.Double Sensor Simulation with documentation of the use of the dt of a sensor.

    First attempt to describe how to implement the use of the dt (pulse length) of the sensor.

    Ajdust/Run

    STOP

    stop

    80

    step delay/ms

    -3.75

    angle

    0

    coil index

    2

    steps s1

    left

    LEFT

    right

    RIGHT

    220

    delay forward

    200

    delay reverse

    forward

    Sensor 1

    reverse

    Sensor 2

    Double Sensor System

    The first sensor is blockedas long as the second has notfired and so on.

    Basically this means if one sensor

    detects the sphere it keeps theinclination until the other sensordetects the sphere.

    Adjust if activeotherwiserun mode!

    0

    dt sensor 2

    0

    dt sensor 1

    The target is 1s and

    subsequently startscounting new afte 1

    5

    steps s2

    Project:Sees

    awSystem

    asacontrolledsy

    stem

    (February26,2012)

    31/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    32/55

    sensor-pulse-0-3-1-2.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/sensor-pulse-0-3-1-2.viLast modified on 03/08/2011 at 12:41 PM

    Printed on 03/08/2011 at 12:42 PM

    Ajdust/Run

    stop

    step delay/ms

    angle

    steps s1

    LEFT

    RIGHT

    delay forward

    delay reverse

    Sensor 1

    Sensor 2

    steps s2

    coil index

    dt sensor 2

    dt sensor 1

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    32/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    33/55

    sensor-pulse-0-3-1-2.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/sensor-pulse-0-3-1-2.viLast modified on 03/08/2011 at 12:41 PM

    Printed on 03/08/2011 at 12:42 PM

    stop

    motor-interface-0-7-1.vi

    angle

    step delay/ms

    angle

    coil index

    forward

    Run N steps at s1steps s1

    1 [0..7]

    Lever Inclination SequenceFalse

    Adjust mode / Run mode

    Half / Full Step

    Ajdust/Run

    Process Loop

    Sensor 1

    Sensor 1 Sensor 1fired

    True

    dt sensor 1

    Elapsed Time2

    True

    data

    DAQ Assistant0

    Sensor 2 Sensor 2fired

    True

    dt sensor 2

    Elapsed Time

    True

    data

    DAQ Assistant20

    Sensor 2

    step delay/ms anglecoil index

    steps s1

    LEFT RIGHTdelay forward delay reverse

    dt sensor 2dt sensor 1

    steps s2

    single step buttons foradjusting the lever

    default

    front panel elements

    The pulsA short p

    slow spe

    If a sensget the s

    Howeverin the op

    This meabe revers

    Basically

    inclined how steenot speeThe lattelever to aThe formby the m

    The dt of a sensor is here used toset a time delay for the inclination.

    Blocking the sensor with a timeout is not suitableas the timeout times are changing havily and

    are very narrow.

    The present process is in that way already well

    behaved, as it just waits until the opposite sensorfires. Assuming that the duration time of theinlination is always much less than the othersensor needs to fire a simple delay in themain sequence may be sufficient.

    For now we only can pre-adjust the inclination,but this should express anyway a suitable

    system behavior.

    False

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    33/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    34/55

    sensor-pulse-0-3-1-2.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/sensor-pulse-0-3-1-2.viLast modified on 03/08/2011 at 12:41 PM

    Printed on 03/08/2011 at 12:42 PM

    False

    Wait forSensor 1

    0 [0..7]

    delay forward

    dt sensor 1

    if dt is small wait longer to decelerate

    2 [0..7]

    motor-interface-0-7-1.vi

    angle

    step delay/ms

    angle

    coil index

    reverse

    Reverse N steps at s1steps s1

    3 [0..7]

    False

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    34/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    35/55

    sensor-pulse-0-3-1-2.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/sensor-pulse-0-3-1-2.viLast modified on 03/08/2011 at 12:41 PM

    Printed on 03/08/2011 at 12:42 PM

    Wait forSensor 2

    4 [0..7]

    motor-interface-0-7-1.vi

    step delay/ms

    angle

    angle

    coil indexreverse

    run n steps at s2steps s2

    5 [0..7]

    delay reverse

    dt sensor 2

    if dt is small wait longer to decelerate

    6 [0..7]

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    35/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    36/55

    sensor-pulse-0-3-1-2.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/sensor-pulse-0-3-1-2.viLast modified on 03/08/2011 at 12:41 PM

    Printed on 03/08/2011 at 12:42 PM

    motor-interface-0-7-1.vi

    step delay/ms

    angleangle

    coil index

    Motor action loopRun N steps

    single step mode foradjusting the lever

    1

    LEFT

    RIGHT

    True

    motor-interface-0-7-1.vi

    step delay/ms

    angle

    angle

    coil indexforward

    reverse n steps at s2

    steps s2

    7 [0..7]

    Project:Sees

    awSystem

    asacontrolledsy

    stem

    (February26,2012)

    36/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    37/55

    sensor-pulse-0-3-1-2.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/sensor-pulse-0-3-1-2.viLast modified on 03/08/2011 at 12:41 PM

    Printed on 03/08/2011 at 12:42 PM

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    37/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    38/55

    sensor-pulse-0-3-1-2.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/sensor-pulse-0-3-1-2.viLast modified on 03/08/2011 at 12:41 PM

    Printed on 03/08/2011 at 12:42 PM

    DAQ Assistant2Creates, edits, and runs tasks using NI-DAQmx. Refer to the DAQ Quick Start Guide for information on devices s

    When you place this Express VI on the block diagram, the DAQ Assistant launches to create a new task. After you DAQ Assistant Express VI in order to edit that task. For continuous measurement or generation, place a loop aro

    For continuous single-point input or output, the DAQ Assistant Express VI might not provide satisfactory performAnalog In\Measure Voltage.llb\Cont Acq&Graph Voltage-Single Point Optimization.vi for techniques to create higapplications.

    DAQ AssistantCreates, edits, and runs tasks using NI-DAQmx. Refer to the DAQ Quick Start Guide for information on devices s

    When you place this Express VI on the block diagram, the DAQ Assistant launches to create a new task. After you DAQ Assistant Express VI in order to edit that task. For continuous measurement or generation, place a loop aro

    For continuous single-point input or output, the DAQ Assistant Express VI might not provide satisfactory perform

    Analog In\Measure Voltage.llb\Cont Acq&Graph Voltage-Single Point Optimization.vi for techniques to create higapplications.

    Elapsed Time2

    Elapsed TimeIndicates the amount of time that has elapsed since the specified start time.--------------------

    This Express VI is configured as follows:

    Time Target: 1 s

    Auto Reset: On

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    38/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    39/55

    single-sensor-0-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/single-sensor-0-1.viLast modified on 03/08/2011 at 12:20 PM

    Printed on 03/08/2011 at 12:47 PM

    single-sensor-0-1.vi

    Simulation with a single sensor

    Ajdust/Run

    60

    step delay/ms

    0

    angle

    0

    coil index

    6

    step count

    left

    LEFT

    right

    RIGHT

    500

    delay forward

    500

    delay reverse

    left

    Sensor

    Adjust if activeotherwiserun mode!

    if adjust is blocked

    press sensor once ortwice.

    For the single sensorthe inclination must bepre-set!

    This means the lever has

    an initial inclination.

    Delay reverse and forwardshould not be too short asotherwise both turns happenat once.

    unless it is wanted

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    39/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    40/55

    single-sensor-0-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/single-sensor-0-1.viLast modified on 03/08/2011 at 12:20 PM

    Printed on 03/08/2011 at 12:47 PM

    delay reverse

    5 [0..5]

    Sequence of inclinationsFalse

    react only if button or sensor reading

    Half / Full Step

    RIGHT

    LEFT

    Ajdust/Run

    Main Process Loop

    SensorTrue

    data

    DAQ AssistantIndex Array

    0

    step delay/ms anglecoil index

    step count

    LEFT RIGHT

    delay forward delay reverse

    single step buttons foradjusting the lever

    Enabled

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    40/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    41/55

    single-sensor-0-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/single-sensor-0-1.viLast modified on 03/08/2011 at 12:20 PM

    Printed on 03/08/2011 at 12:47 PM

    Wait on Occurrence

    0 [0..5]

    angle

    step delay/ms

    angle

    coil index

    forward

    motor-interface-0-7-1.vi

    Motor action loop Run N steps

    step count

    1 [0..5]

    not fired

    False Disabled

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    41/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    42/55

    oscillation-0-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/oscillation-0-1.viLast modified on 03/08/2011 at 12:07 PM

    Printed on 03/08/2011 at 12:49 PM

    angle

    coil index

    step delay/ms

    LEFT

    RIGHT

    oscillation-0-1.vi

    Process to set the lever into an predefined oscillaion.It may be expected that, if the oscillation frequency is suitablein relation to the inlination that the sphere is always sufficientlyslowed down to stay on the lever.

    This system therefore cannot react on externel changes or adifferent sphere.

    200

    step delay/ms

    0

    coil index

    left

    LEFT

    STOP

    stop

    right

    RIGHT

    3.75

    angle

    2

    step count

    Ajdust/Run

    Sensor less oscillating system

    Adjust step delay and step count.

    Also adjust delay between forward and reverse.

    Adjust if active

    otherwiserun mode!

    0

    delay forward

    0

    delay reverse

    Adjust angle with a positive value

    as the forward count will be negative

    therefore achieving a symmetric counting.

    But get this in sync with the real system"

    step delay/ms

    LEFT

    RIGHT

    angle

    coil index

    A.3 Oscillation A LABVIEW DIAGRAMS

    A.3 Oscillation

    Project: Seesaw System as a controlled system (February 26, 2012) 42/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    43/55

    oscillation-0-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/oscillation-0-1.viLast modified on 03/08/2011 at 12:07 PM

    Printed on 03/08/2011 at 12:49 PM

    stop

    motor-interface-0-7-1.vi

    step delay/ms

    angle

    angle

    coil indexreverse

    step count

    2 [0..3]

    False

    react only if button or sensor reading

    Half / Full Step

    Ajdust/Run

    Processing Loop

    step delay/ms anglecoil index

    step count

    LEFT RIGHT

    single step buttons foradjusting the lever

    delay forward delay reverse

    default

    front panel elements

    A.3 Oscillation A LABVIEW DIAGRAMS

    Project: Seesaw System as a controlled system (February 26, 2012) 43/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    44/55

    oscillation-0-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/oscillation-0-1.viLast modified on 03/08/2011 at 12:07 PM

    Printed on 03/08/2011 at 12:49 PM

    motor-interface-0-7-1.vi

    step delay/ms

    angleangle

    coil index

    single step mode foradjusting the lever

    1

    LEFT

    RIGHT

    True

    motor-interface-0-7-1.vi

    step delay/ms

    angle

    angle

    coil indexreverse

    step count

    2 [0..3]

    False

    motor-interface-0-7-1.vi

    angle

    step delay/ms

    angle

    coil index

    forward

    step count

    0 [0..3]

    A.3 Oscillation A LABVIEW DIAGRAMS

    Project: Seesaw System as a controlled system (February 26, 2012) 44/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    45/55

    oscillation-0-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/oscillation-0-1.viLast modified on 03/08/2011 at 12:07 PM

    Printed on 03/08/2011 at 12:49 PM

    delay forward

    1 [0..3]

    motor-interface-0-7-1.vi

    step delay/ms

    angle

    angle

    coil indexreverse

    step count

    2 [0..3]

    delay reverse

    3 [0..3]

    A.3 Oscillation A LABVIEW DIAGRAMS

    Project: Seesaw System as a controlled system (February 26, 2012) 45/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    46/55

    oscillation-0-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/oscillation-0-1.viLast modified on 03/08/2011 at 12:07 PM

    Printed on 03/08/2011 at 12:49 PM

    motor-interface-0-7-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/motor-interface-0-7-1.vi

    A.3 Oscillation A LABVIEW DIAGRAMS

    Project: Seesaw System as a controlled system (February 26, 2012) 46/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    47/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    48/55

    motor-interface-0-7-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/motor-interface-0-7-1.vi

    Last modified on 03/08/2011 at 12:06 PMPrinted on 03/08/2011 at 12:50 PM

    Full Step Sequence

    0

    0

    1

    1

    1

    1

    0

    0

    1

    0

    0

    1

    0

    1

    1

    0

    0 00 0

    Control Displayobserving the presentactive coils

    0

    Control Displayobserving thedecimal value ofbinary pattern

    At each run the next coil sequence should

    occur in the control display.

    The array may be used directly as the DAQ

    requires an array anyway.

    Increment

    Increment / Decrement

    sequence index

    Each time the program is called or run theindex wil count up or down and hold the

    index for a subsequent call

    Half Step Sequence

    0

    0

    0

    1

    1

    1

    0

    0

    1

    1

    0

    0

    0

    0

    0

    1

    0

    1

    1

    1

    0

    0

    0

    0

    0

    0

    0

    0

    0

    1

    1

    1

    Half / Full Step

    TODO

    Test bin order

    may be reversed

    0 0 000

    output format

    0

    prev index

    0

    angle

    0

    prese

    0

    present

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    48/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    49/55

    motor-interface-0-7-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/motor-interface-0-7-1.vi

    Last modified on 03/08/2011 at 12:06 PMPrinted on 03/08/2011 at 12:50 PM

    Full Step Sequence

    Increment / Decrementsequence index

    Half Step Sequence

    Half / Full Step

    prev index

    angle

    Control Displayobserving the presentactive coils

    Control Displayobserving thedecimal value ofbinary pattern

    output format

    nr

    present angle

    present index

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    49/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    50/55

    motor-interface-0-7-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/motor-interface-0-7-1.vi

    Last modified on 03/08/2011 at 12:06 PMPrinted on 03/08/2011 at 12:50 PM

    Increment / Decrement

    sequence index

    Half / Full Step

    Full Step Sequence

    Index Array

    Decimal String To Number

    Control Displayobserving the presentactive coils

    Conobsdecbina

    Ar

    suba

    DAQ

    her

    Half Step Sequence

    out

    prev index

    prev index

    angle

    angle

    present angle

    present index

    data

    DAQ Assistant

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    50/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    51/55

    motor-interface-0-7-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/motor-interface-0-7-1.vi

    Last modified on 03/08/2011 at 12:06 PMPrinted on 03/08/2011 at 12:50 PM

    DAQ AssistantCreates, edits, and runs tasks using NI-DAQmx. Refer to the DAQ Quick Start Guide for information on devices s

    When you place this Express VI on the block diagram, the DAQ Assistant launches to create a new task. After you

    DAQ Assistant Express VI in order to edit that task. For continuous measurement or generation, place a loop arou

    For continuous single-point input or output, the DAQ Assistant Express VI might not provide satisfactory performAnalog In\Measure Voltage.llb\Cont Acq&Graph Voltage-Single Point Optimization.vi for techniques to create high

    applications.

    Project:Sees

    awSystem

    asacontrolledsy

    stem

    (February26,2012)

    51/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    52/55

    motor-interface-0-7-1.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/motor-interface-0-7-1.vi

    Last modified on 03/08/2011 at 12:06 PMPrinted on 03/08/2011 at 12:50 PM

    motor-interface-inc-dec.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/motor-interface-inc-dec.vi

    DAQmx here.vi /home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/DAQmx here.vi

    motor-interface-bin2nr-0.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/motor-interface-bin2nr-0.vi

    Project:Sees

    awSystem

    asacontrolledsystem

    (February26,2012)

    52/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    53/55

    motor-interface-inc-dec.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/motor-interface-inc-dec.viLast modified on 03/01/2011 at 05:53 PM

    Printed on 03/08/2011 at 12:53 PM

    present index

    present angle

    Dec == True Inc == False

    previous angle

    previous index

    Full = T Half = F

    motor-interface-inc-dec.vi

    Determain values according to half / full step and forward and reverse.In detail the max index according to half and full step is returned andvalues for the index and angle are accordingly increased or decreased.

    Full = T

    Half = F

    0

    previous index

    Dec == TrueInc == False

    0

    present index

    0

    previous angle

    0

    present angle

    Full = THalf = F

    previous index

    Dec == TrueInc == False

    previous angle

    present index

    present angle

    A.5 Inc-Dec A LABVIEW DIAGRAMS

    A.5 Inc-Dec

    Project: Seesaw System as a controlled system (February 26, 2012) 53/ 55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    54/55

  • 8/3/2019 Seesaw Report GMIT 2011 (Physics and Instrumentation Course)

    55/55

    motor-interface-bin2nr-0.vi/home/kai/Documents/GMIT_Y3_2/IDL/project/labview/system-0-2-1/motor-interface-bin2nr-0.vi

    Last modified on 03/01/2011 at 05:53 PM

    Printed on 03/08/2011 at 12:52 PM

    nrArray

    motor-interface-bin2nr-0.vi

    Convert an array of binary numbers into a decimal.

    Attention: It is NOT tested if the binaries are only 1 and 0 !

    0

    nr

    00

    Array

    Array

    nr

    nr=a[3]*2**0+a[2]*2**1+a[1]*2**2+a[0]*2**3;

    nra

    nr

    Array

    A.6 Bin2Nr A LABVIEW DIAGRAMS

    A.6 Bin2Nr