Sunteți pe pagina 1din 17

ELE604:SensorsandMeasurement

IntelligentInstrumentationforMeasurementof
ForceandDeflectionAngle
ofaCantileverBeaminrealtime
By:
VipulPotluri(052443942)&RedwanSyed(040769408)
Prof:JamesSmith&TA:Mehrnaz
SubmissionDate:17thApril,09


Abstract:

The major project is to build an Intelligent Instrumentation for Stress and


DeflectionAngle measurements of a Cantilever beam in realtime. The main
components involved in this project were the MEMSIC 2125 chip in order to
measure the deflectionangle and a Strain Gage for the force measurement. The
most important device for the project was the MC68HC11 microcontroller, which
wassolderedandputtogetherasthefirstpartoftheprojectalongwithdesigning
threeswitchesandLEDstodisplayeachofthemeasurements.Thesecondpartof
the project was to understand the logic behind the accelerometer and to come up
with the proper algorithm for the code. The next step was to design, simulate and
implementastructureforthecantileverbeamtoconvertforcetovoltage(Analog
Digital) in order to measure the force hanging on the beam. The final part of the
projectwastocombineallthreeelementsoftheprojecttomakeafinaldesignina
box displaying the appropriate force, angle or even both according to the user by
selecting the corresponding switch with flashing LEDs. . The sensitivity of the
potentiometer was taken in to account for the minor error in force measurement,
which was almost resolved by the capacitors used for noisereduction. Also, the
pulsewidthforthesignalintheMEMSICwasnotexactly10ms,whichcausedavery
smallerrorintheanglemeasurement.Thisprojectresultedasamajorsuccesswith
minor errors and also with a refresh time of less than 30ms for both force and
deflectionangle.

Objective

The purpose of this project was to analyze, design, simulate and implement an
efficient device based on the MC68HC11 microcontroller for force and deflection
anglemeasurementusingaCantileverbeaminrealtime.Thefirststepaftertesting
the microcontroller was to design three switches and LEDs flashing every half a
second.Thiswasdesignedinsuchawaythatthehalfseconddelaywouldnotaffect
therefreshratefortheprogram.Thenextpartwastowriteanalgorithmforangle
measurementusingaMEMSIC2125accelerometerwitharesolutionof0.2degrees.
This followed by implementing a design for the cantilever beam to measure the
forcewithamaximumof+2%error.Therefreshtimewasmadesuretobelessthan
30ms with the help of interrupts and an efficient algorithm for the LEDs to blink.
Thefinalstepwastocombineallthreepartsandtodisplayforce,angleorbothby
selectingthecorrespondingswitch.

*ReferencesavailableinAppendixA

Introduction

The microcontroller is considered a fundamental building block in electronic


technology. A microcontroller was initially not a good tool because its costs
overshadowed its advantages, but with the emergence of CMOS Integrated Circuit
(IC)technology,thesignificanceofthemicrocontrollerwasrecognized.Thisproject
required using an IPB board with a Motorola 68HC11 microcontroller and its
appropriategluelogic.Thedigitalsignalprovidedbythemicrocontrollersplaysa
significant role in modern instrumentation designs replacing analog signal
processing. The reliability and flexibility of the microcontrollers made the
instrumentverypopularinalltheelectronicdevices.

The MEMSIC 2125 accelerometer was used for the angle measurement in this lab.
This device contains a thin, heated air bubble within it. Tilting or moving the
accelerometer changes the position of the air bubble within the device changed
accordingly. Very sensitive internal temperature sensors that output a pulse
waveform corresponding to the movement detected with the movement of the jig.
When the accelerometer has zero g acting on it, it outputs a 50% duty cycle.
Changes in the acceleration on the device changes the duty cycle accordingly. The
accelerometer is shown in the Figures 1 & 2 below. Figure 1 shows the
accelerometer with 0g acting on it, while Figure 2 shows the tilted accelerometer
wheretherearetworeferenceplanes,namelythexandyaxes.Figure3showsthe
actualMEMSIC2125device.

Figure1*

Figure2*

Figure3*

