JI 2013 Sensor Technologies

download JI 2013 Sensor Technologies

of 8

Transcript of JI 2013 Sensor Technologies

  • 8/12/2019 JI 2013 Sensor Technologies

    1/8

    Mech a t ro n ics / Sen so r Tech n o lo g y / P ro g rammin g

    B: Sensor Technologies

    T hi s S en s or Tec hn o lo g ie s l e ct u re i s p e rf o rm e d o n t he p r ac t ic e o r ie n te dmetho d . Man y k in d s o f SENSORS a re p rep ared fo r y ou su ch as t empera ture ,

    l ig ht , d is ta nc e , a cc el er at io n , s ou nd , en di ng , g yr o, i nf ra re d s en so rs a nd

    compass module.

    ! t f i rs t , yo u are asked to apprec ia te each sensor"s function us ing fol lo #ing

    e$uipments .

    % & ig it al Mu lt i% Met er ' M!STE() M!S*+*

    % &r.&! ( da t a l o g ger con n ect ed to - ( . ' - ico Tech n olo g y% -icoScope /0 -( Oscil losco pe ' - ico Technology

    Secondary , you ha1e some elect ronic oard as sem ling pract ice usin g fol lo#i ng

    materials,

    % Bread% oard

    % 2E&

    % -3 ( Mic ro %con tro lle r

    % R es is to r an d ot he r el ec tr on ic p ar ts .

    % 4 ires .

    % Some actuators .

    By this oard, you study on the -3(, -eripheral 3nterface (ontrol ler.

    % c o py in g me t ho d of s of t #a r e' ) E5 % fi l e f ro m - 3( .

    % d o# nl oa di ng ) e6 %f il e to an ot he r -3 (.

    ! f ter the a o1e preparat ions , you ha1e fo l lo# ing pract ices ,

    % ( %p ro gr am mi ng for -3( .

    % 4 i r ing on read% oard as your sensor tes t ing oard .

    1

  • 8/12/2019 JI 2013 Sensor Technologies

    2/8

    Mech a t ro n ics / Sen so r Tech n o lo g y / P ro g rammin g

    B.1 Sensor testing board-urpose %%% to kno# a out -3( , assem ler soft#are, csoft#are ROM%#riter, method of do#nloading and function testing.

    PIC Test Circuit Design

    (onnect ion Speci f icat ion

    3nput7Outpu t - inO 8ects

    -or t 9aria le )ard

    -o r t ! -3 N ! / R! / ' S 4 ;

    -3 N ! ; R! / ' + S 4

    2

    PI C 1

    6 F

    8 7 7 A

    12

    34567891

    01

    11

    21

    31415

    161

    71

    81920

    4

    039

    383

    7363

    534333

    23

    13

    02

    92

    82726

    252

    42

    32221

    X1

    1!

    3

    4!

    1 1

    "1! "

    8

    # $ t to n1

    !# $ t t

    o n3

    U1

    15

    %

    1 2&1

    &2

    "9

    7805

    U2

  • 8/12/2019 JI 2013 Sensor Technologies

    3/8

  • 8/12/2019 JI 2013 Sensor Technologies

    4/8

    Mech a t ro n ics / Sen so r Tech n o lo g y / P ro g rammin g

    2E& on7off (ontrol y ( soft#are

    Hi n c l ud e I ; > *==! .hJ 77 de f i ne de1 i ce d r i 1 er Hfu ses )S ,NO4 &T,NO-ROT E ( T,NO2 9 - ,BRO4 NOGT, -GT 7 7 d e f i n e co n f i g u ra t i o nHu se d elay ' c lo ck K / / / / / / / 7 7 d ef ine c l o ck ' /M )F

    H yte p or t aK? 77 de f i ne reg i s te r add res sH yte por t K>

    1oi d ma i n ' 77 ma i n fu n c t i o nL

    i n t s# ; , s# , s# +

    se t t r i s a ' /6 f f 7 7 d ef ine p or t a K a l l i n p u t ' / Kou tpu t ,; K i n pu tse t t r i s ' / 7 7 d ef ine p or t K al l ou tpu tpo r t K/6 ?? 7 7 i n i t i a l i Fe p or t K /6 ??

    #hi le ' ; 7 7 ma i n l oopL

    s #;K i np u t ' p i n a/ 7 7 p i n a/ 1 ar ia l e co n t ro ls # K i np u t ' p i n a; 7 7 p i n a; 1 ar ia l e co n t ro ls #+K i np u t ' p i n a 7 7 p i n a 1 ar ia l e co n t ro l

    i f ' s# ; KK / L 77 i f p u sh o t ton ;po r t K/6 f f 7 7 p or t I K /6 ff ' o u tp u t

    e l se i f ' s# K K/ L 7 7 i f p u sh o t tonpo r t K/6 f / 7 7 p or t I K /6 f / 'o u tp u t

    e l se i f ' s#+K K/ L 7 7 i f p u sh o t ton+po r t K/6 / f 7 7 p or t I K /6 / f 'o u tp u t

    e l seL 7 7 n o t p u sh o t to nou tp u t h i gh ' p i n / 77 p i n / A p i n = 1ar ia le co n t ro lou tpu t lo# 'p in ;o u t p u t h i g h 'p i n

    ou tpu t lo# 'p in +o u t p u t h i g h 'p i n 0outpu t lo# 'p in ?o u t p u t h i g h 'p i n >outpu t lo# 'p in =

    E6ercise%%% Make a p rogram to l ink 2E&.

    B li nk in g i nt er 1a ls a re /. ?s ec 7B ut to n; , ; se c7B ut to n a nd

    sec7Button+.

    E6ercise%%% Make a p rogram to sh i f t a g i1en 2E& sta tus lef t .

    But ton ;7 sh i f t l ef t ; sec in ter1al . But ton 7 s top sh i f t ing .

    4

    2E& ini t ial status (

  • 8/12/2019 JI 2013 Sensor Technologies

    5/8

    Mech a t ro n ics / Sen so r Tech n o lo g y / P ro g rammin g

    B.2 Basic single stage amplifiers

    Exercise B.2.1 ---- Test the functions of a given oper ational amplifier using you rLED-board about non-inverting and inverting amplifier s.

    Non- invert ing amplifi er Inver ting amplifie r

    .

    Exercise B.2.2 ---- Test the functions of a given transistors referencingfollo!ing diagrams.

    5

    http://en.wikipedia.org/wiki/File:Op-Amp_Inverting_Amplifier.svghttp://en.wikipedia.org/wiki/File:Op-Amp_Non-Inverting_Amplifier.svghttp://upload.wikimedia.org/wikipedia/commons/0/0b/Op-amps.jpg
  • 8/12/2019 JI 2013 Sensor Technologies

    6/8

  • 8/12/2019 JI 2013 Sensor Technologies

    7/8

    Mech a t ro n ics / Sen so r Tech n o lo g y / P ro g rammin g

    Sensor practice

    &esign remote control ler using 3R%2E& and 3R%sensor.- ic tu re el o# s ho #s a # ir in g i ma ge . S ee t he d at a s he et o f 3 nf ra Re d

    recei1er.

    Samp le ( p ro g ram fo r t h i s p rac t i ce # i l l e d e l i 1 e red a f t e r sh o r t t ech n ica llecture.

    -3( ;> *0! 3nfrared 2E& 3nfrared recei1er

    Sensor practice +

    ! f ter s tudy ing of R(%ser1o motor con t ro l y -3 ( , des ign your o#n ser1omo tor mo t io n co n tro l sy s t em u s in g Bend in g sen so r p as t ed o n y o ur p a lm.' Spark un end ing sensor

    7

  • 8/12/2019 JI 2013 Sensor Technologies

    8/8

    Mech a t ro n ics / Sen so r Tech n o lo g y / P ro g rammin g

    Sensor practice 0

    Try to d r i1e &(%motor using the c i rcu i t o f Sensor p ract ice and &( motor d r i1er data sheet .

    !ppendi6 &ri1e fo l lo# ing S tepp ing%Motor.

    8