Gyro-Stabilized Mobile Platform
Total Page:16
File Type:pdf, Size:1020Kb
Gyro-Stabilized Mobile Platform
Memorial University of Newfoundland Faculty of Engineering & Applied Science
Engr 4933: Electro-Mechanical Systems Term Project Report
Instructor: Dr. Nicholas Krouglicof Group Members: Dennis Cluett Chris Laporte Darryl Parsons Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
Allan Hussey Date: August 6, 2007
TABLE OF CONTENTS
Page # 1.0 INTRODUCTION AND OBJECTIVES...... 2 1.1 Introduction………………………………………………………………. 2 1.2 Objectives………………………………………………………………... 2 1.3 Project Proposal………………………………………………………….. 3 2.0 SPECIFICATIONS AND DESIGN…………………………………………. 5 2.1 System Design and Iterations…………………………………………….. 5 2.2 Integration of Platform and Vehicle……………………………………... 9 2.3 Trade-offs………………………………………………………………… 12 3.0 OVERVIEW OF FINAL SYSTEM………………………………………….. 13 3.1 Hardware…………………………………………………………………. 13 3.2 Software………………………………………………………………….. 16 3.3 Equipment used…………………………………………………………... 16 4.0 DIFFICULTIES ENCOUNTERED...... 5.0 RECCOMENDATIONS……………………………………………………... 6.0 CONCLUSION……………………………………………………………….
Appendix A – Source Code
- 2 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
1.0 INTRODUCTION AND OBJECTIVES
1.1 Introduction
Our team of anxious students embarked on a mission to create a platform that
could be automatically stabilized in a relatively short amount of time. We started
with a simple list of course objectives and decided this project would fulfill said
objectives and we could have fun doing it. The simple objectives turned into a
huge project that required all of us to give our all to complete it in time.
The design process began with a brainstorming period at which time we decided
that the system we would develop should solve a real life problem, thus making it
viable for marketing and more relevant to true engineering design. We found a
few instances in which our product could be used. A couple of which could be
transporting materials that must be kept horizontal (e.g. Casket), or being used as
a form of stabilization for photography equipment.
1.2 Objectives
In order to achieve our desired outcome from the problem posed we have made
some objectives which must be completed along the way for our project to
become a success. First and foremost, the final design must work properly and
stabilize in a horizontal plane. Next, it must do this in a reasonable amount of time
to be a viable option. There should be no input required from the user, it must be
- 3 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933 completely automated. It must be constructed using common electronic equipment available to us at the university.
1.3 Project Proposal
We were required to complete a project proposal early on in the development process to determine if we were heading the right direction with our projects.
Ours proposal is here below:
Team Name: CADD
Team Members: Dennis Cluett
Chris Laporte
Darryl Parsons
Allan Hussey
Project Title: Gyro-stabilized Mobile Platform
Project Proposal (Memo format)
TO: Prospective Customers
FROM: CADD Mechanical Engineering Students at Memorial University
DATE:Current Date: Friday May 11, 2007
Completion Date: July 2007
SUBJECT: Project Proposal for Gyro-stabilized Mobile Platform
- 4 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
PURPOSE:
To create a Mobile Platform that will remain stable while traveling on unstable terrain. This memo is to inform you of the details pertaining to the construction and implementation of our project.
DISCUSSION:
The gyro stabilized mobile platform is a system that allows a surface to remain level while the foundation is rotating. This system will allow for goods of volatile nature to be transported safely with minimal disruption. It has potential in industries such as the automotive sector for providing superior driver comfort or for automatic leveling of large structures with sinking foundations. The proposed system derives its stability from a gyro sensor mounted to the platform. This gyro then relays a signal to the micro controller which, in turn, can control four small hydraulic actuators. This allows for a sort of “floating platform” that can compensate for rotation.
JUSTIFICATION:
The gyro stabilized mobile platform is a system which can be used for many different purposes. Ultimately seeking transportation purposes to provide further safety and caution to dangerous and volatile loads. This platform can also be used for everyday consumer use where it provides a smoother and more balanced ride.
DELIVERABLES
The demonstration will include the small gyro stabilized mobile platform being used with a small remote control car. We will demonstrate how the vehicle can travel over rough or uneven terrain, but still keep the overhead platform level with the use of hydraulic actuators.
- 5 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
2.0 SPECIFICATIONS AND DESIGN
2.1 System Design and Iterations
Our very first idea was to use a hydraulically actuated platform and an
accelerometer for stabilization, but that was quickly shot down when we realized
how heavy and large our prototype would have to be, it was just not feasible. We
then came up with the gimbal idea for stabilization. This seemed to be very
promising, in theory, so we went with it.
The first step in the making of the stabilized platform after we had our ideas
developed was making a cardboard prototype to be able to see and test fit all our
dimensions.
- 6 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
Once the cardboard model was made we were able to see where the stepper motors would go and determine how much lower we could make the gimbal to the ground to lower the center of gravity. Also the model helped us to make design changes to how the motors would connect to the gimbal.
Where the gimbal would be small and need to be precise for all the pieces to fit properly it was decided that it would be made using the FDM (fused deposition modeling) machine. We used Solid Works to create the models of all our pieces and we even used the assembly mode within the program to make sure that the new changes to the model would not interfere with any other piece. The assembly also helped to make sure that the gimbal could rotate 45 degrees from the horizon in the two axes.
Top Platform
- 7 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
Middle Section
Base
- 8 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
Once all the 3 pieces were made they were assembled and tested for their limits of rotation within Solid Works.
- 9 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
The three pieces were completed by the FDM machine and once cleaned up they were fitted together with the motors attached. It was noticed that a counter weight was needed to balance to weight of the top stepper motor so an equivalent mass was made in the machine shop from brass and attached to the model.
2.2 Integration of Platform and Vehicle
The next step in the design was the vehicle the gimbal apparatus was going to be mounted to. A remote control truck was purchased from circuit city and the top was taken off the chassis. The body mounts were then used to attach a platform on top of the chassis for all of our components to fit on.
After the platform was built and securely fastened, all the electrical components along with the gimbal were fitted and attached to the car as one assembly.
- 10 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
- 11 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
- 12 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
2.3 Trade-offs
In our design process we were forced to make a few trade-offs in order to make our product viable. Firstly, we had to be able to run the prototype long enough to make some videos and to sufficient testing, without having to recharge the battery multiple times. We chose a fitting battery and removed some non-essential components from the vehicle to solve this. Another trade-off made was the speed of stabilization vs. our load capacity. We could move quickly, but have very low torque. We found the balance and are happy with its performance. The final trade- off was speed for precision. We had to average many values being returned from the analog to digital converter. We could get a more precise reading if averaged over many hundreds of values, but that would again cause our reaction time to be less than overwhelming. We found a good balance between speed and precision where our stabilization algorithm performs and meets our expectations.
- 13 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
3.0 OVERVIEW OF FINAL SYSTEM
3.1 Hardware
PIC Microcontroller: The microcontroller is the brains of our systems. It reads
the values given from the accelerometer. It then performs
the stabilization algorithm and sends the correct rotation
direction and number of steps to the appropriate stepper
motor.
H Bridge: We needed to run two stepper motors, but the board we
were using only had one port so we used an additional H
Bridge wired to port D on the microcontroller board.
Voltage reference: This component was not required but gave us a much
steadier value from the accelerometer. It was used to
provide the power supply of 2.5 V to the accelerometer,
and since the output is reliant on the input we wanted to be
as precise as possible. Below are the Microcontroller board
and H Bridge.
- 14 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
Stepper Motors: We needed two stepper motors – for the x and y axes. The
motor mounted to the base would need a lot more torque
than the upper one since it would be rotating the entire
gimbals setup. We found the appropriate motors through
testing and they work great.
- 15 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
Accelerometer: This is the sensor we used to get
our angle of rotation about each
axis. The PIC would then
determine what the stepper motors
would have to do to get the
platform back to horizontal.
Battery: We chose a 12V battery for our
power supply because it was
possible to run everything from it,
except the accelerometer which had its own 2.5V reference.
RC Car: We chose a car that would have enough power to drive with
all of the equipment loaded on it. The first one did not so
we have to get one with more torque to handle the load.
- 16 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
3.2 Software
This was one of the more problematic parts of our project. We had to find a balance between all of the variables so we got the proper precision, speed and torque. Once we chose our hardware components, the rest was up to the software.
Firstly, the system is initialized in the horizontal position and those readings are taken and saved. From then on all values from the accelerometer are compared to the initial values and thereby determine which way each motor should turn, or if they should not turn at all.
To achieve the desired result of a reasonably fast stabilization that is accurate we had to spend quite a bit of time fine tuning the delays in our system. Another big issue was with the number of values to average over a certain time period in order to get and accurate reading from the accelerometer. A higher resolution accelerometer with a shorter range would have helped in this area. The final source code is included in Appendix A of this report.
3.3 Equipment Used
Various pieces of equipment and tools were used. Here’s a list of most of them.
Screwdrivers, Nuts and Bolts, Soldering kit, Wire strippers, Drill press, Lathe,
Metal chop saw, Multimeter, Vernier calipers, Band saw and Weight scale.
- 17 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
4.0 RECOMMENDATIONS
With the limited time and money to spend on this project we were not able to do everything ideally. That being said we have a few recommendations we would like make to be implemented in future work for this project.
Firstly, we used very common and cheap stepper motors. We could have gotten more expensive motors which were more compact, lightweight and used mircostepping. This would have decreased the amount of torque required and therefore we could have sped up the stabilization process by decreasing our delays. Microstepping would have reduced the amount of bounce between steps.
Another change that would increase the stability of our system would be one to the vehicle carrying the platform. We have it currently installed on a small RC car. This car has a soft suspension and has no throttle control. This means when you start from rest there is a big rotation of the base just from acceleration, causing the platform to react accordingly. If, however, we installed it on a vehicle with a longer wheelbase or stiffer suspension we would get as much rotation of the base, giving us better stabilization.
Finally, one of the biggest issues was with the accelerometer we used. It is rated for up to three G’s which is much larger than what our vehicle is experiencing. If we were to use an accelerometer with a much smaller range, but a much greater resolution, we would not have to average our current output over hundreds of values. It would then be able to react much faster.
- 18 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
5.0 CONCLUSION
Overall this project was a success. The project goals were meet within the set time lines and a great deal was learned by this group. The purpose of this project was to design and implement an automatically controlled stabilization system. This system would have to stabilize within a reasonable time period and should have no accumulating error over time. We achieved what we set out to do and this was successfully displayed in front of our Electro Mechanical Systems class during our final presentation.
Through the design process we have gained much valuable insight into true engineering design, which will be crucial in our success as professional engineers. The outcome of our project has been a major success, and after all of our experimentation, analysis and research believe that our project has great market potential. With more time and resources, this project could be developed into a commercial venture.
- 19 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
Appendix A – Source Code
#include<16F877.H> #device adc=10; //Set ADC to 10 bit #fuses HS,NOWDT,NOPROTECT,NOBROWNOUT,NOPUT //Configuration Fuses #use delay(clock=20000000) //20Mhz Clock #use rs232(baud=9600,xmit=PIN_c6,rcv=PIN_C7,PARITY=N,BITS=8) #use FIXED_IO(B_outputs=PIN_B4,PIN_B3,PIN_B2,PIN_B1) #use FIXED_IO(D_outputs=PIN_D3,PIN_D2,PIN_D1,PIN_D0) #org 0x1F00,0x1FFF{} //Reserve Memory for Bootloader signed int16 initx = 0; signed int16 inity = 0; signed int16 sumx = 0; signed int16 sumy = 0; int16 n = 0;
BYTE const step_numberD[4] = {0b00001010, 0b00001001, 0b00000101, 0b00000110}; signed int8 stepD; //Holds current step for step_numberD table. BYTE const step_numberB[4] = {0b00010100, 0b00010010, 0b00001010, 0b00001100}; signed int8 stepB; //Holds current step for step_numberB table. void main() { puts("PIC16F877 - ADC Test\r\n"); //Print a message to serial port PORT_B_PULLUPS(True);//Enable internal Pullup resistors on Port B stepD = 2; stepB = 2; setup_adc_ports(all_analog); //set ports A and E to analog. setup_adc(ADC_CLOCK_DIV_32); //Set ADC conversion speed
// Initialize the x,y,z axis to read zero when horizontal. set_adc_channel(0); //set ADC channel to 0 (x axis). delay_us(21); initx = read_adc(); set_adc_channel(1); //set ADC channel to 1 (y axis). delay_us(21); inity = read_adc();
while (true){ for (n = 0; n<75; ++n) { set_adc_channel(0); //set ADC channel to 0 (x axis). delay_us(20); sumx = read_adc() - initx + sumx; set_adc_channel(1); //set ADC channel to 1 (y axis).
- 20 - Gyro-Stabilized Mobile Platform Electromechanical Systems 4933
delay_us(20); sumy = read_adc() - inity + sumy; } sumx = sumx/75; // get average over 1000 intervals sumy = sumy/75;
// Move one step in the x axis if (sumx>0){ stepD = ++stepD;//increment position in step sequence. if (stepD > 3) stepD = 0; OUTPUT_D(step_numberD[stepD]);//send step to port B. delay_ms(5); } if (sumx<0){ stepD = --stepD; if (stepD < 0) stepD = 3; OUTPUT_D(step_numberD[stepD]);//send step to port B. delay_ms(5); }
// Move one step in the y axis if (sumy>0){ stepB = ++stepB;//increment position in step sequence. if (stepB > 3) stepB = 0; OUTPUT_B(step_numberB[stepB]);//send step to port B. delay_ms(5); } if (sumy<0){ stepB = --stepB;//increment position in step sequence. if (stepB < 0) stepB = 3; OUTPUT_B(step_numberB[stepB]);//send step to port B. delay_ms(5); } } }
- 21 -