InordertomeasureforceusingtheIPBboard,acoupleofstrainGageswithabridge
configurationonaCantileverbeamwereimplementedusingaloadcellprovidedby
FUTEK Advanced Sensor Technology. The load cell acted as a transducer and an
analog signal was produced by a change in the force applied to the load cell.
HoweverthesignalproducedbytheloadcellwastoosmallfortheA/Dconverteron
theIPBboardtoread.TheinputrequiredbytheA/Dinputneededtobebetween0
5Vandaconditioningcircuitwasrequiredtomakesurethatthesignalfallswithin
therangeof05V.

*ReferencesavailableinAppendixA


The conditioning circuit was designed and the following components were used:
resistors, potentiometer, instrumentation amplifier (AD620) and a single supply
voltage reference (REF01). The voltage reference was used to provide a constant
reference voltage for other components in the circuit. Using the data sheet of the
REF01 it was found that it would produce a constant stable 10V from a supply
between 1240V. The instrumentation amplifier was used to amplify the signal
producedbytheloadcell.TheinstrumentationamplifierprovidedahighCMRRand
an external resistor, RG, was used to modify the gain. From the data sheet of the
AD620,theformulaforthegainwasfound,[G=(49.4k/RG)+1]*andusedtofind
the value of RG which would provide the gain necessary to output a voltage that
couldbereadbytheA/Dandconvertedintoadigitalreading.

The final part of the project was to operate all the functions according to the
specifications mentioned in the observations and design it in a box just displaying
theLCDalongwiththeswitcheswithcorrespondingLEDs.

Figure4:FinalBlockDiagram

*ReferencesavailableinAppendixA

Theory

TheMotorolaMC68HC11microcontrollerisan8bitmicrocontroller.Itactsasthe
brain of a system and interacts with all of the components, which are connected
shown in Figure 4. The microcontroller can be programmed to perform various
precision tasks such as measuring realtime operations and displaying the
corresponding information onto a LCD screen. It supports many functions such as
ports for interfacing; input capture and output compare lines and a 16bit free
runningtimer.Withinthemicrocontrollerareports,whichsupportdifferentinput
andoutputactions.

Accelerometers,newerversionsoftheMicroElectricalMechanicalSystems(MEMS)
IC technology are devices that contain tilt and motion sensors. These devices are
created without any moving parts. They cost effective and able to withstand high
shocksduringuse.TheMEMSicprovidesconsistentandaccuratemeasurementsof
bothstatic(gravityandtilt)anddynamic(vibrationandmotion)accelerations.The
MEMSic2125devicewasimplementedinthislab,asshowninFigure3.Itgivesdual
signalsXandY,whosepulsewidths,AXandAYweremeasured.Theywereusedin
order to get an angle of 0 180 degrees using the following equation and the
efficientassemblylanguage:
=Tan1(AY/AX)Eq.1*

TheCantileverbeam,asshowninFigure5,isadevicethatcanmeasuretheamount
of stress placed upon it at a certain point and its corresponding deflection angle
with respect to the original unstressed beam. It uses two strain Gages, one on the
top and one on the bottom. When a force is applied, the strain Gage on the top
elongateswhiletheoneonthebottomcompresses.Thiscausesthebeamtobendas
showninFigure6.

Figure5:SimpleCantileverbeam*

Figure6:Cantileverbeamunderstress*

*ReferencesavailableinAppendixA

TheStress()andtheStrain()canbefoundusingEquations2and3respectively.
Once the strain is calculated, the resulting change in resistance of the strain Gage
canbefound.

(Stress)=(6*F*L)/(W*t2)[N/m2]
Eq.2*

(Strain)=/E[m/m]

Eq.3*
whereEistheModulusofElasticityofthebeammaterialgivenin[N/m2].

The load cell as shown in Figure 7, has four output terminals. The positive and
negative excitation terminals are connected to the output of Vref and to ground
respectively. Where as the positive and negative terminals of the signal are
connectedtotheinputoftheInstrumentationAmplifier.

Figure7:WiringDiagram*

A voltage reference is essential when working with dynamic elements because


withoutone,inaccuratemeasurementsanderrorsmayoccur.TheREF01,shownin
Figure 8, is a precision voltage reference that provides a stable 10V supply. This
devicefeatureslowcostandlownoise,aswellashavingastabletemperature.

Figure8:VoltageReferenceChip*Figure9:AD620InstrumentationAmplifier*

