Linear Motion
Linear Motion
Linear Motion
●Software package for this system was developed by using the Python
Programming Language (Open Source Software).
●This package is cheap enough for the college level or even school
laboratories to own and enabling them to do experiments and perform
numerical analysis of the data using computers
The Objectives of this study was:
●To develop the MBL system of linear motion experiment using Open
Source Python and Rotary Motion Sensor
●MBL is not widely used in all stages of education in Malaysia so this low
cost package can be used as laboratory exercise for teaching and
learning process.
●To share the ideas with other educators how to develop a low cost MBL
system using Open Source Python
Literature Review:
User Programs
Runs on PC
Python Library
Communication Link
Runs on Micro-controller
Phoenix Firmware
Analog/Digital I/O
Sensor/Controls
Development of System :
C a l oi b n r ao t f i r o t a r y m o t io n s e n s o
D e v e lo p m e n t o f s o f t w a r e
D e v e lo p m e n t o f e x p e r im e n
Calibration of Rotary Motion Sensor
d e f u p d a t e ( ) : # C a ll e d p e r io d ic a l l y b y t h e T k t o o l k i t
g l o b a l d a t a , r u n n i n g , t im e g a p , p h
# s = t im e . t im e ( )
i f r u nn gn i = = F a l s e :
r e t u r n
f o r c h in r a n g e ( 1 ) :
p h . s e l e c t _ a d c ( 0 )
r e s = p h . g e t _ v o lt a g e ( )
x = r e - ss [ t 0a ] r t s [ 0 ]
v = r e s [ 1 ]
d = v 2 d ( v ) # c o n v e r t v o l t a g e t o a n g l e
d i s = d * 0 . 0 1 9 9
d a t a [ 0 ] . a p p e n d ( ( x , d is ) )
i f l e n ( d a t a [ 0 ] ) > 1 :
d i s p o b j e c t s _ [ 0l i n] . ed se ( l )e t e
d i s p o b j e c t s [ 0 ] . li n e ( d a t a [ 0 ] , 'b l a c k ')
v e l = ( d - a1 t] a[ 1- [ d0] a] [ t a - 2[ 0 ] [] 1[ ] ) / ( d- 1 a ] t[ a0- d ][ 0a ] t [ a - 2[ 0 ] [] 0[ ] )
d a t a [ 1 ] . a p p e n- 1 d ] [ ( 0( d] , a v t ae [l )0 ) ] [
p r i n t v e l
i f l e n ( d a t a [ 1 ] ) > 1 :
d i s p o b j e c t s [ 1 ] . d e l e t e _ li n e s ( )
d i s p o b j e. l ic n t es [( 1d ] a t a [ 1 ] , ' b l u e ' )
i f x > m a x t im e :
p r i n t 'd o n e '
e l s e :
r o o t . a f t e r ( t im e g a p , u p d a t e )
d e f v 2 d ( v ) : # C a l i b r a Rt i o o n t a f r o y r MS oe tn i os no r
m = 1 2 . 4
c = 0 . 1 8 2
v = v * 0 . 0 0 1 # m V t o V o lt s
d = m * v + c
r e t u r n d
Development of Software
A n a ly s is
D e s ig n
E v a lu a t io n
D e v e lo p m e n t
Im p l e t ma t ei on n
Software flow chart
Start
Main Menu(Graph)
Displacement-time
Velocity-time
Quit
No
Yes
End
Graphical User Interface of MBL
Development of Experiment Set
a T T
m 2 a
m 1
m 1 g c oθ s
m 2 g
m 1g
m 1 g s iθn
F o r1 b m l o c k : N o w s e t t i n g bF k =o µ tk mh 1 g T c θ' s o es q u a l a n d
F o mr2 b l o c k :
∑ Fx = 0 ∑ Fy = 0
m g - m a F= k + mg s i θ n + am w h e r e
N =1 g m c θ o s 2 2 1 1
∑ F y = 2 ma
∑ Fx = m 1a
m g – T =2 a m µk m 1g c θ o= s 2 mg - m 2 a - m 1 g s iθn - m 1 a
2
T – ( Fk + m 1g sθ )i =n 1 am
T = 2 g - mm 2 a [ 1 ]
T F= k + ( 1 gm s i θ n ) + 1 a m [ 2 ]
( m - m s i nθ ) g- ( m 2 + m 1 ) a
H e n µ kc = e 2 , 1
m 1 g c oθ s
Experiment Set Up
M ic r o c o n t r o lle r
C o mt e p r u
R o t a r y m o t io n s e n s o r a t t a c h e d
o n p u lle y
T a b le
RESULTS
T
a b le 1 T a b l e 2
V a l u e o f t h e tc h o e e f d f i ec iv e e n l t o o p f e f d r i c m t Vi o e a n a l us u ue s ri one fg m t h e e n t c P so aoy e ss f Dfct i e c a mi et a n t S o t fu
a t d i f f e r e n c e s a n g l e o f r u n a a t w d a i f yf e r e n c e s a n g l e
m 1 = 0 . 0 8 k 0 g 2 m a 2 4 = n 0 .30d 8 k3 g 5 5 1 m 1 = 0 . 0 8 k 0 ag 2 n m 24d = 0 3. 0 8 k 3 g 5 5 1
5 17.49 - 2.901
5 17.60 - 2.925
10 15.56 - 2.605 10 14.60 - 2.402
15 13.99 - 2.398 15 13.40 - 2.271
T a b le 3 T a b l e 4
T h e v a l uc eo e o f f i ct h i e e n µt k o f fd r i fc f te i or eon ntf h t me m o a v bs i lns o g c k T h e v a l uc eo e o f f i ct h i e e n µt k o f fd r i fc f te i or eon ntf h t me m o a v bs i lns o g c k
o n s a m e a n g u l es i nto h gf e t h d e e vp el a l on pe e d mm e a s u r e m e no t n s sy as mt e e a n g u l es i nPo gf a t s h c e o p D l a a n t ae S t u d i
θ = 5 ° m 2 = 0 .0 8 3 5 5 1
, k g θ = 5 ° , m 2 = 0 . 0 8 3 k g5 5 1
●This study has shown that the data presented from developed
system are satisfied with the data from standard system
●The advantage of this system was the real time graph plotted
on computer screen,user can also save the data and print out
the graph