Practicum 2D
1. Goals
The goal of this practicum is to visualize the second order transient response of partially submerged structures as a result of a thrust step input. Your robot will be modified so that it will only be partially submerged during operation. A MyDAQ will be used to control your H-bridge, which will in turn control the thrust from your motors. A pressure sensor will monitor the depth of your robot, which should exhibit second order transient behavior.
2. Deliverables
Lab Skills
Robot Assembly
Revisit LabVIEW
Tank Deployment
Lab Concepts
Calibration curve
Tutorial Skills
Second order transient response
Data to Save
Calibration data from sections 7 and 8
Depth/Voltage curve
Turn in Submission Sheet (found on Sakai)
3. What You'll Need
Robot with umbilical
"Spring" made from PVC and pool noodle
Breakout board and cable
4. Assemble the Robot
Note: If your board was not working properly at the end of last practicum (2C), be sure to spend some time checking out these debugging tips before going to the tank room.
Find your robot and motor from last week. Remove the robot buoyancy floats from your robot as shown in Figure 4.1.
Figure 4.1: (a) ROV frame; (b) ROV frame with 6.5” pieces removed.
Mount the vertical thruster motor onto your robot frame, see Figure 4.2.
Make sure your motor is attached as shown in the photo.
Figure 4.2: Mounting the vertical thruster.
Modify the robot frame to include the vertical “spring”. Your robot should look like the one in Figure 4.3. Make sure your pool noodle piece is below the electrical tape.
Figure 4.3: Robot with added top spring.
At the scale, measure the dry mass of your robot without the umbilical cord. There is a scale on the central table of the lab. Remove your hanger if you haven't already: it makes taking mass easier and we won't use it again in practicum.
There should also be a pair of calipers near the scale. Measure and record the outer diameter of the PVC that is used for the top spring of the robot. You will need this for your calculations later. Make sure to write you robot mass and outer diameter of the PVC on your submission sheet (Question 2).
Dry test your robot to make sure the electronics work (See Reference Page for dry test instructions). If your robot doesn't work right away, give up the dry test rig for other teams.
Tape your pressure tube to your frame so that it doesn't wiggle around in the tank.
Take your robot to the proctor in charge of managing the queue. They will double check that your robot is ready for going down to the tank room. Here is the checklist:
Original robot foam removed.
Robot top spring added.
Measured mass of robot.
Measured outer diameter of top spring PVC.
Dry test completed this week
Pressure tube taped to frame and pointing downward
The other end of the pressure tube is plugged into the pressure sensor on your board
Pressure tube is free of any water
Once the check is complete, the instructor will add you to the list of prepared students and inform you when it is your turn to go.
If it is not your turn to go to the test tank room, read through sections 5 and 6 so that you can work quickly in the test tank room. Then proceed to section 9 and complete the oscilloscope tutorial. Then proceed to section 7.
At this point you should have your motor attached to the robot and a long umbilical wire that connects to your board. Your board will sit on the work bench while your robot is in the water, and it will be attached by a ribbon cable to a MyDAQ box.
Don't forget add your answers to the questions you find in your practicum manual to your submission sheet for the day! (Question 1)
Figure 4.4: Set up with robot and long umbilical wires to motor.
5. Robot Preparation in the test tank room
Plug the ribbon cable coming out of the MyDAQ box into the breakout board.
If the VI is not already open on the laptop at your station, then
Double click on the file E79_F19_Controller.llb on the desktop.
Double click on the file P2DandP3A.vi.
Then hit run on the front panel.
When you start the VI, it will prompt you to name your output file and select the directory where you want it to be saved before actually running. If you select ‘cancel’, the VI will not save the data generated by that run (which can be helpful for testing). You should save your output files on the desktop of the user you are logged in to. Your output file will contain the pressure sensor voltages from the corresponding run of the VI.
Test the motor by varying the PWM duty cycle in the VI. Make sure the propeller spin rate increases with increasing PWM. Using a balloon pump, check that your pressure sensor works by pumping air into the tube and watching for the voltage change on the graph in the front panel.
If both your motor and pressure sensor are working properly, you are ready to deploy your robot in the tank.
REMINDER: When closing a VI, a window may pop up prompting you to save the VI and any lower level VI’s used within it, even if you didn’t make any changes. This will happen with any VI from a library that was just downloaded onto the computer, such as from Sakai or Google Drive. When that window pops up, just click the “save all” option, then it shouldn’t pop up again for that VI as long as it stays on the computer. If you need to re-download a library, then this window will pop up when closing the VI’s from that library, and you will need to save them once again so the window won't pop up anymore.
6. Experiment
Set the thruster PWM duty cycle to 0%.
Gently place your robot in the water, holding on to the top of the PVC “spring”. Move the robot around to get out all the air bubbles in the PVC pipes. To start, the water level should be about where the sharpie line is drawn on the PVC.
Keeping a hand on the top of the PVC “spring”, confirm that your pressure sensor and motor control are still working, then set the thruster PWM duty cycle to 0% again.
Make sure your tether has enough slack in the water and is not dragging on the side of the tank.
Figure 6.1: Properly ballasted robot.
You will now do a step response experiment with this setup.
When you run the VI, name the output file ZeroToOneHundred_XX, where XX are your initials, and save this file to the desktop.
Once the robot is stable (i.e. motionless), raise the thruster PWM duty cycle to 100% to create a step input. Using the slider will not produce a step, so type in 100 to the box under the slider and hit Enter to update the value.
After the robot stabilizes again (i.e. motionless), stop the VI. An example of a step response is shown in Figure 6.2. Your plot should resemble a second order transient response for an underdamped system with some overshoot. If you see an overdamped response, make sure your tether has slack in the water and retake your data.
Figure 6.2: Transient response from a step in thrust applied to the robot.
If something went wrong during the run, delete the output file from the desktop and try again.
If the run was successful, find the file on the Desktop which contains the pressure sensor voltages saved during this step response experiment, and move the file off of the desktop and into a folder inside of My Documents. Organize these folders by section.
Repeat this process again, only this time you will go from 100% to -100%
Name the output file OneHundredToNegOneHundred_XX, where XX are your initials.
Set the PWM to 100% and wait for the robot to settle to a stable depth.
Click the reverse button located above the PWM slider bar. This will maintain the 100% value on the slider, but reverse the direction of propeller rotation.
You should see a 2nd order transient response again on your screen. Again, it should be underdamped. Make sure to observe this on the pressure sensor voltage plot
Stop the VI, and find the new output file on the desktop. If the run was successful, move this file to be with your other file.
Remove your robot from the test tank, being careful not to spill water outside the tank.
Find the two files with your step response data. Either email the data to yourself, save it online, or transfer it to your own laptop using the provided USB stick. You will need this data for tutorial homework problem set 3B.
This next section is data collection for the next practicum P3A. You will not be analyzing this data this week - just taking the data and saving it for P3A. This will save you valuable time during P3A.
Follow the directions below:
With the VI not running, set the toggle switch to the down position, and set the PWM duty cycle to be 0. This constant setting of zero means that the robot should come to rest any time the toggle switch is moved to constant mode.
Run the VI and name the output file FrequencyResponse_XX, where XX are your initials and set it to save to the desktop.
Change the Frequency of the sinusoid to be 0.05 Hz, and set the toggle switch to the up position.
Watch the robot move up and down in unison with the input signal shown on the top right chart of the front panel.
If your robot is not in unison with the signal then your motor may be plugged in backwards. If so, turn the toggle switch off, hit the reverse button, then turn the toggle on again.
Make sure the output signal plot (the pressure sensor voltage) is also showing a sinusoidal response as well. The axes scrolling may make this difficult, but make sure you observe steady up and down motion in the signal.
See the plots in section 7 for what you should be getting.
Let the robot move around until it achieves sinusoidal steady state, and try to minimize any drifting of the robot. After a few cycles of sinusoidal steady state, set the toggle switch to the down position so that the input single to the thruster is no longer a sinusoid.
Repeat this process with frequencies of 0.1, 0.2, and 0.5. Pay attention to the phase and amplitude of your robot's motion relative to the applied thrust.
Stop the VI and, if the run was successful, find the output file on the desktop and move that file to a section-appropriate folder in My Documents. If the run was not successful, delete the output file from the desktop and try again.
Save your files to a USB drive or to the cloud so you can take them with you.
Return to your lab room, and inform the proctor managing the queue that you are done so that another team can take your spot in the test tank room. Remember to return the USB stick/token.
Dry your robot and put your robot away, returning the top spring to the general stock.
Data to Save
You will need this transient pressure data for your homework!
Be sure both partners have a copy.
7. Calibration Data
Now, it is time to record a calibration curve for the pressure sensor. Since the output of the pressure sensor is voltage, you will later need to use the calibration curve to convert the voltage reading a pressure value. In this section, we will collect calibration data to convert pressure sensor voltages to depth.
Fill the large graduated cylinder with water from the sink near the robot storage cabinets to a depth of at least 30 cm. Place the graduated cylinder on the ground, away from anyone’s path.
Connect your board to a breakout board and plug the breakout board into a breadboard. Provide 5V to the pin labeled “5V.” Connect the COM terminal of the power supply to the plated through-hole labeled “GND.” Connect the GND and AGND pins together with a wire.
The PRES node is connected to the output of the op-amp. To measure the pressure output with a multimeter, plug a wire into the row corresponding to PRES on the breadboard and connect it to a multimeter using an alligator clip. The negative probe/alligator clip must be connected to the circuit’s analog ground at the GND connection or the power supply COM plug.
This setup is shown below in multiple images.
Figure 7.1. Tubing on meter stick and initial set up with main board, breakout board, and breadboard.
Figure 7.2. Pressure tubing in graduated cylinder.
Figure 7.3. Power supply set up.
Figure 7.4. Full set up, ready to take calibration data.
Use a multimeter to measure the voltage difference between the node “PRES” and “GND” on your breakout board. This voltage corresponds to a robot depth of 0 meters. Insert the meter stick to a given depth and record both the depth and the voltage reading (measured between PRES and GND using the multimeter). Repeat at least seven evenly spaced depths (measured in meters) between to water level and the bottom of the cylinder.
Have one partner lower the end of the tube to different depths while the other measures the voltage using the digital multimeter and records both the height and voltage.
Plot the data in excel and determine a line of best fit which converts pressure sensor voltage to robot depth. You will use this equation in section 8. Add a screenshot of your plot to your submission sheet (Question 3).
Data to Save
You will need this depth/voltage data for this practicum and others in the future. Don’t lose it!
Be sure both partners have a copy.
8. Data Processing
First, plot the voltage data you collected in the tank to make sure it looks correct. The voltages in this plot are the outputs from your pressure sensor over time.
REMINDER: The VI timer starts when you click run, but the time doesn’t start recording to the output file until you’ve chosen the name and directory for the output file. Because of this, the time column in the output file generated from the VI will have a near 0 number in the first row, then it will jump a couple of seconds in the next row and begin recording time normally from there. When you are looking at your data, delete the first row (with the near 0 time), then make a new column where you calculate the difference between the first recorded time after the jump and the current time in each row in order to get the elapsed time starting from 0.
Extract the part of the data that demonstrates the step response of interest. Your plot should show only show the period of time around the step transition in motor thrust.
Next, convert the pressure sensor voltages to depth measurements. Use the pressure sensor calibration equation you determined in section 7 to do this conversion. Then plot depth vs time for both transient response curves. Add the step response plots to your submission sheet (Questions 4 and 5)
9. Oscilloscope Tutorial
If you were not checked off for the instructor oscilloscope quiz at the end of P2C, please do so now.
The oscilloscope tutorial is linked again here. Watch the oscilloscope tutorial video, complete the partner quiz and the instructor quiz. Mark that these items are marked as completed in your submission sheet by an instructor or proctor (Question 6).
10. Clean Up
To complete the practicum please
· Remove the top spring from your robot and re-attach the 6.5” PVC pipes with foam
· Return the top spring to the central table supply in your lab room
· Please dry and store your robot with box and PCB in your designated cabinet. Store them in the proper vertical position please!
· Empty your graduated cylinder in the sink
· Return all tools and adapters from the gray box to the gray box
· Hang all cables neatly on the rack on the side of your workstation
· Be sure the power supply is off
· Clean up any debris from your workstation
· Please leave the graduated cylinder, tubing, meter stick, and practicum manual at your workstation
· Remember to submit your submission sheet!
10. References
1. Instructions for extending wires: Reference Page
Parts List
Materials Per Station
Robot
Main PCB
Breakout PCB
Graduated cylinder
Tubing
Meter stick
Power supply
Multimeter
Software
E79_F19_Controller.llb
Centrally Available
Robot top spring
Foam floats
Velcro
P2C Ribbon Cable
Ziptie
Weight scale
Electrical tape
Scissors