TheInstrumentationAmplifierisahighlyaccuratedevicethathasavariablerange,
whichcanbesetbytheuseofoneexternalresistor,RG.Thegainrangeisfrom1to
10000andcanbeadjustedusingEquation4.TheAD620InstrumentationAmplifier
shown in Figure 9 is a low cost device that satisfies the above gain range
specification.Thisamplifierisgreattouseinprecisiondatasystems,suchasweight
scales, transducer interfaces and medical applications because of its accuracy and
lownoise.
G=1+(49.4K/RG)Eq.4*
*ReferencesavailableinAppendixA

DesignAnalysis

This section explains the overall design implemented in this project. It starts with
thehardwaredesignandanalysisfollowedbyadiscussiononthesoftwarestructure
andalgorithms.

HardwareDesignandAnalysis

TheIPBBoardconsistsofanMC68HC11microcontrolleranditsgluelogic.Theglue
logic will further be discussed in terms of its and its functionality. The board
consistsofa32KEPROMchip,whichiserasableandreprogrammable.TheEPROM
was preprogrammed with the Buffalo Monitor Commands for this project. The
Buffalo Monitor is very useful while debugging, for example, it holds the memory
Modify(MM)andMemoryDump(MD)commands.

The32KRAMisa28pindevicethatcomesin8Kand32Ksizes.Itisusedtostore
temporary memory in the form of variables, which are set in the program coding.
The 74HC244 chip is an Octal Tristate buffer. It is an 8bit input register, which
usesapullupregisterinordertoachieve5Vattheinputjumperpins.The74HC273
chipsisaDtypeflipflopwithclear.Theoutputregistergets8bitdatafromPORTC
ofthemicrocontrollerandmakesitavailabletotheuserthroughthepinsofjumper
10.TheLCD,whichhastwolineswheredatacanbestored,isconnectedtotheIPB
boardthroughjumper14.Thefirstlinecorrespondsto015andthesecondline64
79,withthosevaluesbeingindecimal.TheLCDismappedintothemicroprocessor
and can be controlled by the Buffalo Monitor. The GAL chip decodes the memory
mapoftheLCD,EPROM,RAM,inputandoutputregisters.TheRS232DriverChipis
usedasapowersupply.Itcantaketheoriginal5Vsourceandincreaseitsvoltageup
to10Vordownto10Vtobeusedforlowcurrentbipolarpowerdevicessuchas
opamps.

The68HC11iscapableofoperatinginfourdifferentmodes:SingleChip,Expanded,
SpecialBootstrapandSpecialTest.TheExpandedmodewasselectedforthisproject
as it includes all of the functions of Single chip mode with the capability to add
externalperipheralandmemorydevices.PORTAhas3bitsthatareusedasinput
capture(PA0,PA1,PA2),fourbitsforoutputcompare(PA3,PA4,PA5,PA6),andone
bit, PA7, which can be programmed for either input or output. PORT B is a fixed
direction output port. It functions as the upper 8bits of the address. PORTC is
capableofbeingeitheraninputoroutputport.PORTCisconfiguredtomultiplexed
data or lower 8bit addresses using the 74HC373 Octal Dtype latch. If it is
configuredfordata,its8bitbuslinesarekeptopensothatdatacanbetransferred
from the microcontroller to other parts of the circuit board. If it is address, the
MC68HC11triggersanaddressstrobesignalwhichlatchesthelower8bits.PORTD
isa6bitbidirectionaldataportwheretheothertwobitscanreceiveandtransmit
dataforAsynchronousSCIsystem.PORTEisaninputportthatcommunicateswith
an8bitA/Dconverter.

*ReferencesavailableinAppendixA

ExternalCircuitDesign

The IPB board was connected to an external circuit board that consisted of three
separatecircuits,anLEDcircuit,switchcircuitandaforcecircuit.TheLEDcircuit,
shown in Figure 10, was designed using the transistor as a switch. The transistor
was used in this case to control and lower the current flow. NPN BJT transistors
werechosensincetheywereinexpensiveandadheredtothespecifications.Inorder
forthetransistortooperateasaswitch,ithadtobeconfiguredtosaturationmode.
When the switch was open, approximately 5V was fed to the pins of the input
register ($1100) causing the pins of the output register ($1100) to have 0V. The
outputpinswereconnectedtothebaseofthetransistorforcingtheLEDtoremain
offbecausenocollectorcurrentwasproduced.Whentheswitchwaspushed,there
was 0V at the input pins and 5V at the output pins. Thus, the LED would receive
currentandturnon.

