Beruflich Dokumente
Kultur Dokumente
3. Image analysis: Certain tools are used to analyze the content in the image
captured and derive conclusions e.g. locating position of an object.
Image Processor
e.g. PC, DSP
Machine Control
e.g. Using parallel port to control
motors
System Overview
1. Image capturing can be done using video camera available in various resolutions
e.g. 640 x 480 pixels. There are two types of cameras generally available: Digital
cameras (CCD – charge coupled device and CMOS sensor based) and analogue
cameras. Digital cameras generally have a direct interface with computer (USB
port),but analogue cameras require suitable grabbing card or TV tuner card for
interfacingwith PC.Power requirements: CCD cameras give high quality, low-noise
images. It generates an analog signal and uses analog to digital converter (ADC)
and thus consumes high power. CMOS cameras have lesser sensitivity resulting
in poor image quality but consume lesser power resulting in more battery life.
i. Color
ii. Intensity
iii. Texture or pattern
iv. Edges – circular, straight, vertical stripes
v. Structure – Arrangement of objects in a specific manner
To achieve this using PC, its parallel port or serial port can be used for
driving the robot. For e.g. H-bridge, PWM control can be extensively
used for right and left motor movement of a robot. Serial-port can be
used for transferring data, which necessitates a micro-controller on the
robot to interpret the data.
Once the image acquisition setup is ready, the captured images need to be
stored in suitable format to process them. Generally, a raw image is stored
as a matrix of color intensities.
MATLAB provides a very easy platform for image acquisition and
processing. Even serial and parallel ports can be directly accessed using
MATLAB. It serves as a handy tool for beginner level VCM. It provides a
powerful built-in library of many useful functions for image processing.
An Open source equivalent of MATLAB is SCILAB (can be downloaded
from http://www.scilab.org for free) and Scilab Image Processing (SIP)
toolbox (http://siptoolbox.sourceforge.net). However, support available in
SIP is limited as there are a few developers who contribute to this toolbox.
Approach:
MATLAB provides support to access serial port (also called as COM port) and
parallel port (also called as printer port or LPT port) of a PC.
Note: If you are using a desktop PC or an old laptop, you will most probably have
both, parallel and serial ports. However in newer laptops parallel port may not be
available.
Parallel Port
Parallel port has 25 pins as shown in figure below. Parallel port cables are locally
available (commonly referred as printer port cables). These cables are handy to
connect port pins with your circuit. Pins 2-9 are bi-directional data pins (pin 9
gives the most significant bit (MSB)), pins 10-13 and 15 are output pins (status
pins), pins 1,14,16,17 are input pins (control pins), while pins 18-25 are Ground
pins.
MATLAB has an adaptor to access the parallel port (similar to adaptor for image
acquisition). To access the parallel port in MATLAB, define an object .
b. Serial Port :
3. Materials suggested :
Plywood - 6mm
Acrylic - 4mm to 8mm
Aluminum - 2mm onwards
SOFTWARE COMPONENTS DESCRIPTION
1. Eagle Software:
MATLAB is built around the MATLAB language, sometimes called M-code or simply
M. The simplest way to execute M-code is to type it in at the prompt, >> , in the
Command Window, one of the elements of the MATLAB Desktop. In this way, MATLAB
can be used as an interactive mathematical shell. Sequences of commands can be
saved in a text file, typically using the MATLAB Editor, as a script or encapsulated into a
function, extending the commands available.
MATLAB is a "Matrix Laboratory", and as such it provides many convenient ways for
creating matrices of various dimensions.. A matrix generally refers to a multi-dimensional
matrix, that is, a matrix with more than one dimension, for instance, an N×M, an N×M×L,
etc., where N, M, and L are greater than 1.
Once the image acquisition setup is ready, the captured images need to be stored in
suitable format to process them. Generally, a raw image is stored as a matrix of color
intensities.
.
Working with Images
Let us begin with the basic instructions to read
and display an image in MATLAB.
Reading an image
Once you have started MATLAB, type the
following in the Command Window
>> im=imread(‘imagename.jpg');
This command stores the image imagename.jpg
in a variable with name im.
Displaying an image :-
You can display the image in another window by using imshow command
>>figure,imshow(im);
This pops up another window (called as figure window), and displays the
image im
M-files :-
A Hall effect sensor is a transducer that varies its output voltage in response
to changes in magnetic field. Hall sensors are used for proximity switching,
positioning, speed detection, and current sensing applications.In its simplest
form, the sensor operates as an analogue transducer, directly returning a
voltage. With a known magnetic field, its distance from the Hall plate can be
determined. Using groups of sensors, the relative position of the magnet can be
deduced.
Electricity carried through a conductor will produce a magnetic field that varies
with current, and a Hall sensor can be used to measure the current without
interrupting the circuit. Typically, the sensor is integrated with a wound core or
permanent magnet that surrounds the conductor to be measured. Hall sensors
are commonly used to time the speed of wheels and shafts, such as for
internal combustion engine ignition timing or tachometers. They are used in
brushless DC electric motors to detect the position of the permanent magnet.
In the pictured wheel carrying two equally
spaced magnets, the voltage from the
sensor will peak twice for each revolution.
This arrangement is commonly used to
regulate the speed of disc drives.
2. 8051 Microcontroller :
The Intel 8051 is a single chip microcontroller (µC) . Intel's original 8051 family was
developed using NMOS technology, but later versions, identified by a letter "C" in their
name, e.g. 80C51, used CMOS technology and were less power-hungry than their
NMOS predecessors - this made them eminently more suitable for battery-powered
devices.
A particularly useful feature of the 8051 core is the inclusion of a boolean processing
engine which allows bit-level boolean logic operations to be carried out directly and
efficiently on internal registers and RAM. This feature helped to cement the 8051's
popularity in industrial control applications. Another valued feature is that it has four
separate register sets, which can be used to greatly reduce interrupt latency
compared to the more common method of storing interrupt context on a stack. 8051
based microcontrollers typically include one or two UARTs, two or three timers, 128 or
256 bytes of internal data RAM (16 bytes of which are bit-addressable), up to 128
bytes of I/O, 512 bytes to 64 kB of internal program memory, and sometimes a
quantity of extended data RAM (ERAM) located in the external data space.
Important features of 8051
1. It provides many functions (CPU, RAM, ROM, I/O, interrupt logic, timer, etc.) in a
single package
2. 8-bit data bus - It can access 8 bits of data in one operation (hence it is an 8-bit
microcontroller)
3. 16-bit address bus - It can access 216 memory locations - 64 kB each of RAM and
ROM
Dc servo motor characteristics include inertia, physical shape, costs, shaft resonance,
shaft configuration, speed, and weight. Although these dc servo motors have similar
torque ratings, their physical and electrical constants vary.
5. Proximity Sensor :-
Proximity sensors are sensors able to detect the presence of nearby objects
without any physical contact. A proximity sensor often emits an
electromagnetic or electrostatic field, or a beam of electromagnetic radiation
(infrared, for instance), and looks for changes in the field or return signal. The
object being sensed is often referred to as the proximity sensor's target.
Different proximity sensor targets demand different sensors. For example, a
capacitive or photoelectric sensor might be suitable for a plastic target; an
inductive proximity sensor requires a metal target.
The maximum distance that this sensor can detect is defined "nominal range".
Some sensors have adjustments of the nominal range or means to report a
graduated detection distance.
Proximity sensors can have a high reliability and long functional life because of
the absence of mechanical parts and lack of physical contact between sensor
and the sensed object. A proximity sensor adjusted to a very short range is
often used as a touch switch.
5. DRIVING A MOTOR USING H-BRIDGE :-
Specialized circuits (motor drivers) have been developed to supply motors with
power and to isolate the other ICs from electrical problems. These circuits can be
designed such that they can be completely separate boards, reusable from project
to project.
A very popular circuit for driving DC motors (ordinary or gear head) is called an H-
bridge.
An H-bridge is an electronic circuit which enables DC electric motors to be run
forwards or backwards. These circuits are often used in robotics. H-bridges are
available as integrated circuits, or can be built from separate components.
Structure of an H-bridge (highlighted in red)
Columns
Rows
How are digital images stored?
1 0
0 1
(x − a)2 + (y − b)2 − r2 = 0
It has three parameters: two parameters for the
centre of the circle and one for the radius of
the circle.
Disadvantage :
Here only one circle can be detected.
Total 17460/-
Bibliography
Wikipedia
Google
Techfest.org
Books :-
Getting started with Matlab-7 by R.P. Singh
Mohammad Mazidi -8051 microcontroller
Thank you !!!!!