3. Project Team
Imran Zahid
Faiza Waheed
Asst. Prof. Cdr (R) Riaz Mahmud TI (M)
Lect. Engr. Farhan Khan
Department of Electronics & Power Engineering
Pakistan Navy Engineering College (PNEC)
National University of Sciences and Technology (NUST)
3
4. Scheme of Presentation
• Aims & Objectives
• Scope of Project
• Robot Mechanical Assembly
• Hardware Design
• Firmware Design
• PID results and analysis
• System Limitations
• Practical Applications 4
5. Aims & Objectives
• Making a completely Embedded video/image
procuring system
• Developing a Wireless RF digital control
system for robot which is as user-friendly as
possible.
• Developing a surveillance system to observe
& monitor the surroundings as required by
user
5
6. Scope of Project
• Prototype model design of SPyDER is
capable of the following:
– Wireless RF digital control system
– 2-axis servo mount camera giving the robot wide range of
viewing even when it is stationary
– Wireless video transmission
– Speed control of DC motors through discrete PID controller
– Easy & Precise control for robot movement through joystick
– Autonomous obstacle detection & hurdle avoidance
6
12. Hardware Design
• The hardware section consist of two parts
– On-board SPyDER ; that is interfaced
with the Robot Assembly
&
– The other interfaced with the control
station; laptop & stand-alone joystick
module
12
13. Control Station
Control Module
COMMAND DATA ACQUISITION & TRANSMISSION
ANALOG HM-TR RF
AVR MICROCONTROLLER
JOYSTICK Transceiver
WARNING DISPLAY
13
15. On-board SPyDER
On-Board SPyDER Control
Circuitry
Proximity
Sensor/s
Hope HM-TR CAMERA PAN TILT
RF Transceiver ASSEMBLY
ANTENNA
Servo Motor
Servo Driver Elevation Control
Servo Motor
Servo Driver
MICROCONTROLLER
Azimuth Control
AVR ATmega16
ATmega16 ATmega16
H-BRIDGE H-BRIDGE
ENCODER ENCODER
WORM GEAR WORM GEAR
MOTOR MOTOR
RIGHT MOTOR DRIVE
LEFT MOTOR DRIVE
15
17. On-Board Robot Circuitry
• Implementation of Discrete PID
Controller on each DC Motor for
accurate speed control
• Two H-Bridges to control the direction
of DC motors for motion of SPyDER
• Two Servo motors for camera pan tilt
control
17
21. PID Controller
• A PID Controller attempts to correct the error b/w the
measured process variable & a desired set-point by
calculating & then outputting a corrective action that can
adjust the process accordingly
Discrete PID Controller
+
SPEED
MOTOR
PWM
Error CONTROLLER
Reference
-
ENCODER
REFERNECE: Charles L. Philips, Royce D. Harbor, Feedback Control Systems, Third Edition, (1996)
21
22. PID Controller Flow-chart
START
System Configuration
SPI Interrupt Get Reference
1
Error = Ref – Vel.Sensor Velocity Sensor
P-Out = Kp x Error
Integral error +=error
I-Out = Integral error x Ki
Derivative error = error - Prv error
D-Out = Derivative error x Kd
F-Out = I-Out + P-Out + D-Out
Prv error = Error 1
22
23. DC Motor Transfer Function
Here KM is the steady-state gain of the system and TM is known as the time-constant of the system
and is defined as the time at which the system output reaches the 63.2 % of the steady-state value.
• Equation 1 : (1)
Equation 2 shows the transfer functions obtained for each step applied.
• Equation 2 : (2)
where the values of TM and KM substituted for G1 through G3 are in milliseconds and RPMs
respectively.
Equation 3 displays the model obtained with this approximation.
• Equation 3 : (3)
Once we've derived the nominal model of the motor (Equation 3), we proceed to tune the parameters
of the PID controller.
REFERNECE: Makea PI controller on an 8-bit micro By Crescencio Hernandez-Rosales, Ricardo
Femat-Flores, and Griselda Quiroz-Compean
23
29. Firmware Design
Firmware includes all of the software required
to run the control systems involved in SPyDER
– Microcontroller programming in C language
– Developing GUI in Visual Basic
– Interface between Control Station and Robot
Hardware
29
30. Flowchart Control Command
Acquisition / Transmission
START
System Configuration
Input from JOYSTICK
Serial Communication Config.
(255,128)
(94,18)
ADC Conversion
Get Input from ADC Register
(255,128)
(128,128)
Arithmetic operation on raw data
(0,128)
Attach Pre-words
(128,0)
Transfer Data Through USART Transmission from HM-TR Transceiver
YES
If Sensors
Display Warning
Flag valid
NO
RETURN TO WAIT
FOR COMMAND 30
31. Control Word Transmission
The following Words are generated by the Base-Station Micro-controller to be transmitted
to the Embedded Controller on-board SPyDER .
PRE WORD REF LEFT REF RIGHT
(f,r,b,l) (0-36) (0-36)
31
32. Control Word Reception
The Words generated by the Base-station controller are received by the Embedded
Micro-controller on-board SPyDER and then sent to the PID controller circuit in the
following manner.
REF PRE WORD
(0-36) (f,r,b)
32
33. Flowchart Control Command
Reception / Implementation
START
System Configuration
Serial Communication Config.
Get Input from USART 0 Reception at HM-TR Transceiver
(Connected to HM-TR Transceiver)
Decoding & Comparison
Transfer Data to respective slave
mControllers through SPI
YES
If Sensor Send Warning to USART 0
Flag valid
NO
RETURN TO START
33
34. Joystick Control
The robot operates by using a simple PS2 joystick
• Following are the operation modes of SPyDER
– The main operation mode is simply the forward
and reverse motion simulated by the movement of
the analog joystick with variable speed
– The second operation mode; by pressing the
button with the ‘□’ symbol; is for initiating the
braking mechanism of SPyDER
– The third operation mode; by pressing the button
with the ‘∆’ symbol along with the analog joystick;
is for allowing SPyDER to accomplish compass
rotation
– The fourth operation mode; by pressing the button
with the ‘O’ symbol along with the analog joystick;
is for allowing SPyDER to accomplish axis
rotation
– The fifth operation mode; by pressing the button
with the ‘X’ symbol along with the analog joystick;
is also forward and reverse motion only the speed
in fixed at a particular value
34
35. Wireless (CCTV) Video Transmission
CCTV is the abbreviated form of closed circuit television that consists of a
television and some tiny cameras to record and play live events happening
within its cover area.
• Digital Video Recording (DVR) Cards:
These cards are purpose built for surveillance
systems. These cards have many advanced
function available and they are costlier as
compared to TV Tuner Cards. A digital video
recorder (DVR) or personal video recorder
(PVR) is a device that records video in a digital
format to a disk drive or other memory medium
within a device.
35
36. GUI
• A graphical user interface (GUI) is a graphical display
that contains devices, or components, that enable a user
to perform interactive tasks. To perform these tasks, the
user of the GUI does not have to create a script or type
commands at the command line. Often, the user does
not have to know the details of the task at hand.
• The GUI components can be menus, toolbars, push
buttons, radio buttons, list boxes, and sliders; just to
name a few.
• We have developed the GUI for video acquisition in
VISUAL BASIC.
36
38. System Limitations
• Constrained space available for Embedded
Electronics & batteries
• Speed resolution is restricted i.e. 0-33 steps due
to low resolution of speed sensor
• Electronic braking is not very effective at high
speeds
• Range for hurdle detection is 5cm
• The battery power consumption for controller &
motor driving circuitry is high
38
39. Practical Applications
– For traversing through complex terrains &
obstacles
– Surveillance of unreachable passageways &
unstructured environments
– Disaster area inspection
– Initial surveillance of potentially dangerous areas
– Mine field detection
– Earthquake Hazards
– Overt security surveillance
– For Military Monitoring purposes
39
40. References
• PID Control Theory Matt Krass http://www.team358.org/
by
• Maurice, B. quot;ST62 microcontrollers drive home appliance motor
technology, AN885/1196,quot; Application Note, ST Microelectronics,
1998, http://www.st.com/.
• Katausky, J., I. Horder, and L. Smith. quot;Analog/Digital Processing with
Microcontrollers,quot; AR-526 Applications Engineers, Intel
Corporation, http://www.intel.com/.
• Data sheet. quot;W78E858 8-bit microcontroller,quot; Winbond Electronics,
Rev. A4, May 2004.
• Data sheet. quot;DS5000T Soft microcontroller Module,quot; Dallas
Semiconductors,http://www.maxim-ic.com/.
• Make a PID controller on an 8-bit micro by Crescencio Hernandez-
Rosales, Ricardo Femat-Flores, and Griselda Quiroz-Compean
http://www.embedded.com/
40