Figure10:LEDCircuit*

Figure11:SwitchesCircuit*

The values of R1 and R2 were determined using the range value of 80 120, a
diodevoltagedropof2V,aVBE valueof0.7VandacollectorcurrentIcof10mAas
follows.

R1Calculation
R2Calculation
Assumingsaturationmode:

IBL =IC/
VccVdIcR1=0

=10mA/80
5V1.1V10mA(R1)=0

=0.125mA
R1=390
IBH =IC/

=10mA/120

=0.0833mA

Nowatthebaseside

VoutIBL(R2)VBE=0
VoutIBH(R2)VBE=0
50.000125(R2)0.7=0
R2L=34.4K

Therefore,R1=390andR2=47K

50.000083(R2)0.7=0
R2H=51.6K

*ReferencesavailableinAppendixA

TheA/DconverteroftheMotorolamicrocontrollerrequiresavoltagerangeof05
voltstofunctionproperly,withsometolerances.Inorderforaccuratereadingstobe
taken the microcontroller requires that there be at least a 2.5V different between
the lowest voltage value and the highest value. The A/D converter does have an
internal protection circuit to protect against spikes in input voltage, however, this
circuit would only tolerate transient voltages, and any sustained voltage levels
abovemaximumratedvoltageinputwouldburnthemicrocontroller.Thecircuitwe
designedprovidedastableoutputtothemicrocontroller,of05volts.Duetotheuse
ofasinglesupply,wewerenotabletogetanoutputvoltageof0volts;thiswouldbe
accounted for in the code. The first stage of the circuit starts with a Voltage
Referencechip,theREF01.ThenextstageofourcircuitutilizesstrainGages,placed
in a bridge configuration. The strain Gages were provided for this section, but the
bridgehadtobebalanced.Todothisabalancingcircuitwasconnectedtooneside
of the bridge. A digital multimeter was then connected between the two signal
nodes(V1,V2,Figure12)ofthebridgeandthepotentiometerwasadjusteduntilthe
multimeterread0volts.Alargeresistor(1K)wasplacedbetweenthebalancing
circuit and the bridge so that the balancing circuit would not put a load on the
bridge.ThegainofIAwastakentobe500andthevalueofRG wassetto100.The
twosignalnodesofthebridgewerethenconnectedtotheinstrumentationamplifier
(AD620).Theinstrumentationamplifierwaspoweredusingasinglesupply,andthis
brought about some interesting issues. Since the voltage would never reach zero,
the microcontroller cannot use 0 volts as it reference for the lower voltage value.
Thiswasresolvedbyusingthereferenceterminaloftheinstrumentationamplifier
tobringthevoltagedowntoalmost1V,undernoloadconditions.Theoutputofthe
instrumentationampcouldnotbetieddirectlytothemicrocontrollerasthiscould
cause damage to the microcontroller unit. If a sustained voltage, above the
maximum allowable rating, was to be applied to the microcontroller, this could
causethechiptoburnout,asitisnotdesignedtotakevaluesabovetheratedlevels.
To prevent this from happening, a clamping circuit was used to limit the voltage
goingintothemicrocontrollertolessthan5volts.

Figure12:SchematicDiagramforForceMeasurement
*ReferencesavailableinAppendixA

SoftwareStructureandAlgorithm

SwitchesandLEDs:

AstatemachinewasusedinordertodesignanalgorithmforswitchesandLEDs.
Oncetheswitchhasbeenpressed,itcreatesanopencircuitandsendsa0tothe
inputregister($1100).Assoonastheprogramdetectsa0atthepinoftheinput
register,itassignsthecorrespondingstateandentersthesubroutinetodisplaythe
stringandflashtheLEDbystoringa1or0totheoutputport($1100).Acommand
(EORA)wasusedtotoggletheLEDstatetomakeitflashandaTOFCounterwas
usedinordertocreateadelayofhalfasecondforittoblink.

Figure13:FlowchartfortheAlgorithm

AngleMeasurement:

