Home

LegoNXT Experiment – User Guide

image

Contents

1. Do you need a passkey to add your device To answer this question refer to the Bluetooth section of the documentation that came with Your device IF the documentation specifies 4 passkey use that one Choose a passkey for me Use the passkey found in the documentation 1234 Let me choose my own passkey Don t use a passkey e You should always use a passkey unless your device does not support one Wwe recommend using a passkey that is 9 to 16 digits long The longer the passkey the more secure it will be Then click on Next gt button Now you should get the message on the NXT Brick device prompting you to enter the passkey 1234 Once you have entered the correct passkey and then pressed the Orange button you should have completed the set up of the Bluetooth connection between the PC and the NXT Brick Therefore click on the Finish button in the window shown below Add Bluetooth Device Wizard Completing the Add Bluetooth Device Wizard The Bluetooth device was successtully connected to your computer Your computer and the device can communicate whenever they are near each other These are the COM senal ports assigned to your device Outgoing COM port COMS Incoming COM port COME Learn more about Bluetooth COM parts To close this wizard click Finish 6 Controlling the Cart Using Bluetooth Connection Now open the file line follower BT vi in the LabView Graphical
2. MSc Course in Advanced Control and Systems Engineering School of Electrical and Electronic Engineering University of Manchester LegoNXT Experiment User Guide Professor Barry Lennox Dr Ognjen Marjanovic September 2009 1 Starting Up 1 1 Starting the Program on the NXT Brick In order to switch ON the NXT Brick microcontroller mounted on the cart and start running the NXT program 1 Press the orange button located on its surface First of all you will get a display showing My Files 2 Press orange button again and you will se the display showing Software Files 3 Press orange button again and you will see the display showing NXT Line Follow 4 Press the orange button again and you will see the display Run 5 Press the orange button and the display will have a label Running while the two lights from the LegoNXT sensors should now be illuminated Note that in order to switch OFF the NXT Brick keep pressing the grey square button located below the orange button until you see the message Turn Off and then press the orange button Navigation on the NXT Brick is outlined in the Appendix 1 2 Launching LabView Application Log onto one of the available computers in Room Fib or F46 Sackville Street Building You should use the following to log in username ControlMSc password control2009 For the majority of the experiment you should use the USB connection So c
3. Position Controller Page and increase the Power to 20 Then change the value of Kp from 0 to some small positive number Press Run button in order to start the experiment Try to tune the value of Kp so that your cart is able to track the line well Appendix Navigation On the Graphical User Interface of the NXT Brick The schematic of the various options available through the graphical user interface is shown in Figure A1 For the purposes of this particular experiment you will only need to navigate through My Files and Bluetooth options which are shown in detail in Figure A1 and Figure A2 respectively In order to go down this schematic please press ORANGE BUTTON In order to go up this schematic please press GREY BUTTON located below the ORANGE BUTTON If you wish to move left or right please use the LIGHT GREY COLOURED TRIANGULAR BUTTONS which are located to the left and right of the ORANGE BUTTON Bluetooth My Files NXT Program NXT Datalog See Figure A2 Datalog Files Software Files NXT Files NXT Line Follow Derete H Run H sena Figure A1 Bluetooth Figure A2
4. L I L I I I I L I I l I I I I L I 50 45 40 35 30 25 20 15 10 5 0 5 10 15 20 25 30 35 40 45 50 Over reach Calibration L 788 R 788 Over reach Speed limiter Overreach Boundary Latch Value 7 10 Latch a Line Contrast 4 Tuning of the Position Controller First and crucial task is to lay down a track that the cart will be required to follow The width of the track should be greater than 1cm and less than 5cm in order to ensure that the sensors function properly Also it is important that there is sufficient contrast between the track colour and background colour In general some black sticky tape on a white background or white sticky tape on a black background will work Before commencing with the design of the Position Controller make sure that your Wheel Controller and your Sensor are appropriately configured Now in order to design Position Controller you need to navigate to its corresponding page by clicking on the button labelled Position Controller Position Controller Page has the following layout B NXT EPBL Tutorial Connection type Wheel Controller Sensor Postion Controller 90 Speed Control IM o bes Poeeee bee ee bee ee bene e bere edhe eee bene eben eda ool Angl Sues 100 100 Oo G2 04 CF G8 de ue he te ie 25 12 ooo w 2 gt 0 0 01 0 02 003 0 04 O05 O06 0 0
5. layout of this application is almost identical to that of its USB counterpart NXT EPBL Tutorial Connection type a Bluetooth wheel Controller Sensor Postion Controller otation oun ti 75 Battery 100 100 100 25 12 Speed Control ower 0 2 Angle 50 25 0 25 75 5 50 55 0 D if Ii Error 4n 20 0 20 0 4 4 60 80 0 0 01 002 003 0 04 0 05 006 0 07 0 08 0 09 0 1 h tae i Line AM Position i Baw P 9 i5 i 0 8 0 6 0 4 0 2 v 0 2 0 4 0 6 0 8 Start running the NXT Brick program NXT line follow program 6 1 Tuning of the Wheel Controller Go to the Wheel Controller Page At the beginning ensure that values of the three tuning parameters are all equal to zero Also set the Steer Offset to be approximately equal to 0 Keeping the value of Ki and Kd equal to 0 and SLOWLY increase the value of Kp towards the value used by the Wheel Controller that utilises USB cable Does the controller using Bluetooth connection behave the same as the controller using USB cable If not why not If you need to re tune the controller then find new suitable value for Kp while keeping Ki and Kd equal to 0 Comment on the difference in values of Kp for controller using Bluetooth connection and the controller using USB cable 6 2 Tuning of the Position Controller Place the cart on the track that you have already used in Section 4 Now go to the
6. three pages named Wheel Controller Sensor and Position Controller We will go to each of these pages in the following exercises in order to design Line Following Controller E NXT EPBL Tutorial i A Connection type iss s a 0 0 01 002 0 03 0 04 0 05 006 0 07 O08 O09 0 1 acter nee iz i i iz i i E E iz E z E ine m Position Iw J EFEN ny 113400 114300 115200 116100 117000 117900 118800 119700 120600 121500 122400 123300 124200 125100 126000 126900 127800 128700 129600 130500 131400 ds Note that if at any point you wish to stop the programme you should select End button located in the top left corner of the programme On the other hand if you wish to re start the application then click on the arrow button 2 Tuning the Wheel Controller Select the Wheel Controller button in order to navigate to the page where you will be able to tune the controller that regulates the angle of the wheels This Wheel Controller Page has the following layout ad NXT EPBL Tutorial Connection type 220 200 180 160 140 120 100 80 60 40 2 Angle aon aw ate 31500 32400 33300 34200 35100 36000 36900 37800 38700 39600 ise 41400 42300 43200 44100 45000 45900 46800 47700 48600 49500 50656 Time miliseconds The three tuning parameters Kp Ki and Kd which we will use to design the wheel controller are located in the middle of the screen A
7. 7 008 0 09 0 1 ine ve Position a ESFRAI p ry 125 Amplitude i i 1 o N gt I 1 i i i i Ei reee TT aaa 3321452 3322800 3324000 3325200 3326400 3327600 3328800 3330000 3331200 3332400 3333600 3334800 3336000 3337200 3338400 3339600 3341432 Time miliseconds First of all set Power to 20 and keep all of the Tuning Parameters of the Position Controller set to 0 Place the cart above the track such that it is not perfectly aligned with the track Also make sure that the two sensors are located above the track Click on Run button Note that the Run button has changed into Stop button Once running if at any point in time you want to stop the cart then press this button e Is cart following the line If not why not Now stop the cart by pressing the Stop button Reposition cart on the track making sure that it is not perfectly aligned with the track and press Run Then increase Kp to 0 8 e What do you notice Is cart following the line If not why not Try to tune the value of Kp so that your cart is able to track the line well Note that the Position Controller acts on the difference between the two sensor measurements If an error exists then the Position Controller will send a signal to the Wheel Controller requesting for the wheels to be steered to a specified angle This control configuration that employs two controllers is known as Cascade Control The bl
8. loured dark then select Line Contrast to be Light On the other hand if the track is coloured dark while the background is coloured white then select Line Contrast to be Dark Setting Line Contrast is done by clicking on the button below the label Line Contrast which switches between Light and Dark mode 3 2 Setting Sensor Offset Once you have decided on the colour scheme of the track by selecting appropriate Line Contrast Mode you need to ensure that the measurements from the two sensors are consistent with each other for a give surface In order to do this place the cart above the background surface without either of the sensors positioned above the track In other words both sensors should be measuring the intensity of the background surface only Once you have placed the sensors at the appropriate location observe the value of Error displayed in a box above the Offset bar Use the slider on the Offset bar in order to eliminate this error For example in the Figure below the current error with the Offset set to 0 is equal to 18 Error 18 Off set Over reach Calibration L 774 R 792 Over reach Speed limiter Overreach Boundary Latch Value 7 10 Latch a Line Contrast Ee In order to ensure that the measurements from the two sensors are approximately consistent with each other move the slider on the Offset bar until the error becomes equal to zero Error O Off set I 1
9. ock diagram of the cascade control scheme used in this experiment is shown in figure below By observing the figure can you explain why the cascade control scheme is sometimes referred to as Master Slave or Outer Loop Inner Loop Control Scheme cart speed required wheel position wheel angle Voltage error Position angle C error Whee Wheel Dynamics 7 5 wheel angle wheel angle cart position 5 Setting Up the Bluetooth Connection Close the line follower USB vi application in LabView and stop running the program on the NXT Brick by pressing the grey button located below the orange button Unplug the USB cable from both the PC and the NXT Brick Plug the Bluetooth dongle into a USB port on the PC and wait a few moments for Windows to install it In the bottom right corner of the screen next to the clock you may notice Bluetooth Devices icon Double click on this icon If this icon does not appear then click on Start gt Control Panel gt Network and Internet Connections gt Bluetooth Devices The following window should then appear Bluetooth Devices Devices Options COM Ports Hardware Blank window means that there are no bluetooth devices currently registered with the PC that you are using So you need to register NXT Brick by clicking on the Add button The Add Bluetooth Device Wizard will then pop up In the first window of the wizard tick the box next to
10. onnect the USB cable to the NXT Brick and the PC From the start menu select LabView 8 5 The following window should now appear 3 Getting Started ba m Fie Operate Tools Help Licensed for Professional Yersion al Blank VI H Empty Project Ha I from Template O More m Cita Follower 8 5iline Follower USB vi Cii Follower 8 5 NXT Line Follower vi mi D 6 Follower 8 5 line Follower BT vi me D Follower 8 5iline Follower USB vi m C ennox Desktop LineLeader_Remote vi mi C ennox Desktop LineLeader Direct vi B Browse New To Lab IEW Getting Started with LabVIEW LabVIEW Fundamentals Guide to LabVIEW Documentation LabVIEW Help Upgrading Lab IEW Lab YIEW Project Enhancements Merging YIs Conditional Terminals in For Loops List of All New Features Web Resources Discussion Forums Training Courses LabVIEW Zone Examples Q Find Examples Now open the file line follower USB vi that is located in the directory C legoNXT by clicking on File gt Open select a File to Open BTM send vi ine Follower BT vi My Recent Vine Follower USB vi Documents E NYT Line Follower wi Desktop My Documents hd Computer fi a File name Ine Follower USB wi ki Hy Network Files of type All Labill EW Files Pit ch wt ict vpro A The resulting application has the graphical layout as shown in Figure below Note that there are
11. r which you consider the response to be satisfactory make a note of their values This completes the task of tuning the wheel controller 3 Configuring Sensors Before we proceed with the design of the Line Following Controller we need to ensure that the two sensors mounted in between the steering wheels are properly set up Note that this task was not necessary for the design of the wheel controller This is because wheel controller does not use information from these sensors in order to regulate the angle of the steering wheels On the other hand Line Following Controller does use the information from these sensors in order to ensure the cart is following a certain track In order to set up sensors select Sensors button This will navigate you to the Sensor Page that has the following layout Connec tion type n wheel Control ler Sensor Postion Control ller NXT EPBL Tutorial Set Point Calibration Steer Direction T If Over reach Calibration J L 775 R 790 Over reach Speed limiter Overreacl h Boundar Latch Value y Line Contrast Dark Most of the configuration parameters present on this page should be ignored at this stage The only parameters that we will be dealing with are Offset and Line Contrast 3 1 Setting Line Contrast Mode First of all you need to decide whether a track will be coloured light or dark If the track is coloured light while the background is co
12. t the beginning ensure that the values of all of these parameters are set to 0 and that the wheels of the car are pointing forward Below the tuning parameters there is Steer Offset bar that allows the user to specify the required angle of the steering wheels In other words Steer Offset represents set point for the wheel controller At the beginning ensure that the Steer Offset is approximately equal to 0 Keeping the value of Ki and Kd equal to 0 increase the value of Kp to 0 6 and then change the value of the Steer Offset Make sure that you do not set the Steer Offset below 120 or above 120 Observe the graph shown in the lower part of the Wheel Controller Page Note that the red trend represents the set point i e Steer Offset while the white trend represents the actual wheel angle Keep changing the value of Steer Offset every couple of seconds e How good is your controller in ensuring that the white trend actual position of the wheel follows red trend set point for the wheel angle e What happens when you increase the value of Kp More specifically what difference does this increase in Kp have on the way in which white trend is following the red trend e What do you notice happening when the value of Kp is very large e g Kp 1 6 e What do you notice happening when the value of Kp is very small e What is a good value for Kp Why is this a good value Once you have chosen the values of the tuning parameters fo
13. the label My device is set up and ready to be found and then click on Next Hopefully the NXT Brick will be found and the following window will appear Add Bluetooth Device Wizard Select the Bluetooth device that you want to add HiT Mew device i Ifyou don t see the device thak you wank to add make sure that it is tumed on Follow the setup instructions that came with the device Seach Again and then click Search Again Search Again Again You should select NXT icon and click on Next gt button The following window is requesting for you to specify what type of passkey you will use to establish the connection with the NXT Brick Add Bluetooth Device Wizard Do you need a passkey to add your device To answer this question refer to the Bluetooth section of the documentation that carne with your device If the documentation specifies a passkey use that one Choose a passkey for me C Use the passkey found in the documentation Let me choose my own passkey O Dont use a passkey D You should always use a passkey unless your device does not support one We recommend using a passkey that is amp to 16 digits long The longer the passkey the more secure it will be Select Use the passkey found in the documentation by ticking the box to its left second from the top and then enter the passkey 1234 into the white box Add Bluetooth Device Wizard

Download Pdf Manuals

image

Related Search

Related Contents

  授業期間・単位数 通年 2 単  Samsung 23" SyncMaster SA700D LS23A700DS/EN Brugervejledning  DR19 取付パッキンセット 取扱説明書 お客様へ    BENDIX SD-08-2414 User's Manual  Development of Graphic User Interface for RETRAN3D  LOEWE 54443T50 LED TV  Chevrolet 2014 Cruze Supplementary Manual  GBC IB370427 binding cover  

Copyright © All rights reserved.
Failed to retrieve file