Mechatronics’ Project Team 6 Riccardo Castellani Edoardo Mura Andrea Pacilli The hunter (a 3D...

13
Mechatronics’ Project Team 6 Riccardo Castellani Edoardo Mura Andrea Pacilli The hunter (a 3D tracking system) Mechatronics’ Project
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    221
  • download

    0

Transcript of Mechatronics’ Project Team 6 Riccardo Castellani Edoardo Mura Andrea Pacilli The hunter (a 3D...

Mechatronics’ Project

Team 6Riccardo Castellani

Edoardo MuraAndrea Pacilli

The hunter (a 3D tracking system)

Mechatronics’ Project

RADAR BASE - AIR PATROL

To Operator

PULSEECHO

The hunter

Part used:• Ping sensor• 2 servo motors• Compass module• Lcd Display• Piezo speaker• 2 555 timers• 2 push buttons

Angle (Relative to NORTH)Target Distance (cm)

Kill Switch

Display button

555 timers

Piezo speaker

Hardware

Compass module

Algorithm’s approach:• First 2D• Implementation of the 2D algorithm adding

the second axis• 3D square spiral

FOR timer=1 TO maxtimerL[…]PULSOUT 14, lateral+deltaLPAUSE 30[…]

NEXT

deltaLlateraltimerLtimerdeltaLleLpartialAng max/)2(

Monitoring the motors’ position

Number of pulses

Duration

0

0

'

'

'

cos0sin

010

sin0cos

1l

z

y

x

z

y

x

'xRx y

''' xRx z

2

0

0

''

''

''

100

0cossin

0sincos

'

'

'

lz

y

x

z

y

x

cossincos

sin

sincoscos

2

1

2

ld

ld

ld

z

y

x

Rotation matrixes

)360(TotalAngle

The position in

space

~ 4 kHzsquare wave

• Duty cycle: 50%

BS2

Pin4• First 555: beeping rate (7Hz)• Second 555: Piezo frequency(4kHz)

• R1 = R2

7 H

zsqu

are w

ave

HIGHif target acquired

LOWif sweeping

555 timers’ cascade and piezo-speaker

(both 555 are in astable configuration)

BS2 – MATLAB serial communications

• Purpose: MATLAB to get data from BS2

PING))) locks on target

BS2 idles until MATLAB flags

MATLAB flags to BS2: ready to get data!

BS2 transfers data to MATLAB(SEROUT 16,84,[DEC …,CR])

MATLAB stores data & processes it

Transmission settings:DATA RATE: 9600 bpsPORT: COM6 (usb)TERMINATOR: ‘CR’TIMEOUT: 0.1 (Matlab) (BS2)MATLAB

constantly‘listening’

Plot

MATLAB-BS2 GUI interface

X = 50 Y = 0 Z = 20

Algorithm

Do

[…]

Loop until (in the range of detection)

Main loop

Compass measurementsand absolute angle

3D position2nd loop

3rd loop

Matlab

For […] distance monitor […]Next

SERIN 16,84,[DEC flag]SEROUT 16,84,[DEC partialAngleL ,CR]SEROUT 16,84,[DEC partialAngleA,CR]SEROUT 16,84,[DEC cmDistance,CR]

Wide range of applications:• Alarm and position detection• On a robot to monitor surrounding space• Monitoring an open space

Conclusions

The main limitations of our project are basically due to:• Wide cone of the Ping sensor• Inertia of servos• Approximation while computing the variables