TheMEMSicwastestedusingtheoscilloscopetomeasurethedutycyclesforboth
thepulsesatdifferentangles.ThevalueswererecordedinTable1.

Table1:DutyCyclevariationwithchangeinangle
Angle
0
45
90
135
180
PulseX
50%
59%
62.5%
59%
50%
PulseY
38%
41%
50%
41%
62.5%

Thefirststepformeasuringtheanglewastodeterminethepositionofthejig.The
pulsewidthsforXandYhadtobecalculatedfirstinordertodeterminetheposition
ofthejig.ThiswasdonebyconnectingthepulseXtopinPA1inPORTAcapturing
the rising edge using interrupts. The code was written in such a way that it
generatesaninterruptassoonasitdetectsthefirstrisingedgeandcalculatesthe
pulsewidthaccordingly.AsimilarprocedurewasfollowedforpulseYbyconnecting
ittopinPA0inPORTA.

*ReferencesavailableinAppendixA

AsshowninFigure14,afterthepulsewidthswerecalculated,thevaluesofTxand
TYweredetermined.ThechangeinTxandTYrepresentsthechangeinourduty
cycle,whichchangesaccordinglywiththepositionofthejig.Theperiodofthepulse,
T2 was given as 10ms for both X and Y. Since the system operates at 1MHz, it
generates 10,000 clock cycles for a period of 10ms. So, for half of T2 it generates
5000clockcycles.Hence,thevaluesofAX andAYwerecalculatedusingthesimple
formulaegiventousintheDesignResource.

Figure14:Pulsewidthmeasurement*

The next step was to use the values of AX and AY to locate the position of the
accelerometer.Initially,theanglesweredividedintofourquadrants,(0o45o),(45o
90o),(90o135o)and(135o 180o).Usingthepulsewidthscalculatedabove,the
locationofthejigwasdeterminedasfollows:

IfAX<0,itsnotinanyofthe4quadrants.
IfAX>0,itslocatedsomewherebetween0o180o.
IfAY<0,itslocatedbetween0o90o.
IfAY>0,itslocatedbetween90o180o.

Ifitslocatedbetween0o90o,
Case1:tan0o<AY/AX<tan45o AY<AX
Case2:tan45o<AY/AX<tan90o AY>AX
Ifitslocatedbetween90o180o,
Case1:tan90o<AY/AX<tan135oAY>AX
Case2:tan135o<AY/AX<tan180oAY<AX

Afterthepositionofthejigwassuccessfullylocatedusingtheabovecases,theratio
AY/AXwascalculatedusingtheFDIVoperationandithastobereferredtoalookup
tablewhichwasmadeusingthebinaryvaluesoftheratiowitha0.2oresolution.As
the maximum binary value using an FDIV is 65535 ($FFFF in binary), the lookup
tablewasmadeaccordinglyusingMATLAB.

Finally,theanglehastobeprintedontheLCDusingintegertobinaryandbinary
toASCIIconversionafterfindingthecorrespondingvaluefromthelookuptable.

*ReferencesavailableinAppendixA

10

ForceMeasurement:

ThecodewasdesignedusingascalingfactortoconvertthevaluefromtheA/Dtoa
weightmeasurement.Usingdifferentweightcombinations,itwasdeterminedthat
the relation between the difference in voltage and the weight applied could be
approximatedtobelinear.Thealgorithmforthecodewasquitesimple.Itreadsthe
valuefromtheA/D,checkswhichconversionfactortouse(i.e.,whichcurveshould
be used), does the conversion and displays the corresponding weight. The A/D
converter of the 68HC11 reads voltages between 0 to 5V, and generates a binary
numberproportionaltotheinputvoltage.
NAD=(VinNmax)/VrefEq.5*
WhereNADisthevalueproducedbytheA/Dconverter,Vinistheinputvoltage,Vrefis
thereferencevoltageandNmaxisthemaximumvaluecontainedin8bits(255).The
scalingfactorwascalculatedusingtheaboveformulaandabittogettheaccurate
valueschangedaroundtheintercept.

Graph1:VariationofOutputVoltagewithdifferentweights

CodeOptimization:

