automatic color machine
TRANSCRIPT
AUTOMATIC COLOR MACHINE
!
"##$!%"&'())*( +"##,-
./001 2 ( ,+$
"3)* 2551
AUTOMATIC COLOR MACHINE
! !
"##!$ %"&'()!)*!!(+"##!!,-
.! !/001! 2! (!!,+$!
"3!)*! 2551
AUTOMATIC COLOR MACHINE
AUNCHAN SAKWANITKUN KEERATI SUKSUDEJ THANAKORN SRIITTAYAWIT
A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF REQUIREMENT FOR THE DEGREE OF BACHELOR OF ENGINEERING
DEPARTMENT OF ELECTRICAL ENGINEERING BURAPHA UNIVERSITY 2008
!"#$
##
! %& .'$() *# +,- 81 ,-
.!%& 2551
(!1**2 3!! ,$45 #678,% !%&,$5!!4) !1**2
...................................................34 (4) #()
...................................................4 ( . )
................................................... %& ( . '$() *#)
...................................................,,-(!1**2
(<5-8! .! ##!$)
ii
!"#$% %&& ''()*+&,,%$+ -"# $ ( # % .%# $ %$+!,%#$ *,+ (ZX-color sensor) ! %$"#./* (Microcontroller: PIC16F877) ,*%% (Display board) (Arm robot) !$( +$ (Conveyor) %$+-, 123*!+ ! 2!%+$-%$123* +/+# / %$+ 123* /+ %$$( +$ !/+*,+ *!,+,2%#,123*+!$!.%#4% 15 !''2,./+! / #/+,!, %$123* %$ 123*!+!-4%/+,*%% #*,+%$++& !-,+.%#$+ #,,+&!&,+ 3 + +% + !+& /%%$+ 123*(, %$+!/)1(%$ 100% ,123*/+/+*%#$5 0.026 m/s !+!$!!123*!"&,$( +$+#$/+% 2 !123*/+*5 &!$!!123*,$( +$#+ & (#%$++!/)1(%+ 2!/+123*/+ /+* %#$54% 0.2 m/s #+!$!!123*!"&,$( +$ +#$/+% 10 !#!/)1(%$ 100% $.5 %$+ .-%$+/++.%#
': *,+, * ZX-color, ./*, $( +$, ,*%%, ,
ii
ABSTRACT The continuation of industrial production is a factor that affects the quantity of production and the cost of operations. As a result, this project aims to design the Automatic Color Machine, which could be used as a part of the production line in order to help the production process work continuously. This machine consists of color sensor (ZX-color sensor), processing circuits by microcontrollers (PIC16F877), display board, arm robot and conveyor. This machine can count the number of products in each color and also separate the product of each color as needed. The working principle of Automatic Color Machine would be explained as follows; the products will be transported via the conveyor and when it passes the ZX-color sensor, the sensor will be search for the color on the top of objects which could have the maximum distance 15 mm from the sensors to object. After that sensor will signal to microcontroller, which helps to count and control the arm robot in the separation of product. The number of products will be shown on display board each color. Although sensor can detect a several colors, but this prototype set to detect for 3 colors, that are red, blue and yellow. According to the color separation of product experiment, we found that this machinery had highest efficiency (100%) if products passed through the sensor with the speed of 0.026 m/s and had the distance between each of the products on conveyor at least 2 cm. Moreover, if products moved faster, the distance between two products on the conveyor would be higher. In order to help the machine achieves highest efficiency while it passes through the sensor with the speed of 0.2 m/s speed, it must have the distance between each of the products on conveyor 10 cm at least to reach full efficiency. However, this machine cannot separate the glossy surface of objects. Keywords: Color sensor, ZX-color, Microcontroller, Conveyor, Display board, Counter
iv
! " #$!$% &#''( ( ( #')!*& ., -*.& / ! &$01 #'2'% (% 01'' %$)$! ')3" " 40( 3'( )!*&!"2'$01 %" 4 %)!*)! !"-#//5%'
!'()!*)2'"2 ' %$6 2'' ()!*-#//52'"2 %$6 2' !*$%& ($67 !* !"#' "' ' *%78'9)90( $6" 0 ")3%!*#' * ('
vi
..... ii
Abstract... iii
... iv
.. v
..... vii
... ix
1 .................................................................................................................................. 1
1.1 ...................................................................................................... 1
1.2 !"# ................................................................................................................. 1
1.3 $$$% ......................................................................................... 2
1.4 %&#!'() ............................................................................................ 2
2 *+, .................................................................................................................................. 3
2.1 - $) $..#!'' ................................................ 3
2.2 ( %%# .................................................................................................... 8
2.3 ! ! /!$ #(001 ......................................................................... 11
2.4 2................................................................................................... 20
2.5 ! ................................................................................................................. 24
2.6 !')3 ............................................................................................................... 27
3 ! %......................................................................... 29
3.1 ! ...................................................................................................... 29
3.2 $4 .................................................................................................... 29
3.3 /( $3&$% ................................ 30
3.4 !''(0 12 V ............................................................................ 32
3.5 !'! ..#!'' Zx-color ............................. 33
3.6 !'! ! /! # .................................................................. 36
3.7 !'!" ...................................................................................... 41
vi
()
3.8 !'! ................................................................................... 42
3.9 !'0 ...................................................................................... 50
3.10 3&$% ............................................................ 52
4 !5 ........................................................................................ 53
4.1 -# ....................................................................................................... 53
4.2 !5 ................................................................................... 54
4.3 6 ................................................................................................. 63
5 ................................................................................................................ 64
5.1 ........................................................................................................ 64
5.2 $) ................................................................................................................. 64
5.3 728% ...................................................................................... 65
) ................................................................................................................................... 66
6 !......................................................................................................................................... 67
6 ! 3&$% ............................................. 68
6 ! $ %)$3&$% ............................................ 72
6 ! !' ...................................................................................................... 74
viii
2.1 ZX-COLOR.................................................................. 4 2.2 LDR. 4 2.3 LDR 2
!" ! ................................................................................... 5 2.4 #$ !$!% $ & 6 2.5 ! &()!" $ & 7 2.6 # ! additive 8 2.7 **+ PIC16F877 10 2.8 , ! &- 12 2.9 ! &- 13 2.10 **+ PWM !" ,!!**+- 15 2.11 . !!/$ $/!! &(" 0. 17 2.12 !$(1& .) . !!/$
$/!! &. 18 2.13 .,!/**+%3 IC 555 19 2.14 **+.) .,!/**+%3 IC 555 19 2.15 ($,!$.. 20 2.16 /!$4 /$($ /5$$ .. 24 2.17 *$6+&$ 7$ LED 25 2.18 8 DS1820. 26 2.19 ,7 8 RTC DS1307 27 2.20 .9$.9 28 3.1 $4 !" 3/ /.. 30 3.2 $4 Color sensor 31 3.3 .7$. 12 V.. 32 3.4 .,$ .)$#$ Zx-color Sensor. 33 3.5 .,$ .)!4 ! &.. 36 3.6 **+($&..) ! & 37 3.7 **+($&!" ,....................... 38
viii
()
3.8 .)7) ! &:)...................................................................... 40 3.9 . H-Bridge. 41 3.10 , LED 7$ )............................................................ 42 3.11 , LED 7$ . 43 3.12 7$ LED # 43 3.13 !$ 2 7$ !" , 7$ LED #.. 44 3.14 !$7$7.. 45 3.15 !$7$/ (<). 47 3.16 .... )+795/$!$................................................................. 48 3.17 . /!. 50 3.18 !" 3/ /........................................................................ 52 4.1 $//! &................................................................................................................ 53 4.2 $ )%3$ .............................................................................................. 53 4.3 Oscilloscope............... 53 4.4 !" 3/ /................................................................................. 53 .1 ($,!$ 73 .1 .7$.- 12V 10A 74 .2 .!8!8 &.. /. 75 .3 .)!4 ! &... 76 .4 .3/ / 77 .5 . H-Bridge .. 78 .6 .!$7$7.. 79 .7 .!$7$/ 80 .8 . )+795/$!$. 81
3.1 Analog to Digital.. 34 3.2 Zx-color 35 4.1 output . 54 4.2 output 55 4.3 !"#$%&'' () (no load) 56 4.4 !"#$%&' () 0.5 kg.. 57 4.5 !"#$%&' () 1 kg. 58 4.6 "* #* +, #) ... 59 4.7 "'-*% . 60 4.8 "'-*% )-. 61 4.9 "'-*% ./. 62
1
1.1 (Conveyor) !"! #"!$! %&#' ' &(#%)&%*+),-. '!#%)(.,/! ! (!'$#,%)'!(# $! '!%#, %#0# #!0 ),1 ' &'&+%,'! #' &2 3'/! 2 ! !'"2 3'%)/-# !(!'(#' &&(!&'%)' 1 $! 2 3 !%)"2 3%)%%)1!4 #&'(#" 3 $# &# )'%)& 2 3''# 2 3'. ' &2 3', ')&&2 3# !!-)$#' !' +"%) $! ! #'%)&%.2 3''#' &2 3'.&#%)4
%) !0/#%(#(56 (#(!&0 ,'! &. !, (Conveyor) #73 %)$&0 ' &0 0 %)(# $'#'$.!73!4 2-)&0 $% $! )%)& # %)&# ' &0 0 ! !0/#%-#)#',' #)'' &&3$ )&(#"&# '' & )"&$3!&0 ' & #%83(%!) %. #,'#%)# )#&$3' &&%*+,(#!/#
1.2
1. )9-8 %,3(::;&' (DC-motor) 2. )9-8 %,223 (Color sensor) 3. )9-8 %,(% 3 4. )9-8 %,3#'#0 (7-Segment)
2
5. )9-8 %,&'1%3 (Mechatronic) 6. )&3$3(::;&'# 7. )'' &)#'$#, #$(% 3
1.3
1. #' 87&,(# 3 . ' &'# #$ '?#
2. ' &, )#3(::;&' 3. '#0 ,/ #3#'#0 ' 7 Segment 4. &&!&!' &223(! 15 5. &&!&!'! &$.%! 10 2
1.4 !"
1. , ' &3(::;&' 2. (% 3'3' &' &
&'#0 (# 3. (&3 $(# #
'! &$#(# ' &'#0 3#'#0 4. &# ' 5. #%)$' 6. ,0# #'!%)%
3
2
2.1 [7] !"#$
%&'()& $ *+&,%&&,% %&'(- '&+. $&"-/, % * (0% , -1+ LDR '&,%&#$$$#% *++1 %&'0% (LDR) 4 +'#%) ZX-COLOR
2.1.1 ZX-COLOR
- ( TCS230 Texas Advanced Optoelectronic Solutions - &5$0 2 5$ *
(1) 5$*+ ()&%06 $.*$ +1 $"7*$ +0
(2) 5$ 8$, ()&& 0! $" 8$, - (06&-, +5V '% 06 20 mA - $ LED #"+,( $*$%$+,$,#- - ','$' $ ',++ 0 ' 15 $&&$
- + 99#%) 99)+* JST 3 # ( $.(+$**$+10,+ '
4
2.1 % +'+1# ZX-COLOR[7]
ZX-color !"##$ (5$- ZX-color '+*+ %&()&&"7#" (OUTPUT)
%06 0 . 5V 5,*+)&&"7#%+&'5 '$*+%+0 +( '$%+ caribrate *+ #-+ "('$&)&# ZX-color *+ # %&' "','+'+. ZX-color 5,','$' $ ,+(+ 0 . 15 $&&$ %&'(','-+*+ ( "8*&*& #*+ +1
2.1.2 "%&'() LDR
LDR $,,++ 565*6&(photoconductive cell ) ,0+ 0% ( LSR - light sensitive resistor ) 5, +(9+ ', %*$,$&06 ( CdS ) %*$,$0 ( CdSe ) - -4 '! $:&%)+$(/%&+# : 0$
2.2 5* LDR[15]
5
2.2 '40+ +#%&41 - 0% %&' % - '%+"-#$ 2 # . # %& '40 + '*+# -0668 $) 0% %&' +#$!, ,+&45 &4 '/$ %&' +$
&# LDR - &$% $'&04 '.+,"& ( :,+ (5;&&4"&+ $5;& &4 '-$4+ *$&& , *$#$#% '-$#-+0 *$4,&&0$+-
2.3 % ,+6% *$0+% *$.+ 1 # LDR - 2 % $,*$0#*[15]
2.3 % (+*$,*&'$ 4,000 $ ( 1 $ +
10 - 10 $ ) .'$ 10,000 $ $. '(0 ( ,* '40 (+'$ 4,000 $ . 7,000 $ ) 5,0 LDR %*$,$&06 '0+% $*$,*&(+ 5,000 + $ '4 #, 0 . &
6
%& *$,*& 0 #$(&*,*$,*&0 #*$ (*0+*$ ,*& '$ 5,550 $ )
(#'0$+$% #'$% +'+*$# LDR '0-%+ 100 + 1,000 + 10,000 + #-,++ %+5,0%&*+*$ (#'0$+$% ',+(+ '$ 0.5 $&&5$ #-0 ($ $+ 2 $&&5$ %&'(#'$% '$*+'$ 10 ' 20 5&5$&0 '&",0$+5$ 0$+.5$40 %&'% 00$++ 100 V %&'& 9 ,,+'$ 50 mW
2.4 )&#&,*$#$% (%& [15]
2.4 =#- *$#$% &,%&,+ * $
%& (LDR) 0% $*$#$ () *$ '$*+ %&'(*$#$#% .&&&",' *$4 '*+,1"$#-0 .*+*$ $* '('%+%$ '0,,+' $& "$&,#-0%& '&&$,+(' %&'(,.4$0(*$#$% ,1 %&&,*$#$' ( (#) *$4 '&&,&$ '%& #-0($+ ,*$#$#% + %& (LDR) %%*$,$0 '(& (# + !'$* ',+%%*$,$&06
7
() %" '&& (#) %" '"$#- $$% $' %& $$% $' %&
2.5 %"$$% $' %& [15]
2.1.3 RGB
' RGB ' #% #% )+%+%$ '%. ,+ (Spectrum) %, $ ,$40 7 * % % & #, - *$ $+ "&,+(# $+*& , $.$40 % $+$*$.*& *&% $*$. +% $+ ,+ &05&(Ultra Violet) %&'*&% % $*$.*& *&% +% %,+ 6(Infrared) *&% $*$. + $+ %&' + %- ,#$?,0$+ $.0 %&'$@?%&% -$ % 3 * %(Red) -(Blue) %&' #,(Green) - $ .%$+ #% $$:,$ '( ($+ 3 * %$ 680% %&' & %&'.:,% - $$ '0% # * $#% - 0$('5,0 (:,!", !"5 !"5@ !"" *$" %&' % (%
8
2.6 ) $# ,+ additive[10]
% &&, 4,+ $. #-0,&(%&+% ( $$- %+. $#-%&+% (4 '"$$#- ' +)&.#'*$(**$%&'? 7('$,+ $-+, +? %&'**$4*) $%$+ &#% $) $ #, %$+ - 3 * % - %&' #, + %$+ (#,$ 3 $ * % - %&' & 5,%$+ % - $ $.) $ 0"$ 4 (%+'*$#$% *+1
2.2 *!![13]
0$5**5&& * &4 ,+ !,(', 1 &, +$ + +,'$&)&&(Central Processing Unit : CPU) +,**@ %&'& (Arithmatic Logic Unit : ALU) &&(Oscillator) +,*$ (Memory : ROM,RAM) 99"%&'# 99" (I/O Port)
2.2.1 &'() *!! PIC
PIC * 0$5**5&&'& ,+$ *+ @Peripheral Interface ControllerA
%*$*#0$5**5&&'&-* ",,$$,+0!,(0 0$++ ' PROGRAM MEMROY, RAM, EEPROM, SERIAL, I2C, PWM, A/D A&A
9
5,0$+ + $ !, (#0$5**5&&'& PIC '$6B(('$&)&$-+,*$ ($+,'$&)&& (CPU)
- + *!! PIC !*#*$. 99CB $. 99C0 20 $'; (* #0$5**5&& PIC (&", 0.25 0$5*
- "$,% *!! PIC (+,*$ #0$5**5&& PIC '*+#, *,+'+ 512 words . 4K words %+(B ? microchip #0$5**5&& PIC 0"D (+,*$ #0$5**5&& PIC $#&, 5&0 %&'$++ '#,,0(9+#-,1 (###+,*$ #0$5**5&& PIC '0$+$ 5, * #0$5**5&& PIC '$# 14 bits - ',+ 1 word #0$5**5&& PIC
- -./, *!! PIC $ 3 +& 1 *#-, 16xxx, 17xxx %&'&+ * 18xxx %&',$$-* +#-, 16xxx 5,&%#0$5**5&& PIC + ',.%$,+0!,( chip ,5, 0$++(1 "$$ )&$$4*%)+ '$#&4 %&'( '0$+$ -0$5**5&& PIC $' &41 0$+(+(9+1 (* %&'+,*$ ,'1
2.2.2 PIC 16F877
- $* (( 35 * - (E* +1 '( Cycle , %&' 2 Cycle (*
'5 - *$.0 * 20 MHz - +,*$ 5%$ FLASH Program Memory $# 8 word
(1word = 14-bit ) - +,*$ #$& (RAM) # 368 Bytes - +,*$ #$& (EEPROM) # 256 Bytes - $. "0-$ 14 %&+ - $ Stack ((0 8 ' - $' Power On Reset, Power Up Timer, Oscillator Start-up timer - $.&8#$&0 - 5$',"& (Sleep Mode)
10
- &5$ 99C0&,5$ - $.5%$5,(06 +5V 0 - 06&-, 2V . 5.5V - Current Sink %&' Current Source ,+ 25 mA - $ Timer/Counter 3 $5$& Capture/Compare/PWM 2 %&'$
' USART + % RS232 - $ Analog to Digital Converter *$&', 10 8 %%&
!,( - $' '0&-, (Brown-out reset) %&'$ I/O "-$ 5 "
2.2.3 # PIC16F877
2.7 % # 99# PIC16F877[13]
# 99# PIC 16F877 - '$-$ 40 # ''0,#+1 5, '$# 99 I/O Ports -$ 33 # 5, $.0("/"
11
0-$# ,# RA4 5* !,(% Open Drain -0(# 99" '+"&" (Pull-up) 0, +#& $.(0$ # 99 I/O %& ,'0,# 991 * #06&-, , , #4 %&'# &&
2.7 PIC 16F877 '% .#(+1 - RA0-RA3 %&' RA5 '( I/O %&'#"# 99& (AN0-AN4),R4 # I/O + RA6/OSC2/CLKO (&, + * # OSC2 %&' CLKO '$(# 99 I/O 04+$(* & &&%5$& 4 $.+# # OSC1/CLKIN 05,0$++# RA6/OSC2 (# RA6 + %&'0( I/O 0 RB0-RB7 $.( I/O %+$* $"@? * $"&" (Pull-Up)!,( %&'%&+ 99"+1 - RB0/INT0 # 99"!, 0,RB1/INT1 # 99"!, 1,RB2/INT2 # 99"!, 2,RB3/INT3 # 99"!, 3(18F422), RB4-RB7 # $. 99"0
2.2.4 "$,% EEPROM 0,*!! PIC
#,#$&0,+,*$ %"$ (EEPROM) 5, EEPROM '+,*$ $.#,-+0 $. $.#,-0&,1*- %&'$0$+$ %&+ +,0668 +,(+,*$ #$&4 '0$+ 9, '5,# EEPROM '$( *4*+ '$&,%&%+ 0$++,$%&'$##$&0$+(9+ + *+*$4(**$*$4$ 5,5%$ RUN '0+*+40( EEPROM %&4**$$*+-0 '4*+(**$!$*$-%&%+ '$',( %"@?# EEPROM * flush memory (*$+@,#*$" +**&(5%$($+
2.3 + *112[1]
$0668 * *&0668&,%&"&0668 (Electric Energy) ("&& (Mechanical Energy) (#$*& $'5,(0( 0,+# $0668.)&#-$(%+0 2 '! * $0668'% (DC Motor) $(%&+ +,0668'% (DC Source) %&'$0668'% & (AC Motor) $(%&+ +,0668'% & (AC Source)
12
$0668'% '((#*&(%+ 1 $40$+ $ $0668'% -$%$ (Starting torque) $.**$40*+#+, %+$# ,*$5* *+#$ (0$+$' '(($4*+# $ 1
$0668$&((5*- '&($0668'% (DC Motor)
1. **$%*$40+,%&'$ 2. $)& +&,%& (response) 04 3. *$4 $.0(+
2.3.1 "% *112
$0668'% ', %$+&4. 2 #-,+'+#& #& '0%068(( ( %$+&4 2 $#-%$+&4$(& %)&(#&$*&0
2.8 #$0668'% [1]
$0668'% $%06 +,)+%.+0*$$ )+0(#&$ (#&$ $%$+&40668#-$ ,$#- (N) %&'##-( (S) $#-%$+&4.,+(&1 %$+&4)& $ $0(@$#4$C "$*$$$$0, %.+ $) +#*$$ &,0(&,##& %+$)&(#-%$+&4$ $-%$+&4.,+(&1*- ($ ,*.)&($0(@$#4$C&& $#$
13
2.3.2 $. *112
$0668'% '', +'+1-
2.9 5* #$0668'% [8]
- ##$"+ (Field Coil) *#&.",+#-%$+&4, 5*$ #-%$+&4#- (N) %&'#-( (S) %%$+&4.#&(#&-,: $%$+&4 '#-$ +,%06($
- ($"+ (Pole Pieces) *% #& $%$+&4., 5*$( #-%$+&4$ %)+&4+1 (Lamination Sheet Steel) "&'% 0& (Eddy Current) '(*$## $%$+&4&& #-%$+&4(#- $%$+&4$*$#$ %#- $%$+&4. )##-%$+&4(5*$ "
- ! (Motor Frame) * +&$!,#$ %&', +,+ (Stator) #$0!,(+$NO,#$ 5*$ # %%$+&4'+#-%$+&4( $%$+&4*
- (Armature) * +*& (Rotor) .,"& (Shaft) %&'$,$ (Bearing) $ &4%)+1 .'+ +1 "0"#&$ (Armature Winding) #&$ #& -,: +#&$ '$#&",+%&'$&$06%+##&$
14
0 &,#&$ +0*$$ $ )&# $%$+&4- ($ $*&
- (Commutator) * +*& + .,#$ %&'"&+$ *$$ %+%%#4'#,' %+&'%+%#*$$.%, ,:0$ (Mica) $ *$$#-%06 +,$ %.+ " +0(#&$
- .-$ (Brush) * $) *$$ %+ &,$)&$ *%06) $)% "(%#4%&'06680 $ ,++$%.+"0%06 +,#$ %.+%06 %&+ +, +,)+0( *$$
2.3.3 + (&'()
**$$- %+ 2 %, *
- #,4.$*# %"-/ #**$$ * (*+0$ $ 5,*+0 '*$4($#$ *%-0$+$' 7!""'&06 9 ,0(*$ $,$($&41 *%-(* $ ((% *$4) %+ '(*$4 $ $$,+(!'$5&,1 -*%-$'5,:"'!'%* + **$4#* ,4)
- #,5.4,$# 7-+7%%+ '+(&4* #,, & %&'$ '.8,%&,%&*+0 %&+ +,$$"% ##**$7-* .*$4&& )&#% %8($ '"$#-"?'*$4 +# , **$7-* $$$*$4%8 ($ '$*++,**$,*+0 **$%- $.#$0*$4 10 : 1 %&'(4*&+'% .&+,(6O&* )&#* $ *$4%&'%0#-+*,*$*+0 %&'(4*&*$4*0#-&+*$4+
15
2.3.4 PWM (Pulse Width Modulation)
PWM * *$#"&5, 99$,, %&' 99+-4* 99" $&,$" 99*$#"& ,,++ . 990668'% $,, 99 $&,$ 4 '0 99"&$*$* 2.10
2.10 % 99 PWM $$,, 990668[11]
$. '**$ '( +,'% 0 on %&' off ( ++1 ,*$.$' $4 '($$*$4+1 $*$0 .*$.0$4 '$%'1 0$+,
16
# PWM +
- PWM+,(6 0$5**5&& %&' (",%*+" 99,
(**$*$4 - PWM $' 7!" * Power Supply ' +,&04$- ON %&' OFF (FULL ON
and FULL OFF) - PWM (0*+ * %&' *$4 #$ "' Power Supply
' +,&04$- ON %&' OFF(FULL ON and FULL OFF) (**$*$4#$- %*$*+,1 '$((
**$*$4#$-4***$% +,( DC $ +,%($,$ 4 ',*$4 "$%( #- $4 ',*$4 #-$0, %+(%*#&# PWM - Pulse Width Modulation -0$+0+- 7#PWM - '**+#% (#$0,+* 5,0$+$ &,%& +0$+$)&**1$'
(&#**$*$4(%PWM -% '$ +,($- '.$+,*$4 + ' +,($ %&'(# PWM 1- '(*$.(+ $ "()&$-$*$, $#$,% DC ($
+!*"# PWM - '((+, *$4 0 %&'($* '$*$(&*, &4 ($ , 5,(!*"# (%PWM 5,:"'$#& '( MOSFET (Metal-Oxide-Semiconductor Field Effect Transistor) +$ $ 6 $. PWM 0*$. #-0 -%+ 50 KHz 0 .'$ 500 KHz $(& ( &, .'*+# -
5,&(**$$- '(&# PWM (Pulse Width Modulation) %&'$ (&-$',(**$$ $&,1 %&' &((**$$ * ' & $&0 $&0 *-,$,+ @6* $&0A (Free running multivibrator) %&'5,$.0( )&*& -', & 99 5,"# % '.0 "# 8 99 "&0"(7*&-
17
2.3.5 "% *
' &$&0 * 99$" 99 &,$ $. #- (0 4 ,++ 555 0 "-/#' & $&0 % ( 2.11 $+$ 2 ++$ 5,$.+, 99"#%+&' # + ($ +,06&-,( -*+ ' & ("& &,$" * % VCE1 %&' VCE2 5, 99"- '$ 99$%+$$ '+6 180 @ 2.12
2.11 % ' & $&0"-/[9]
2.12 0'%$&% *$ $"7#% +1 # ' &$&0[9]
18
%"$ *
2.11 %&' 0'%$&( 2.12 .(+&Q1 ,
t1 %&'+& Q2 , t2 *&( 1 '$*++
= + (2.1)
5,*+ t1 %&' t2 #-,+*+*&#%&'4' '$*+ +
= 0.693R1C1 (2.2)
= 0.693R2C2 (2.3)
- *$. 99" $*++
(2.4)
( 99"$-0&+ 50 % *$.# 99" '$*++
(2.5)
&$4%# ( minimum pulse width)
*$#"&*+ (minimum pulse width) # ' & $&0 .*+5, recovery time (tre) $,.4' C1 C2 ((4' ' $%*+$ Vcc $$+4' 4' %&,+ $ (E *+%*+$ '$*+", 90% #*+ Vcc 5, ' &(**$*$4#$'% - '(0 555 ($&- 99( IC 555 ' & $&0 ( Astable Multivibrator ) # ( R %&' C ++$0 555 &4,+
19
&?'+ R %&' C %+0 -& "' *&, *$. 5, $.%&',0, ' &0$&& 0$+ $ 998#$' 99(0 555 % 2.13
2.13 99(0 555[12]
2.13 99(0 555 # 7,0- # 2 %&'# 6 #0.++$%&'++$4' C1 "%#4' C1 C1 '' %)+- R1 %&' R2 $%*+$ C1 .'$ 2/3 VCC #,, 1 $ 99"0' 6&6&(0 8@,(# B # Q1 Q1 ( C1 $*,' )+ R2 0# 7 #0 )+& Q1 !,(0 '&%*+$ C1 '$ 1/3 VCC #,, 2 $ 99"0'6&6&(0 8@,&(# B # Q1 Q1 , ( C1 $' %($+*- %*+$ C1 &,%&,+'+ 1/3 VCC . 2/3 VCC
%# 99"# 3 $ 2 + *+% %&'+% 0 V #,+ 990 2.14
2.14 + 99 +1 # 99(0 555[12]
20
+& T1 %&' T2 # 99 0- (2.6)
(2.7)
2.4 ,&%,[2]
,"&&, ,"*&+&&( 5,&,- ## ," '+#, ( #.+, -(%%&'%&,(#-, &) $ +'& 5 + 0%+
1. ," (Belt) + #.+,%&'( #.+,,+ ,"-*&$ , "0,
2. &&- (Idlers) ," &&-- '$ 2 *
2.1 &&-&&, (Carrying Idlers)
2.2 &&- ,"& (Return Idlers)
3. & ," (Pulleys) %&'# ," %&'**$%( ," 4. # (Drive) +&#(& ," "# ,"%&' #.+,(
*& 5. 5* (Structure) +%&'?%#&&-(Idlers) %&'& ,"
(Pulleys) %&'*# ," (#' ,"&&,'0, + *9&, 1 + %+0$+$ +($*$ *9
@?/@ $+ ," 5, 1 0 ," ' + *9 +%( **# ,"&&, - &5* # ,",+* ,"- ''0, +'$$, %+&' +$*$ *9+(,+$' 7!"# ,"&&,- -
21
2.15 % +'# ,"&&,[2]
$, ( (Covers) '(%)+,-# ,"&&, ',,7$
, *' - ,+) $ *!"#%)+,-* ''$ *&?',!"%+&''$+ ''$$ +'#,
' *%#%)+,- * 8*$ ,,+5* ,"(Belt Carcass) #.+, -%)+,- '+&+ &&, (Carrying Side) ' @,$# (#',0$%6**!"#%)+,-%,7$#-*++1 .#-(- ++ 1 # ,"&&,$ 40 Q$%& *+&+-0%+ ,*$ $.(5* (A Measure of The Flex Life) # ,""' ,"( ,7$%&')N8,&
,+04$ (B 0$$, *' %&' +) $'+(, *' %&'(,N8,$(5* ," (Carcass Fabrics) *++ 1 *,( $*$ *90 *+&+-0$+0$,. !"*$ $.(5* # +) $#,%&')
!,& (Belt Carcass) * ," * +)+%$*$ 0#*& ,"
%&'&%'%# $ .&+,& ," 5, 5*# ," '',-#) (Plies or Layers of Fabric)$#,5,*$ , *&,, ,+04$5* ," ', )( -,$-# , (Cords) -#)($/ &+$ ,$%, (Warp Cord) ( +# ,0 (Filler Cord) &+$ ,$%, ' +%$%, &+$0 ' +#,+ %&'(%'%%&'? .,!"5,0#-) + (#%# ,"&&, '0%+ N8,7$%",$%, (Viscose Rayon) 0& (5"&'0$) %&'0$,$ (5"& ) ,"#-"@? *- '(%+(, (Asbestos), %&'(,%
(Breakers) Breakers ( "$,''+%)+,- (Cover) 5* ,"
(Carcass) %&',"$*$+'%%&'*$+%6# ,"*$ ,(5* ,"(Belt Carcass)
Breakers (,+5,0 $,+ 2 - 2 (0$
22
- Cord Breaker ', )+O - Leno Breaker )#+,O "$-$ (Leno) .( ,,
$%, 6B&, 0# )+ 0,#&, &, %&)(,+(%+-,0 0# 'O0
2.4.1 ',&
-,+".". )% '$#$&+ 1 %++ '0 %)- '**' $#.+, +5$, # , *$%+ %&' &, ,"($+0$+",%+#$&&+ %+)% '(*$*$ $. " ," '&,($'5,"$#- %&' +#%-$,"(('5,4$( ( &,0( ,"$5* ," %&'%)+-$' $(
(',&!#,4*.#( 1. &#*$ %&'*$4($' $#.+, 2. % ," (Tm) 3. ',&',# ," 0%+ #) %&' -)$%
4. *$-) %&' 5. # )+@,&& ," , ,"& 6. &5* ,"#- , 7. &*!"#5* ,"( 1, 2 3) 8. &*!"%&'*$#%)+,-
2.4.2 "#6,& ,&%,%
( . +% ,"$*+ 0 $*$ $ *-
4$*$ *+*$ ,#&&- ," "((% ' ,"&&, "($"-/(**+% $.*+%$ #$0 #-+ 1 0-
23
%"#
* %*&#$# (5&) * ' 7!"#&0 +.+,& (.0$+ (*+'$* 0.90) * ' 7!"#$# (.0$+ (*+'$* 0.95)
* *$4 ," (6+) Cwt * -% #-.+#*$ ,"%%5$.+
() I * *+'% #$#+0 $ (%$%)
= Power Factor = (2.8)
$ '$)&# Power Factor 0,5,5$ %&')&&"7- '%*+ (E x I x pf) 05, (*+0-
(2.9)
* &$ (%$)
+,$&$ )&&"7 %, 05, *++ $
1 '(**+-('+%E # +&" '( !"8 '"$$ ,+4$#-
%"%,& = BHP '% BHP = (2.10)
%"#6,&
24
* %% () = (2.11)
* %,+ () = (2.12)
* % () = (2.13)
2.5 $#
+% )& * +% *+#"0$ # + 5,% )&$- $% )&(% )&#$&+1 % )&- '% )&&05&+% & led %+ '(& % 7-segment 5,% )&- '% )&( ++1-
- .0%+&' - !$ &&
2.5.1 "%&'() "#*#!#.$"'"# LED
&05&+% (% + $$$+# 0668 &05&+% 05 $.&+% $0 % &+$ ', *&*$.,%&'6 + %+ % 7$*$4 ', *&$6 %&'*$.+ 1 $$ 05&+% )& $+ P-N $$8%0668 &4( + N %&'5;&( + P '*&# ,+&4%&'5;& '$ %&'&+,% $( !"$#&4 ' "& ' '.&&+,$(#% % &+$ '#-#)& %&'#
25
2.16 % $#&4 '%&'"& '.&&+,$[5]
5* #& LED "-/-',-# -$ 3 -*-%, %&&,$6 06 (Gallium Phosphide : GaP)-.$, %&-&,$06 06 (Gallium Arsenide Phosphide : GaAsP) - - %& '5S (Doped) ( 4 - $ '-# &*0"0 (Si3As4) %&%"+ "&0( 4 ,+ "-4 (P-N Junction) $%&00% 0# &4( 4 $"& #- $.#$,+0$5;&( " (% ,+"& 56&+ $&05&+ % ')& ,+ @ &45&$ A (Electro Luminescence) * ( $) # "$#&4+ 4 $ &0+ %&&,$0-6 06 (Gallium Arsenird Phosphide : GaAsP) %&&,$6 06 (Gallium Phosphide : GaP) "("&56 $ $ (& LED $.&+% $0
2.17 9&?%&'.#&05&+% [6]
5* #&05&+% .$,& "4 "8 *$ ,, (semi-conductor chip) ,+!,( %&' ++
26
*$,*&% $ &+% #&05&+% #- %)+ "&%$+&40668 '(% %+ 0$ (
2.5.2 "'( * DS1820 "'*"0 DS1820 0$' #$&$% 1 ,%&'.0+'$*$9:&%&'( , 99", 1 +- 5,0$+$ , 99C$**$ '.+,#$&$' #$&$(%1 ,#$& ' $ 99 Clock ( +*+##$& '" &?'# 9&? E , 99 (%+&'+#& ,+ @Time-SlotA 5,*& %&' # .'+1 ( #$&(%+&' Time-Slot $##0,+ .+,#$& '#-(%+&' Time-Slot - %.+,#$& '% Asynchronous (' bit 0$+$*$,##$&' byte ' %-$' '(( #$&'+0%) ,
2.18 % ##0 DS1820[14]
27
* DS1820 - DS1820 $. Interface 5,( , 99", , - DS1820 ",, $.!$05,0$+++$ - DS1820 $,+,+ +125 . -55 C - DS1820 $*$&',(0 0.5 C
0 DS1820 '( !$ 5, '(+$ !$ %&'% )&$% )&
2.5.3 "'( * DS1307
DS1307 0/&#&& $* (Dallas Semiconductor) $ +#$&% I2C % 2 wire $. 0 2 @ (bi-direction bus) /&# DS1307 - $.4#$& , , 5$, , , %&'Q 0 '& $.5$% 24 5$ 12 5$ AM/PM 40 !,$' %&+ +,06 5,.%&+ +,06&.0 DS1307 $. 0(06 % %&'+0 5,, $.?#$&00 5* $#-$ 8 #% ( 2.19 %&'$,&',##+ 1 -
2.19 %+#0 RTC DS1307[3]
VCC : (+06&-, +5V GND : (+ VBAT : (+% 3V "? (0$+$06&-, +, SDA : # +#$&,' I2C SCL : # 99C +#$&,' I2C SQW/OUT : #" 99 Square Wave $.&*$.0
28
X1, X2 : (+* &*$.$/ 32.768 kHz " /& ( IC
2.6 $'
+% * +*,$$ )#- + .*,+!,(*
5,&# +- '$ ,#-$.*,+(*& '$ ,"0$+*& . 5,( +- '( &#% 6 )#- % 6 *% $*$,*&+% %&0 - 0$+ $.$40, , #$?, * $- ( 4(% 6 ,$$($ 5, '@,&# '#% &+* ( +% %&+ &+,% 0 %&'$% '. $4 ' '% &$ #% +# '&- #-,+ %&' !"*$$ #. ' + '$ '& ,+ # , !""-)$*$, $ ' $. '% 0+ "-)$&?' %&'##'
2.20 % !* +%&' !*[4]
!* + ''0, LED infrared + D1 +$*+*$ R1 $ '% ( LED + 0$+( ,,
!* ''0, LED infrared D2 %&'*+*$ R2 ( LED ('% '+% Reverse $0$+$% $'$ '$*+*$ 0$+ $.'% 0 %+$$% $' *+*$ '&& $.'% 0
29
3
3.1
!"#$ % &' &%(')!*#+ $ !* ,,+,+!*#+ -.+(%* $$/ %!"#$. & %**$$0 $#&' 1/#&!2 *$$' 3% - & #45- %*!4 5 **% / &*$$ 3-%
!2 $'$6# %*! $%74+ *$6/6#) /&06/ 6# - &6# %* *$$% 6!!*#+ $#& 6#!*+ 6# !2$'$ / #4$6 * 3 &% %* 1/!2 ' &' (' !"#$ $+3%-$ '%* 3' 3.2
- $%0* -%$& /' *!2(! 3.1 *!*$'!*$') *$$11+ $6# *$$%%+ 1/$'(%11+ -!*%3% %*!8(%*$$3% *$$+ 1/ + $%--%% 6# $ %**$$3%'(% *6# $
- $ $$ %0 * ' % * ' ! * $ !2 - *$6/##'&$%0*') %* &*$$') !*95-/
- $$ '')
30
- $$ ! AutoCAD
- %#!4+ * *!*$!*$$ + (#$#+;;8* , #!"6#) *$$-%+ (#3%6#'%* , #3%#4&5( , #3%> ) %* '$ !6/1#!4+') %*$$(! !6/$+3%(% (Display)
- $$%$! %* ! 3.3 !
(! 3.1 $%0*
&% 6# ') *!2-# 3' 11+$ 1/& $ 3 &% %* 11+*';;8!%%+ -!*%3%' %*!%' 4%0 !2 % '-%+ -3%(% ' &/11+ *'4;;8 &$#!"6# - 6# ') '!
Input (Color Object)
Zx-color Sensor
Mechanic
Microcontroller
Display
Target
31
'
BINARY NUMBER
(! 3.2 $%0 * Color sensor
" ##$%%
&% 11+*'''&/!$6# %*0**$6# ) %*%$11+ '') 6#) ' )%0*!$5 -!%'+-#!2 %*''!%%+ -!%4;;8 &!2 4%%*'!'3%'!
COLOR SENSOR CIRCUIT
MICROCONTROLLER (A/D)
7 -SEGMENT
32
3.4 %&%&' 12 V
(! 3.3 &%''; 12 V
!2' ;&% &*' !&% ' '$+3%(12 %+) %*'!#!4+1 ')(5 %+)5 1 LM723 !2!%' &+-#('*&' 7 %+6/ 37 %+ 1/+-# * ''$-#%$ 5 %+ '+-# /('$ ' R1 ,R2 ,R3 6&'')('! (3.1)
(3.2)
'1+ 2N3055 ''1 LM723 -*- &* / %*1+ 2N2222 !2$ $1+ 2N3055 * * '(/ /('$1+ 2N3055
33
3.5 %( )##$%% Zx-color
(! 3.4 $$%$#%*3% Zx-color Sensor
!2 A/D 4%0 11+ !2+-# $%%+ (PIC 16F877) -!*%3% %*!%'!24%-+ D %%+(PIC 16F877) *'% ! '$%*'*$$+'! *411+ ' 3 %%+(PIC 16F877) 6# ')11+ 0*$%*'4!%%+(PIC 16F877) * &% LED 3% & D1 ((! 3.4) ' 6#3'11+ & D2 %* D3 6# ) ' ' 3'11+ ' 0* 1 7805 !2!%';;8 12 Vdc !2 5 Vdc -;!% %%+ (PIC 16F877)
34
3.1 !%' Analog to Digital '%*
!%' ADC Analog (V) Digital
0 7 50
0 7 0.977
00000001
51 7 100
0.996 7 1.972
00000011
101 7 150
1.972 7 2.929
00000111
151 7 200
2.949 7 3.906
00001111
201 7 255
3.925 7 5
00011111
% Zx-color %-$' +-# 11+ ' 0 7 5 V /!8(# 5 V !$''#$&%''-!2!$' % !8 pin RA1 '(' 0 7 5 V !2' Analog %%+1/ PIC16F877 $$ A/D $'%0 -+ A %*'+-# -+ D !%!2%*!%'%0!2% (4
Vin = (Vref/256)*%?$'% '!%4 (3.3)
4Digital *!3% -+ D * &&06/4 Digital
*/('$ Vin $-+ A
35
3.2 ' $ Zx-color
()
1 2 3 !
1
0
0
0
0
2
0.79
0.79
0.78
0.79
3
2.26
2.24
2.25
2.25
4
4.36
4.36
4.35
4.36
5
4.35
4.36
4.36
4.36
6
4.59
4.57
4.58
4.58
7
3.56
3.56
3.58
3.57
8
3.59
3.59
3.59
3.59
9
4.83
4.81
4.81
4.82
10
4.95
4.95
4.95
4.95
( **&'*&'6#$11+ 15 %%
36
3.6 %($
&% $$$#0+ 6$#0+ $%-'&*
(! 3.5 %$#0+
!8 +12v $ TR %* C3 *!*# %* &+-# (3) 1 555 !2' high C3 *+!*#3' D1 !$' C3 ''$ Vcc 6 *!2&# &+-# 3 %* 7 * '!2 Low
+-# (3) ' Low C1 *!*# 3' D2 !$' V '&% Vcc+-# 3 %* 7 * ' high %%$!!2' 1 Cycle
37
( ( t on ) (3.4)
= !$' =
0 6-'!$' * &+�/ '6%'!$' 0*'3% &+&# 1/!2!(
3.6.1 %%
! Proteus 7 Professional %$#0+ !$' %*4&' 1% (Duty cycle)
$#0+*!% ' Armature voltage 1/ '',+;;8 * %(! &% 6!% !%'% !B%*!B&%''1/*!2!% !%'C% & ' Pulse Width Modulation 1/* %%+&4(!% &% &$$# %duty cycle Pulse Width 6 %duty cycle 0* &'C% & &+� &6 %duty cycle 0* &'C% %* &+&#
(! 3.6 4-%+ $#+
38
*& Duty cycle %+,--*.$
'%!B4(# = 4 ms '%4$#& = 8 ms ' duty cycle (# = = 100 %
*&0' R1 = 10kΩ %* R2 = 100kΩ (!$') *'%
/(#%*#
T1 = 0.693 x R1x C1 ( '%(# )
T2 = 0.693 x R2x C2 ( '%# )
!$ R2 &/*'% # & +&# '!$ R2 &%*'% &+� (! 3.7
(! 3.7 4-%+!$!$'
39
3.6.2 *&$
4&%;;8%*$+ *&0$ 100 $' (rpm) &!*4 10 ' (rad/s) , ;D 2 1
P = (3.5)
P %;;8+ (W) $ (N-m) 0$ (rad/s) 4$ = F x r = 2 x 9.8 x 0.02 = 0.392 N-m F * (N) r , ;D+ (m) * P = 0.392 x 10 = 3.92 W
% +;;8* 12 w 4&** %+&#! 1 $ L = 2 r = 2 x 3.14 x 2 = 12.56 1'$
40
(! 3.8 $#&#+!"6#
41
3.7 % /(
'6# ' & 6# 3 &% %* 1/' * '%* *!#E% ' 0*C-* *& %*6# !#E%1/* %%+ !*%3%%*& 1+% %* '6# $ % & ' %1%*%1 1 AND Gate &% 1 %!1 OR Gate OR $1+1/'6( 1/'% 1 OR $%&00* %1 %*!$&'%- &' '!2' 6# $1+ %%** '% 1 !%%+- &%%+ &$ H-Bridge'!
(! 3.9 H-Bridge
(! 3.9 !2 H-Bridge 1/!2 %$&#+- !"6# 3'11+ &% H-Bridge &1+'%*'--%$+ *$'% 1 %%+-' &$1+'%* 1/%%+* &4% 1 '- 1+&/$% 1 0* &+ !2$' ' $ % 1 * !2 %$ % * * % $ !$$ )6 4 %%+
42
3.8 %& )
'3% ' ' output ' & $ 3%!2 $+3% 3%(%') 1/3% *3%&%!%' &&% led '* &%!2$$ 7-segment 3%*3% '')
- 6# $'%* - #4&5(%$$%
3.8.1 LED )
' *!2$$$+3%6# 3 %*#4&5(%$$% * &% LED '!2% (!$$ %** &%'&% LED
- & LED (
(! 3.10 LED &% ) '#
LED 6 - &% ) LED '# %* &%''&%' $ & LED (! 3.10 &%'' * '3%$ LED '%* -** &&%'' '6$ & LED - - '06&%' ' %*$$ * 6&% &%&/ *' & &%#&%$
43
- & LED
(! 3.11 LED &% ) '
LED &%) -) $$&/0 &%LED ' ''$$ '** '$3%* ' &' LED '%*
' *'&% LED $$3 $$# %* $$
(! 3.12 '&% LED $$3
240 ohm
12 v
240 ohm
12 V
20 mA
20 mA
40 mA
R =(12 – 7.2) 0.02
= 240 ohm
1.8V 1.8V1.8V 1.8V
Control
44
(! 3.13 % 2 &% '&% LED $$3
&%'' (# 12 V ' 1 1+* &% LED 8 &%1/'6'# 8 &% -* * (!*4 1.8*8 = 14.4 V) /'$$3 &% LED '$$# 4 &% 2 # %* 2 #' 0*- - (!*4 1.8*4 = 7.2V) %* 1+ BD140 $*$!2$#
45
(! 3.14 $%&%&'
46
3.8.2 %%/(0&
' *!2' 6/6# $ '%* !*$! &% %* 1/% % 0* 0*$6# ') 3'11+$ $+3% $6# *6$%*3% 2 &% &%&' %*&%$
5 $%&%&'* ;;8 12 Vdc &$1 7805 1/!2 !%; &&%;;8 5V -! $1 $'! 1/$ *4-# %%+ $11+ &'%'1/ *!*$1 CD4093B 1/!2!*5 CMOS $$ NAND Gate %* '#$0$!*#%* ''('-*&%3, !2&'%4-# 4-# 3'% 4 ' T = 10K x 10uF ( (! 3.14 ) 6/* 4-#%**!$ 5 1 74LS192 1/!21 $$$*1 1/*4+-# 2,3,6,7 1 74LS192 !2& BCD %*$1 7447 -6& BCD &!2 &%?$ %*!$+ 8 pin -$ 7-segment &%&' * ' * '1+' *!$+ 8 pin -!2$* & *&%!% 3%- - %*$6/$ 4 12 *!2 high &$!24%,-! '!
47
(! 3.15 $%&%$ (,)
(! 3.15 * 12 1 74LS192 !'$ 5 1 74LS192 2 1/!2$/-!2,%&%&' &% 4 12 1 74LS192 !2 High * && 4>!*# 5 '1 74LS192 2 * &1 74LS192 2 $%*$$$ $/ %* &4+-# 2,3,6,7 1/* 4+-#!2& BCD *!6&!2%?$!'$1 7447 1/!21 6& %*'!'$ LED '$$ 7-segment *&0' 1+'' * 4+-#1 7447 '$ 7-segment 1+- *& $* -* LED '!2 7-segment 1/**(- / 1+''%*1+
48
(! 3.16 $#4&5(%$$%
49
3.8.3 %%%(*1+
#4&5( * 1 DS1820 1/ DS1820 !21 *$$
(%#$$ 1 %*6'!2*$$ C%%* 4- 1 ' ' 4>$#&*6'(%&$*$$(%# $$) (%*& !24 Clock %*1 DS1820 6#4&5(*&' +125 6/ -55 C 1/!21 ' '%* %*' '%* 1 DS1307 1/!21 &$% #4$&%) 1 DS1307 60$'?%
!2 #4&5(%$$% %%+ !2 !*%3%(% %**$(%>1 DS1307 1/!21 $/'?% * %!2'6 4> 32.768 %F+ '('$1 DS1307 1 %* 2 %* ;% 3V % &$1 DS1307 - 1'% 1/* &'%' *4+-# 5,6 !'$2 %* 3 %%+(PIC16F877) '#4&5(* 1 DS1820 !2#4&5( &$''#4&5(* - 1 (1-Wire) %*'4+-#$ %%+(PIC16F877) 15 %%+(PIC16F877) (% #4&5(%*%0*!*%3%%* &4+-# 33-40 '*$ LED '$$7-segment 3' ULN2803A 1/!21+$* &$ &% LED
50
3.9 %'
' * ;!245 3-%4* 5 ;* $ %* ' '4 & 6#3' %*0* &% !'(% &+6#
(! 3.17 ;
; $'!2' ' %*$ '* '-*' &*&%3' LED ; '!%**' !24;
'$%$ (6) *!8 2.5 V ' 500 Ω '#!2$'
(3.6)
$ ( 7) 0' *,(-$' '' LED ;
$ ! $!$' LED ;$ $'$ 69 kΩ
51
*$ (6#'6/) * '*%% '' *$'*!2+
LM339 !2! $ $ (Comparator) 6 non-inverse > inverse * &+-#!2$ (High) '6 non-inverse < inverse * &+-#!2%$ (LOW) +-#* ''$' Vdd
%$ ' 3V ( 6) 6$( 7) ''%$ * & 1 !2 Low ' LED 0; ' 6#
'%$ ' 3V( 6) 6$( 7) ''%$ * & 1 !2 High %*' ! ' LED 0;*$ 6#
5+-# &% LED -!204;'$%*' '46/('&% LED * ' 6#3'*&'$%*' &% LED *$ %*+-# ( 1) '0$!*#-4$(bounce) /$' %0%*(% 1 '(%$#%%+
52
3.10 !
(! 3.18 $$
(! 3.18 !2$$ *!*$! -%% 1/!2' %% 6# '6# !2' 6# ') ; !*$; & !2' $; & !2$ 1/;!2' 3-%/ %*$+3% &$3%(%$ 3 %*#4&5(%$$%
() ()
!
53
4
4.1
!""# $ $"%&&' "%&&'$!() ("* #+,+$!!# ZX-color "-(-.#($++/#$!0 Oscilloscope /.11/ $# ""#. +2$%32#4 $ 5 4.1 , 4.2 , 4.3 , 4.4
5 4.1 5 4.2 ($3
5 4.3 Oscilloscope 5 4.4
54
4.2 ($!""#% $ 3 ($ $ ++$!!# $3 / "
4.2.1
($!" ++ ZX-color 8$$!!#$3 3 !"$3 . "- !"##9 ""* "-$(/ 811 Analog
1 #2(/% !9
4.1 (/++(% !9
$
(/++
((% (v)
"".(++#$3 ( mm) #$
%(#$
9
3.01
2.85
15
9
.
4.78
4.30
15
9
-
0.77
0.62
15
! 1 $(/++((% !9 !".,% $( -!"( ".!"(!$$($$( ( % . ( , ! " ( 4 . ( % $ " " # $
55
!"($("%(#$ /"(4. 9" 2,!"-. "(/,!"2% $
2 #2(/% !"*
4.2 (/++(% !"*
$
(/++
((% (v)
"".(++#$3 ( mm) #$
%(#$
9
3.01
2.78
15
9
.
4.78
4.28
15
9
-
0.85
0.78
15
! 2 $(/++((% !"* !".,% $( - ! " ( " . ! " ( ! $ $( $$( (%.( ,!"(4. (% $ (!" # 1 (("*%( $$ !2-. %(" %(.#9 +29 !"*" $$ " % !"(4. %( "%(3 !2 :/""* "%(#$
#(%&&' 811, $!" - 8 11! /!"-% . " !2% -% "$4 "11,++. 811! 0* C % "-11!% 811#$3()"$3(%
56
4.2.2 !
($ /!"$# ,$/" / !"#( "!"$( duty cycle (!"-. $. ("
3 /"%(. (no load) "%( . " /# %(- .5(#/
(-./(
4.3 #24/"%(. (no load)
(V)
!$%
(m)
m/s
$& duty cycle (%)
1.2
2.4
3.6
4.8
6.0
7.2
8.4
9.6
10.8
0 1 1 1 1 1 1 1 1
0
0.026
0.100
0.138
0.167
0.167
0.167
0.198
0.198
10%
20%
30%
40%
50%
60%
70%
80%
90%
57
4 /". /". !". 2 ## $ . 0.5 kg " . 1 kg - '()(*+( = 0.5 kg
4.4 #24/". 0.5 kg
(V)
!$%
(m)
m/s
$& duty cycle (%)
1.2
2.4
3.6
4.8
6.0
7.2
8.4
9.6
10.8
0 1 1 1 1 1 1 1 1
0
0.019
0.085
0.110
0.143
0.143
0.167
0.167
0.167
10%
20%
30%
40%
50%
60%
70%
80%
90%
58
- '()(*+( = 1 kg
4.5 #24/". 1 kg
(V)
!$%
(m)
m/s
$& duty cycle (%)
1.2
2.4
3.6
4.8
6.0
7.2
8.4
9.6
10.8
0 1 1 1 1 1 1 1 1
0
0.008
0.063
0.100
0.125
0.143
0.143
0.143
0.143
10%
20%
30%
40%
50%
60%
70%
80%
90%
! 4.3 , 4.4 " 4.5 !".,% $("/%(. (no load) !"(4.
/% ,$$( /". .(%.( ,(4. / (
59
4.2.3 & $
($$3 8- ;$3$( "<0/ / !"8$#5(#-/
5 $3 3 "".(".$($3 2 cm 5 cm " 10 cm
4.6 4($$3"".((
! 5 4.6 !".,% $(($$33$3% ,$/(# 0.026 m/s "".(".$($3 3 "" 0.02 m 0.05 m " 0.10 m "!"3$3% "".(".$($3 0.10 m "#,$/ 3$3% %( 4/) !2% $(($$3!"-% ("<0/"".(".$($3 0.10 m
(m)
(m/s)
( % ) "
#$ 1 "#$ 2
"#$ 3
"#$ 4
"#$ 5
"#$ 6
"#$ 7
"#$ 8
"#$ 9
"#$ 10
0.02
0.026 100
0.148 10
0.200 10
0.05
0.026 100
0.148 30
0.200 10
0.10
0.026 100
0.148 100
0.200 100
60
4.2.4 $%$ ,+-
8$. $ ($++$!!# / "!"/($$3 # #4 $ +2 38$ . (!"#(8 (
6 $3 3 #/ 4.8 V - %
4.7 4$+
.
.'( (Kg)
& $
'
(% .'
1 0.5 - 1 0 0
2 0.5 . %(- 1 1 0
3 0.5 - %(- 1 1 1
4 0.5 - 2 1 1
5 0.5 . %(- 2 2 1
6 0.5 - %(- 2 2 2
7 0.5 . %(- 2 3 2
8 0.5 - %(- 2 3 3
9 0.5 - 3 3 3
10 0.5 - %(- 3 3 4
61
- %(%
4.8 4$+.
.
.'( (Kg)
& $
'
(% .'
1 0.5 . - 0 1 0
2 0.5 - %(- 0 1 1
3 0.5 %(- 1 1 1
4 0.5 - %(- 1 1 2
5 0.5 . - 1 2 2
6 0.5 %(- 2 2 2
7 0.5 - %(- 2 2 3
8 0.5 - %(- 2 2 4
9 0.5 %(- 3 2 4
10 0.5 . - 3 3 4
62
- %.'
4.9 4$+-
.
.'( (Kg)
& $
'
(% .'
1 0.5 %(- 1 0 0
2 0.5 - - 1 0 1
3 0.5 . %(- 1 1 1
4 0.5 %(- 2 1 1
5 0.5 . %(- 2 2 1
6 0.5 - - 2 2 2
7 0.5 . %(- 2 3 2
8 0.5 - - 2 3 3
9 0.5 %(- 3 3 3
10 0.5 - - 3 3 4
! 6 !"8 !"-
C !!"-"4!-$$34(++ +2 ! 4.7 , 4.8 " 4.9 !"-"4!-$$3 3 ("!"-% -.%$ (
63
4.3 1
1 " 2 8++$!!# !",#4(/% !++ /!"-(/% ($$!$#-($()
3 " 4 8/ !"-$!$#$,$ "-$""% !-$ +2!"- 2 *" "%(. (no load) "". ".!"-. /% (4. ,$ $
5 8($$3 !"-$3"".(".$($3 3 "" $ 0.02 m 0.05 m " 0.10 m +2!($$3 3$3% "".(".$($3(# 0.10 m "#,$/ "#
6 8$ ($!"$ 1 32 5 $ !""#!-$$3(" +243% C "4#4
64
5
5.1
ZX-color ! 3 "# $ %&& '() $"* #&+#*$,-).* ,& &'/ 0)!#!, #&1) )2,.*"'34"&*! )$"'#. #& .*%
$",+#+#,##&05".2 ,05".2 ),05".2. ,#&,6#,&,)+*#'&5 0.1% %&8)$)&8,"# $ $&8 )'/9&)+*##!
5.2
1. ZX-color )$ &&),, %$"$", sensor 0&&),*",, 2)0
2. ')#+#+*#2, &', "## 3. +# "# LED )$ '/)$ " &2+#,& +##*#(*'&"*#"# LED &)$!,*
4. ) *()$ #&2*& *)% #&&"* 5. "#,,!1& ,&!1"2**&)$&&)$*-&&2 )*#&+#
65
5.3
1. ZX-color & sensitive 2 . #&!,, .* calibrate 2,, %)$"+#)###
2. +#&)2,**&)$")!'*#!'
3. ) *"# "#$"%),!",(&,+#"%),
4. ) $"'3 0)$)+*#2, ,'( +*#) *! 5. &*"# LED ,05".2#
66
[1] , Retrieved 19 2551 , from http://www.rmutphysics.com/CHARUD/scibook/electric4/topweek9.htm
[2] RTC (Real Time Clock) DS1307 , Retrieved 29 2551 , from http://www.mind-tek.net/ds1307.php
[3] , Retrieved 29 2551, from http://www.thaiconveyorbelt.com/index.php?lay=show...
[4] ! " , Retrieved 22 2551, from http://www.mut.ac.th/~c_micro/workshop/acct3/acct3_ir1ss.html
[5] #$%&! , Retrieved 29 2551 , from http://www.rmutphysics.com/charud/specialnews/6/semiconductor/index12.htm
[6] #$%&! -LED , Retrieved 29 2551 , from http://www.kingsolder.com/electronics/equipment/led.asp
[7] !( ) ZX-COLOR , Retrieved 17 * 2551, from http:// www.es.co.th [8] #""+,! , Retrieved 25 2551, from http://research.crma.ac.th/ [9] # , Retrieved 22 2551, from http://webserv.kmitl.ac.th/.../data4-3.htm
[10] ! !, ) , Retrieved 26 2551, from http://www.miracle-cafe.890m.com/board/lofiversion/index.php/t8.html
[11] --. PWM , Retrieved 6 2551, from http://introduction-pwm.blogspot.com/2007/09/pwm.html
[12] #)/ 555 , Retrieved 19 2551, from http://www.sptc.ac.th/prapruet/devicesweb/books/book_8.htm [13] AID pinout diagram for the PIC 16F877, Retrieved 19 2551,
from http:// www.interaccess.org/aid/diagram.html [14] DS1820 , Retrieved 29 2551 ,
from http://www.thailabresearch.com/default.asp?content=project&pID=30 [15] LDR 0#! ,12 #301, Retrieved 19 2551,
from http://electronics.se-ed.com/contents/041s060/041s060_p01.asp
68
68
69
70
71
72
! "# $"%% !&$"'() $" ! * ) + ,'() $"% $" +-. '.&%$& + ! "&+%%%),% '/$"%!) ,"%"# '() ! " +)*" &%$%,+0)& ) $%$"$& ,% $"%0"& $),% "$&&$&"+ ) $"% $& .$(DC MOTOR) ++)$*/ %!%&%$&+ +&$% +%. %1&+%%$&$ ! +,&%23 %23) ! +$" * ) + .' '/$"%' ! $&4"',
73
'() -.,5.
! * ) +
23$& ! $&.
+%-' * + .1 $$$& +
74
.1 % "",226$ 12V 10A
JP1-JP5 = Connector 2 PIN D1 = Diode Bridge C1 = C 1000uF C2-C3 = C 100uF Q1-Q3 = Transistor 2N3055 * = IC LM723 Q4 = Transistor 2N2222 R1-R3 = R 0.1 Ω R4 = R 3.3 KΩ
75
.2 %55.%$+)
JP1-JP4 = Connector 2PIN VR1 = IC 7805 C1 = C 100uF C2-C3 = C 22uF Y1 = Crystal 20M R1 = R 500 Ω 16F877* = PIC16F877
76
.3 %%'%!%.
D1-D2 = Diode 1N4001 JP1-JP2 = Connector 2 PIN C3-C4 = 0.01uF C5 = 0.1uF U1 = IC NE555 R5 = R ", 100 KΩ R6 = R 10K Ω Q3 = Transistor IRFZ46
77
.4 %)$+)
JP1-JP6 = Connector 2 PIN VR1 = IC 7805 C1 = C 100uF C2 = C 10uF C3 - C4 = C 22uF 7408 = IC 74LS08 7432 = IC 74LS32 R1-R2 = R 500 Ω R3 5 R4 = R 10KΩ DS1-DS2 = LED 5mm($+ ) R5-R14 = R 500 Ω D1 = Diode 1N4148 Y1 = Crystal 20M * = PIC16F877 S1-S3 = $%)5.)- "
78
.5 % H-Bridge
JP1-JP4 = Connector 2 PIN R1-R6 = R 500 Ω Q1-Q2 = Transistor BD140 Q3-Q6 = Transistor BD139 D1-D4 = Diode 1N4001
79
.6 % "%
JP1-JP2 = Connector 2 PIN JP4-JP5 = Connector 2 PIN JP4 = Connector 8 PIN C1,C3 = C 100uF C2,C4,C5 = C 10uF VR1 = IC 7805 R3 = 10 K Ω R4 = R 100 KΩ D1 = Diode 1N4148 U1* = IC 4093B U2* = IC 74LS192 U3* = IC 74LS47 S1 = $%)5.)- " R7 = R 500 Ω Q1-Q7 = Transistor BD140
80
.7 % $)
JP1-JP2,JP4-JP5 = Connector 2 PIN JP3 = Connector 8 PIN U2* = IC 74LS192 U3* = IC 74LS47 Q1-Q7 = Transistor BD140
81
.8 %'17*)$ %
JP1-JP2,JP4-JP5 = Connector 2 PIN JP3 = Connector 8 PIN VR1 = IC 7805 C1 = C 100uF C2-C3 = C 22pF CRYTAL1* = Crystal 20M CRYTAL2* = Crystal 32.678M R1 = 500 Ω S1 = $%)5.)- " C4-C5 = C 15pF BATT* = +$"-" 3V DS1307* = IC DS1307 R7-R8 = R 10K Ω R2 = R 1 K Ω R3-R6 = R 500 Ω 16F877* = PIC16F877 DS1820* = IC DS18S20 JP3 = Connector 8 PIN ULN2803* = IC ULN 2803