final report meam 445/446 - mechanical engineering and ... · pdf filefinal report in the...

15
Final Report in the context of MEAM 445/446 Lena Abraham Sebastien Issa Jack McCluskey Robert Parajon Yibin Zhang May 7, 2013 1

Upload: dangthien

Post on 27-Mar-2018

229 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

Final Reportin the context of

MEAM 445/446

Lena AbrahamSebastien Issa

Jack McCluskeyRobert Parajon

Yibin Zhang

May 7, 2013

1

Page 2: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

Acknowledgements

Patrick J. McGinnis PE JDDr. Robert Jeffcoat

Dr. Mark YimDr. Kevin Turner

Peter RockettJoseph Valdez

Page 3: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

1 Project Overview

Team12 s Towne Hall Clock is a rendition of a traditional mechanical timepiece that delivers modern-daytimekeeping accuracy using geared ”works” that would be familiar to a seventeenth-century clockmaker.The device depends on electromechanical systems for the setting, regulating, and winding functions. Whilethe mechanical timekeeping system will keep precise time, periodic electronic regulation permits a level oflong-term accuracy and stability comparable to a fine all-electronic clock.

2 Design overview

Mechanical Elements

Pendulum and Escapement

Traditional mechanical clocks rely on a variable yet fundamentally consistent planetary gear system inter-faced with an escapement mechanism, which transfers energy to timekeeping element. For the timekeepingor pacing element, the swinging pendulum was chosen over the torsion pendulum because of its reliability,versatility and ease with which it can be fabricated and tested. The pendulum consists of a threaded 3/8shaft with pitch 16, a threaded cylindrical bob, and threaded connection. It has a period of 2 seconds. Theswinging pendulum is suspended from a suspension spring fashion from cold-rolled steel strips sandwichedbetween two aluminum plates. The suspension spring has a stiffness of approximately 10N/m.

Mechanical movement is enabled by a planetary gear system interfaced with a Graham Deadbeat escapement,which has no recoil. This 30-tooth escape wheel is powered by a drop weight system through the gear trainand imparts energy to the pendulum through the pallets and anchor piece. The pallets rock back forth,allowing the escape wheel to rotate one tooth at a time. The escape wheel and anchor piece are both watercutout of quarter-inch Aluminum-6061.

Gear Train

All gears in the gear train are fabricated with a diametral pitch of 10 and pressure angle of 20 for consistency.

1

Page 4: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

The planetary gear system is the heart of the clock. This immediate system consists of three planetary gearsthat revolve around a single sun gear, a Y-bar that connects them, and an outer doubly toothed ring gearthat is fixed in place during the normal functioning of the clock, and rotated by continuous rotation servomotors to reset the time after each hour. The Y-beam rotates once every twelve hours. The sun gear has 12teeth, the planetary gears have 60 teeth each, and the ring gear has 132 inner teeth.

Weight Power System

A 60-100 N force needs to be applied through the drive train to the escapment, so that the escapement gearpushes the pendulum with each swing. The weight power system uses two drop weights (grey triangles) anddrives a gear (purple), which runs the rest of the clock, in a clockwise direction. The top two sprocketsare prevented from rotating because the motor attacheed to the red sprocket is not back-drivable. As thelarger weight is being rewound, the smaller weight will fall, but the weight difference will continue drivingthe running gear (purple) in a clockwise direction.

2

Page 5: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

Electronics

Control is executed through the Netbook and microcontrollers. The netbook runs on a 60Hz alternatingcurrent signal from a wall outlet and provides an easy user interface to set parameters for time correction,weight rewind, and dial specifications.

Time Adjustment

To adjust time, a 128-count rotary encoder determines the position of the clocks minute hand, measureshow far it must travel to complete the hour, and sends a signal to the netbook. The netbook calculates howmuch the ring gear of the planetary gear system has to rotate to correct the time, and executes the timecorrection for each hour using three servo motors.

Weight Rewind System

As the weight power system runs, eventually the small weight raises to the height of the purple drive gear.At this point a 47 point/rev digital encoder tracks the center, purple gear indicates the netbook matlab codethat the weights need to be rewound. The 12V DC motor then rotates counterclockwise until the heavyweight is even with the purple drive sprocket, and this rotation is a known distance that can be measuredby the microcontroller.

3

Page 6: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

Secondary Dials

Moon Dial