Variousmethodswereusedtomakethecoderunmoreefficient.Theusageofstate
machinemadeiteasiertoswitchbetweendifferentmodeseasilywithoutanydelay.
Thisallowedthesystemtogothroughthecodeforthecurrentstateonlyinsteadof
runningthroughthewholecodeeverytime,henceimprovingtherefreshtime.The
efficient algorithm for the halfsecond delay to blink the LED was a major part in
optimizing the code in order to keep the refresh rate less than 30ms. The state
machineswerefurtherusedtomakesurethatthestringisprintedonlyoncewhen
theswitchispressedandnotrefreshalongwiththemeasuredvalue.Alltheabove
methodsoptimizedthecodebyimprovingtheupdatetimealot.
*ReferencesavailableinAppendixA

11

ExperimentalProcedure

The Software Interrupt (SWI) instruction became an extremely useful tool in the
debugging phase. It was used countless number times to check if the code was
workingcorrectly.FollowingtheSWI,amemorydump(MD)wouldbedonesothat
the contents of the accumulators and variables could be observed. These were
checkedtodetermineifthesoftwarewasworkingasneeded.Forexample,thevalue
of input register ($1100) changed from FF to 7F unexpectedly, which caused the
pushbuttonnottoworkbecausethesoftwarehadittailoredtoFF.Thiswouldnot
havebeendiscoveredwithouttheSWIinstruction.UsingSWIandthencheckingthe
pushbutton,itwaseasilynoticedthatthebuttonchangedtoanewvalueof7F.This
saved lots of time debugging as it was not a software problem but actually a
hardware problem. Another example is when the interrupt was not working
properly;soseveralplacesweretestedusingSWIandMD.Bydoingthis,theexact
locationwheretheerrorwasoccurringwassingledout.Thistechniquedetermined
exactlywheretheerrorwasoccurringsothatitcouldbeimmediatelyrectified.

Thedigitalmultimeter(DMM)wasessentialindebuggingthehardware.TheDMM
was used to check the voltages between circuit connections and at inputs and
outputs.Ifthevoltagevalueswereincorrect,oneadditionalcheckwouldbemade.
UsingtheContinuityfunctionofthemultimeter,thehardwarewasthencheckedfor
accuratesolderingandconnections.Ifthesolderedconnectionswerenotgood,they
were simply redone and then tested again. Eventually, the entire circuit was
workingproperlywithoutanysolderingorconnectionissues.

Todeterminetherealtimeupdate,thetimewascapturedwhenastatewasentered
andwhenitwasexited.Thesetwovalueswerethenusedtocalculatethetimespent
withinthestate.ThiswasrepeatedforeachofthestatesandcanbeseeninTable4.
It is shown in Table 4 that the requirement of less than or equal to 30 ms refresh
wasreachedsuccessively.

The refresh time of each state satisfied the required criteria of being less than or
equalto30milliseconds.IntheForcestate,thereisasmalldelayusedwhichslightly
increased its refresh time. For the angle state, the worst case of 180 degrees was
usedinordertofindtherefreshtime.Itcanbeseenthattherealtimeupdatewas
longestinthecombinationstateoftheForceandAngle.

*ReferencesavailableinAppendixA

12

ResultsandObservations

Table2:TestResultsforAngleMeasurement

TrueValue
MeasuredValue
PercentageError
(Degrees)
(Degrees)
0
0
0%
20
20.2~20.4=20.3
1.5%
45
44.8~45.0=44.9
0.22%
60
59.8~60.0=59.9
0.17%
80
79.8~80.0=79.9
0.13%
90
89.8~90.0=89.9
0.11%
120
120.0
0%
135
135.0~135.2=135.1
0.07%
160
159.8~160.0=159.9
0.06%
180
179.8~180=179.9
0.06%

Table3:TestResultsforForceMeasurement

TrueValue
MeasuredValue
OutputVoltage
PercentageError
(Grams)
(Grams)
(Volts)
0
0
0%
0
5.81
5.50
5.33%
0.090
7.60
7.72
1.57%
0.114
10.76
10.68
0.74%
0.156
14.51
14.38
0.89%
0.207
21.70
21.78
0.36%
0.309
29.00
29.18
0.62%
0.414
61.00
61.00
0%
0.83
119.00
118.96
0.033%
1.60
163.00
163.36
0.22%
2.18

Table4:RefreshTimeforeachstate
State
Force
Angle
ForceandAngle

RefreshTime(ms)
10.229
8.990
12.768

*ReferencesavailableinAppendixA

13

Conclusion

The project was successfully completed implementing an efficient realtime


measurement system for deflectionangle and force on a Cantilever beam. All the
required specifications were met for both the angle and force measurement. The
specifications for LED blinking was successfully met as they were blinking with a
delayof0.5secondswithoutaffectingtheupdatetimeforeitherdeflectionangleor
force.

Aresolutionof0.2degreeswasachievedwithanaverageerror(takenfromTable2)
of0.23%.Theminorerrorcanbeexplainedbytheinaccuratedutycyclefromthejig.
Alsothelevelofthetestjigwasnotexactlyleveledupandwasmovingslightly,even
thought it was set almost at the center using the base screws. So it caused the
readingtochangeabitwhilemovingtheaccelerometer.

Themeasurementofforcewasalsosuccessfullyachievedbyfixingtheinterceptof
the scaling factor. The base level of the test jig played a major effect to cause an
errorbutwaslaterputonaflatbasetogetamoreaccuratereading.Abreadboard
was used initially for the cantilever design but was then later replaced with a
soldered design for the final part of the project, hence reducing the error further
more.Inordertomakethesystemmoreaccurate,afewcapacitors(1F)werealso
connected in parallel to the excitation terminals. As a result of all the above
precautionarymeasurement,theaverageerrorwasturnedouttobearound0.98%
(takenfromTable3).Itwasevenlower(0.49%)ifthelowestweight(5.81g)wasnot
taken in to account. This minor error was caused by the sensitivity of the
potentiometerusedfortheDCOffset.ThedamagesinthestrainGageapparatuswas
alsooneofthereasonasthescalingfactorhadtobechangedsometimesifworked
afterawhileonthesamestation.Thisresultedinanonlinearoutputvoltage.

After all the above methods, it was made sure that the percentage error for the
measurements fall below the allowed error percentage (2%) and the project was
successfulattheend.Thisprojecthelpedustolearnalotinthedesignprocesswith
regardstotestinganddevelopingalgorithms.Alotofdebuggingmethodswerealso
learntduringthedevelopmentofthesoftwarestructure.Asthiswasthefirstdesign
projectsofar,itwasverydemandingasimplementingthedesignedpartwasvery
complicated,asitwouldneverworkinthefirsttry.Thisimprovedourdebugging
skills for both the hardware and software designs. Meeting the time requirement
was also a very important task in this project, which was managed with great
difficultyduetoaheavycourseload.Thisprojectservedthepurposeofastarting
step for the future projects in the upcoming year in regards to things like time
management.Asawholethisprojectwasagreatpieceintermsoflearning.

*ReferencesavailableinAppendixA

14

AppendixA

References

LaboratoryManualforMilestone1byDr.Kassam,RyersonUniversity.
LaboratoryManualforMilestone2byDr.Kassam,RyersonUniversity.
LaboratoryManualforMilestone3byDr.Kassam,RyersonUniversity.
LaboratoryManualforCOE538Lab3,byProf.KennethClowes,Ryerson
University.
CVA(CentreforVirtualArchitecture).
file://localhost/,http/::cva.ap.buffalo.edu:
AnalogDevices.
http://www.ee.ryerson.ca/~jkoch/ele744_2005/ele604_2009.html
MC68HC11MicrocontrollersReferenceManual,MotorolaLiterature
Distribution.Denver,Colorado.2002.
HanWayHuang,MC68HC11AnIntroduction:SoftwareandHardware
Interfacing,DelmarThomsonLearning,2001.
ProgrammableLogicDevices,.
http://en.wikipedia.org/wiki/Programmable_logic_device

*ReferencesavailableinAppendixA

15

AppendixB

ElectricalComponentsusedfortheproject

IPBBoardwith68HC11microcontrollerandgluelogic
REF01VoltageReferenceChip
AD620ANInstrumentationAmplifier
MEMS2125MEMSicAccelerometer
2lineLCDdisplay
1N4148Diodes
2N3904NPNTransistors
741OperationalAmplifier
Pushbuttons
Red,yellow,andgreenLEDs
Resistors(100K,1K,47K,390)
Potentiometers(1K)

*ReferencesavailableinAppendixA

16

S-ar putea să vă placă și