A lunar month is 29.530587963 days. To achieve this ratio starting from the shaft that rotates once pertwelve hours, a three-step gear reduction with the following ratios were proposed: 56/12: 38/12: 48/12.This ratio results in a lunar month of roughly 29.55 days, giving an error of less than 0.001%. The face ofthe moon dial depicts the 28 different phases of the moon, fabricated from black and white acrylic.

Weather Dial

dial.png

The weather dial has two servo-powered hands that indicate both the current weather condition and tem-perature in Philadelphia.The upper hemisphere of the acrylic dial face indicates five different weather con-ditions: rainy, stormy, sunny, cloudy, and snow/hail. The lower hemisphere depicts a temperature rangein both Celsius and Fahrenheit. This information is gathered in real time from Weather Underground(http://www.wunderground.com/) through a custom Application Programming Interface (API) and parsedthrough a series of Matlab commands to determine the angle through which the servo should rotate. Theservos are interfaced with the hands through a series of gears and concentric brass tubes. All of the scriptsused for this dial can be found in Appendix A.

4

Page 7: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

Weasley Dial

The Weasley dial indicates the status of the CETS office, SEAS library, Pottruck Fitness Center, SEASWalk-in Advising and arrival times of the Penn Bus East at its 34th street stop. It operates by meansof five different concentric tubes and five individual servo motors interfaced with an Arduino microcon-troller. The microcontroller retrieves information from online. Team 12 has created a Gmail account([email protected], Password: arduinouno) with a Google calendar that includes all of thecompiled opening times to create a simple user interface for future individuals to access. A python script(Appendix A) is used to authenticate and retrieve information from the Google Calendar API. Several Matlabcommands are then used to call the python script and communicate with the Arduino microcontroller.

Materials

Acrylic: Gears and the backboard were fabricated out of acrylic , which could be cut easily using MEAMlaser cutters.80/20 shafts: The structural frame of the clock consists of 80/20, a light yet extremely reliable material.Aluminum: lightweight and easy to cut, all-purposeSteel: Steel shafts are used for strength and resistance to welding.Brass: Brass bushings are coupled with aluminum shafts in areas of higher radial pressure because brass,along with steel, is able to withstand welding against aluminum.

3 Testing and Prototyping Results

Gear Train

The entire gear train was prototyped before the final assembly of the clock in order to demonstrate thatthe laser cut acrylic pieces were indeed able to mesh together and provide sufficient movement, dispite

5

Page 8: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

inaccuracies caused by factors such as acrylic thickness variability and kerf. The full scale prototype alsotested the shaft spacers and locking collars. The original design called for a single press-fit spacer thatwould lock the gears in the correct spacing along the shafts. However, the laser cutter was unable to cutout consistent tolerances for the bore hole which interacts with the shafts that the gears are mounted to.Another aggravating factor was that the shaft diameters had a rather wide tolerance range. They werenominally diameter, but according to Mcmaster-Carr they had a diameter tolerance of +/- 2mm. Theseshafts were purchased over the high-precision shafts because of cost considerations.

The fabrication of the full scale gear train prototype had mixed results. The kerf of the lasers was smallenough to allow adequate meshing of the gears to allow smooth spinning. However, the spacers previouslydesigned needed to be redesigned to allow for the differences in tolerances along the shaft and in the borehole on the laser cut spacers. The spacers were redesigned with a 3-bolt hole which would couple with anidentical bolt hole on the gears. Set screws were inserted into the spacers to tighten them on the shafts.This system proved to be much easier to work with and much more reliable. This redesign was only madepossible after the initial prototype.

Possibly the largest concern was placement of each individual piece of the entire gear train. After compilingthe assembly in Solidworks, it was found that the branched gear train leading to the moon dial was unableto fit in the body of the clock without shafts piercing through gears. Therefore the moon dial was put asidein favor of prioritizing the main time dial.

Pendulum and Escapement

The compound pendulum consists of a shaft, bob, aluminum interfacing block and suspension spring. Theunlikelihood of approximating such a system with a simple-pendulum mathematical model led to a seriesof tests during which the pendulum was simply hung in place, and given an initial impulse. The period ofthe pendulum was recorded with a timer. Both the damping of the pendulum and period were recorded,and the threaded bob was adjusted accordingly. During testing day, the period of the pendulum was about1.93 seconds rather than a perfect 2.0 seconds due to the violent transportation of the structure from TowneBuilding to Houston Hall.

The escape wheel, despite being custom made, was rougher than expected and had to be sanded down inorder for the gear train to exhibit synchronized motion.

Weight Drop System

The weight drop system was an element of novelty of the clock. It was prototyped twice before the finalassembly in order to test out the concept; first with Lego pieces and then mounted to a piece of plywoodstock. The system was observed to work as intended. Nevertheless, more testing could have been done todetermine the shear forces exerted by the weights when they are attached to a more fragile acrylic gear train.

Structure and Frame

The 80/20 shafts proved to be a good investment for the supports and frame of the clock. Full assembly ofthe entire system also highlighted another failing of the original design: the two-dimensional frame had nostructural supports in the front or back, making it extremely difficult to relocate the clock. Simple diagonalsupports were easily constructed and attached to the back of the clock, improving stability and enabling itstransport both outside and inside Towne building.

6

Page 9: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

Electronics

The Arduino Uno and Duemilanove were tested individually on the Acer Aspire Netbook. All motors wereconnected to the microcontrollers and ran simple scripts to check that they worked according to specifications.

Requirements Compliance

The initial goal for the Towne Hall Clock was to create a working clock that would blend traditional horologywith modern electromechanical elements for accuracy and novelty. The key requirements included:

-Accurate Timekeeping-Aesthetic Appeal-Mechanical Elements are Apparent-Element of Novelty Present-Within Size and Budget Constraint

And more detailed functionality requirements are as follows:

Proposed Improvements

Team 12 faced organizational and scheduling challenges throughout this project. Stricter deadlines shouldhave been adhered to, namely for the keystone steps, having a complete CAD drawing in Solidworks and

7

Page 10: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

having a fully-fabricated prototype.

To elaborate on the former step, the initial goal was to have a complete Solidworks drawing of the clockmuch earlier in the semester. Nevertheless even with a CAD drawing, only the initial assembling of the clockwas able to highlight the number of unanticipated flaws that could arise in such a project. Unfortunately,Solidworks is unable to take into account the mass of objects, kerf from the laser-cutter, and the effect ofshear forces at object interfaces. Nor is the Solidworks software ideal for assemblies with several hundredparts, which is the case in this project. The software would often freeze or slow down when creating the fullassembly.

Given that most of the components in the gear train are composed of laser-cut acrylic, the pieces could havebeen marked before cutting to indicate the kerf levels on both sides and potentially mesh the gears moreclosely together. Next, if the budget had been higher, it may have been prudent to invest in tougher materialto create the gears because the force exerted by the weight-drop system managed to shear the acrylic gears.

Novelty aspects of the clock, the time reset and weight drop systems, should have been fabricated in combi-nation with the rest of the assembly much earlier to test how they work, or identify fatal flaws.

Time permitted, the team would have chosen to use printed circuit boards (PCBs) rather than simpleprototyping boards with far too many wires emerging.

One definite place for change would be the manufacturing of the escapement and pallet. Due to the difficultyof manufacturing, this component had to be outsourced to a company for water jet cutting. The company thatmanufactured the part, BigBlueSaw.com, had excellent reviews, reasonable pricing, and a fast turnaroundtime. However, the product that was received was not good enough for the clock. Their website promisedsmooth edges and near polished cuts, but the reality was that our escapement and pallet were covered in tinyridges, bumps, and notches that made smooth interaction between them nearly impossible. When originallyplaced into our final assembly, the pendulum could not even overcome the force of friction and thus thesystem could not run. After countless sanding sessions and sandblasting the sanded parts, the clock wasfinally able to tick, but still was not good enough. If given the chance, our team would have liked to choosea better method of manufacturing the escapement and pallet. A CNC Milled escapement and pallet wouldhave likely been a better choice, but would have likely increased the cost.

Another area of change should be in selecting high precision tolerance shafts and bushings. The build up oftolerances on our gear shafts coupled with the bushings they were rotating in caused an immense amountof friction in our system. Therefore the bushing which were placed to remove friction in the rotation shafts,actually proved to do the opposite. By the time we had discovered this, it was too late and too expensiveto fix. In a system as precise as a clock, it is important to keep track of tolerances and thus we recommendpurchasing all components with the lowest possible tolerances possible.

A small alteration that could be made to the base is the usage of omni-direction wheels, which would greatlyfacilitate transportation.

4 Scripts

Weather Dial

\\

fullURL = [’http://api.wunderground.com/api/0460e54cb7dcadd4/hourly/q/’ ...

’PA/Philadelphia.json’];

weather_site = urlread(fullURL);

temps = findstr(weather_site, ’"temp": {"english": "’);

8

Page 11: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

% condition = findstr(weather_site,’"overcast", "clear", "rain", "snow", "hail"’);

condition_start = findstr(weather_site, ’"icon": "’); %looks for the first line that describes the condition

condition = {weather_site(condition_start(1)+9:condition_start(1)+12)}; %copies the first four letters of the current condition

cloudy = {’over’, ’clou’,’part’, ’most’,}; %lists of possible first four letters of cloudy conditions

sunny = {’sunn’, ’clea’};

thunderstorms = {’thun’};

snow = {’hail’, ’snow’};

rain = {’rain’,’chan’};

C1= strmatch(condition,cloudy); %returns a number if the conditions matches any of the cloudy conditions

C2=strmatch(condition,sunny);

C3=strmatch(condition,thunderstorms);

C4=strmatch(condition,snow);

C5=strmatch(condition,rain);

cloudy=0;sunny=0;tstorms=0;snow=0;rain=0;unknown=0;

if ~isempty(C1)

cloudy = 1;

elseif ~isempty(C2)

sunny = 1;

elseif ~isempty(C3)

tstorms = 1;

elseif ~isempty(C4)

snow = 1;

elseif ~isempty(C5)

rain = 1;

else

unknown = 1;

end

%%

%Temperature in 1 hour

temp_hour_1_str = weather_site(temps(1)+21:temps(1)+23);

if (temp_hour_1_str(2)) == ’"’ %In case the temperature is single digit

temp_hour_1 = str2double(temp_hour_1_str(1));

else if (temp_hour_1_str(3)) == ’"’ %If temp is double digit

temp_hour_1 = str2double(temp_hour_1_str(1:2));

else if (temp_hour_1_str(3)) == ’"’ %If temp is triple digit

temp_hour_1 = str2double(temp_hour_1_str(1:3));

end

end

end

TF=temp_hour_1; %current time in F

TC= (TF-32)./1.8; %current time in C

%encoder temp range for philly:

9

Page 12: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

% F: 0-120

% C: -10-50

deg_TF=3*TF; %degrees hand should travel from start for each temp

deg_TC=6*TC;

%% create arduino object and connect to board

a=arduino(’COM9’); %change COM value

%% servo motors

runArduino=true;

a.servoAttach(9); % temperature

a.servoAttach(8); % weather condition

%a.motorSpeed(9,200);% sets speed of motor 9 as 200/255-need this?

% condition = [cloudy sunny tstorms snow rain unknown];

while runArduino

val9=a.servoRead(9);% reads angle from servo on pin #9

val8=a.servoRead(8);% reads angle from servo on pin -- for weather condition

if val9~=deg_TF

a.servoWrite(9,deg_TF-val9); % rotates servo on pin #9 to indicate temp

end

for i=1:6

if condition(i)~=0

position=(i-1)*60;

rot=position-val8;

if rot<0

a.servoWrite(8,-rot);

else

a.servoWrite(8,rot);

end

end

end

% if val2 ~=deg_TF

% a.servoWrite(8,deg_TC-val8); % rotates servo on pin #9 to indicate temp

% end

pause(900); %pause 15 mins, then continue executing

end

\hline

Reset Time

a=clock();

hour=a(4); min=a(5); sec=a(6);

%% servo motors

%only need one motor to reset time

%///figure out gear multiplier

a.servoAttach(5); % attach servo on pin

val5=a.servoRead(5);% reads angle from servo on pin #9

10

Page 13: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

if val5 ~= sec*6

diff=sec*60-val5;

a.servoWrite(5,diff); %rotate servo to make up the difference

end

Weasley Dial

system(’sample.py’);

import gflags

import httplib2

import logging

import os

import pprint

import sys

from apiclient.discovery import build

from oauth2client.file import Storage

from oauth2client.client import AccessTokenRefreshError

from oauth2client.client import flow_from_clientsecrets

from oauth2client.tools import run

FLAGS = gflags.FLAGS

# CLIENT_SECRETS, name of a file containing the OAuth 2.0 information for this

# application, including client_id and client_secret.

# You can see the Client ID and Client secret on the API Access tab on the

# Google APIs Console <https://code.google.com/apis/console>

CLIENT_SECRETS = ’client_secrets.json’

# Helpful message to display if the CLIENT_SECRETS file is missing.

MISSING_CLIENT_SECRETS_MESSAGE = """

WARNING: Please configure OAuth 2.0

To make this sample run you will need to download the client_secrets.json file

and save it at:

%s

""" % os.path.join(os.path.dirname(__file__), CLIENT_SECRETS)

# Set up a Flow object to be used for authentication.

# Add one or more of the following scopes. PLEASE ONLY ADD THE SCOPES YOU

# NEED. For more information on using scopes please see

# <https://developers.google.com/+/best-practices>.

FLOW = flow_from_clientsecrets(CLIENT_SECRETS,

scope=[

’https://www.googleapis.com/auth/calendar.readonly’,

’https://www.googleapis.com/auth/calendar’,

11

Page 14: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

],

message=MISSING_CLIENT_SECRETS_MESSAGE)

# The gflags module makes defining command-line options easy for

# applications. Run this program with the ’--help’ argument to see

# all the flags that it understands.

gflags.DEFINE_enum(’logging_level’, ’ERROR’,

[’DEBUG’, ’INFO’, ’WARNING’, ’ERROR’, ’CRITICAL’],

’Set the level of logging detail.’)

def main(argv):

# Let the gflags module process the command-line arguments

try:

argv = FLAGS(argv)

except gflags.FlagsError, e:

print ’%s\\nUsage: %s ARGS\\n%s’ % (e, argv[0], FLAGS)

sys.exit(1)

# Set the logging according to the command-line flag

logging.getLogger().setLevel(getattr(logging, FLAGS.logging_level))

# If the Credentials don’t exist or are invalid, run through the native

# client flow. The Storage object will ensure that if successful the good

# Credentials will get written back to a file.

storage = Storage(’sample.dat’)

credentials = storage.get()

if credentials is None or credentials.invalid:

credentials = run(FLOW, storage)

# Create an httplib2.Http object to handle our HTTP requests and authorize it

# with our good Credentials.

http = httplib2.Http()

http = credentials.authorize(http)

service = build(’calendar’, ’v3’, http=http)

try:

print "Success! Now add code here."

events = service.events().list(calendarId=’primary’).execute()

while True:

for event in events[’items’]:

print event[’summary’]

page_token = events.get(’nextPageToken’)

if page_token:

events = service.events().list(calendarId=’primary’, pageToken=page_token).execute()

else:

12

Page 15: Final Report MEAM 445/446 - Mechanical Engineering and ... · PDF fileFinal Report in the context of MEAM 445/446 Lena ... a variable yet fundamentally consistent planetary gear system

break

except AccessTokenRefreshError:

print ("The credentials have been revoked or expired, please re-run"

"the application to re-authorize")

if __name__ == ’__main__’:

main(sys.argv)

\hline

5 Expenditures

The Towne Hall Clock team consists of five members, each bringing in $300, giving a total budget of $1500.

Table 1: Total Expenditures

Item Quantity Total Cost

ANSI Roller Chain 1 28.24Poster 1 57.00

ANSI connecting lunk 3 2.61DC Gearmotor, 12 VDC 4 RPM 1 42.03

Flat Sprocket 3.14”OD 1 20.15Flat Sprocket 5.86”OD 1 28.31Idler Sprocket 2.98”OD 3 68.94

Acer Aspire One 1 241.99Crucial 2GB DDR3 RAM 1 12.98

Medium Duty Suspension Spring 1 15.99Heavy Duty Suspension Spring 1 10.99

Arduino Uno 1 30.0080/20 Extrusions UNK 220.20

Castor Wheels 1 4.52Wheel Bolts Pack of 20 10.28Frame Bolts Pack of 20 13.12Wheel Nuts Pack of 20 4.40

Black Acrylic misc 25.001/2”D Shaft 1 35.13

Suspension Spring Metal 1 26.00Escapement Custom 1 145.73

Fully Keyed Drive Shaft 3/8”OD 1 44.35Aluminum Inch T-slotted Framing System Tee 4 30.32

Aluminum Inch T-Slotted Framing System Bracket 4 18.24Rotary Encoder 2 6.64

Mini Metal Gearmotor 3 34.21COBY Digital Photo Keychain 1 17.38

TOTAL EXPENDITURES $1194.75

13