Download ME 3484

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Control system wikipedia , lookup

Capacitor wikipedia , lookup

Voltage optimisation wikipedia , lookup

Induction motor wikipedia , lookup

Rectifier wikipedia , lookup

Spark-gap transmitter wikipedia , lookup

Brushed DC electric motor wikipedia , lookup

Transmission line loudspeaker wikipedia , lookup

Power electronics wikipedia , lookup

Schmitt trigger wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Stepper motor wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Buck converter wikipedia , lookup

Wien bridge oscillator wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Heterodyne wikipedia , lookup

Regenerative circuit wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Variable-frequency drive wikipedia , lookup

Opto-isolator wikipedia , lookup

Transcript
ME 3484
Integrated Term Project Prototype:
Smart Cane
Group 9: Daniella Bacskay
Yahya Khattab
Bumsoo Kim
5/1/03
Abstract
The objective is to design a smart cane that will detect different distances of an
approaching object and output a corresponding vibration. This user friendly interface is
equipped with comforting handle, easily installable, and aesthetically appealing. The
user may set the standard detection distance as it may vary for the purpose of beginners,
who are just starting to adjust and become familiar with a cane, to advanced users.
Introduction
The user will be able to recognize how far a specific object is and to thus get
around it. First, the user has to press a button on the cane continuously and then release it
to start the detection process. The detection process will only start operating once at a
standard distance that is defined by that user because if the user is a beginner they may
prefer for precautious reasons to know the distance much a head of time.
The user will have to press for a short period of time and release that button to
recheck the distance and generate the corresponding sounds and vibration again. The user
has the option of pressing that button for a longer period of time and then releasing to
terminate the cane’s operation. To accomplish this, an infrared or ultra-sonic sensor is
placed in front of the cane and also an infared transmitter and receiver is placed at an
angle at the bottom of the cane. For the vibration a 555-CMOS Timer in an astable mode
is used with a brush motor (vibration motor). In addition, if the user forgets or drops the
cane and is unable to find it, the cane will send out a certain sound that will alert that user
of its location, this will be incorporated through a 4-lead pushbutton that will terminate
when the person is continuously holding the cane. The importance of the cane is due to
its physical necessity such as, if there is a pot hole, a sidewalk, or stairs it will allow the
user to beware of that drop or increment.
Background
IR Transmitter with Heat Shrink Tubing:
Figure 1: IR Transmitter with Heat Shrink Tubing
This IR Transmitter with Heat Shrink Tubing is used as an object detection sensor.
The infrared LED transmits a signal that is bounced off an object and then is received by
an infrared receiver. The infrared LED is controlled by frequency; thus, using BASIC
Stamp 2 this is controlled by the FREQOUT command.
Technical Specifications:

Forward voltage: MAX 1.5v

Power Dissipation: 100mW

Continuous forward current: 50mA

Tolerance of: +/- .010 (.25) on all nonnominal dimensions unless otherwise specified.

Operating Temperature: (-40 to +100)◦C
Infrared Receiver:
Figure 2: Infrared Receiver
Infrared can be used to detect the difference between black and white for line
following. Infrared can also be used to determine the distance of an object from the other
object. It can be used to detect and avoid high ledges, and it can use this information to
follow objects at a fixed distance. The infrared detectors send signals to the BASIC
Stamp indicating whether or not they detect infrared reflected off an object. For example,
then the BASIC Stamp, makes decisions and operates the servo motors based on this
input where a stopper will come out informing the physically disabled person to stop.
The IR detectors have built-in optical filters that allow very little light except the
980 nm. infrared that we want to detect onto its internal photodiode sensor. The infrared
detector also has an electronic filter that only allows signals around 38.5 kHz to pass
through. In other words, the detector is only looking for infrared flashed on and off at
38,500 times per second. This prevents interference from common IR interference
sources such as sunlight and indoor lighting. Sunlight is DC interference (0 Hz), and
house lighting tends to flash on and off at either 100 or 120 Hz, depending on the main
power source in the country where you reside. Since120 Hz is way outside the electronic
filter’s 38.5 kHz band pass frequency, it is, for all practical purposes, completely ignored
by the IR detectors.
Devantech SRF04 ultrasonic range finder:
Figure 3: Devantech SRF04 ultrasonic range finder
The Devantech SRF04 ultrasonic range finder provides precise, non-contact
distance measurements from about 3 cm (1.2 inches) to 3 meters (3.3 yards). It is very
easy to connect to BASIC Stamps or the Javelin, requiring only two I/O pins. The SRF04
works by transmitting an ultrasonic (well above human hearing range) pulse and
measuring the time it takes to "hear" the pulse echo. Output from the SRF04 is in the
form of a variable-width pulse that corresponds to the distance to the target.
Requirements and Capabilities:
• Voltage – 5V
• Current - 30mA Typ. 50mA Max.
• Frequency - 40KHz
• Max Range - 3 m
• Min Range - 3 cm
• Sensitivity - Detect 3cm diameter broom handle at > 2 m
• Input Trigger - 10uS Min. TTL level pulse
• Echo Pulse - Positive TTL level signal, width proportional to range.
• Small Size – (1.7 in x .8 in x .7 in height) 43mm x 20mm x 17mm height
The SRF04 detects objects by emitting a short burst of sound and "listening" for
the echo. Under control of the BASIC Stamp, the SRF04 emits an ultrasonic (40 kHz)
sound pulse. This pulse travels through the air at about 1.1 feet per millisecond (the speed
of sound), hits an object and then bounces back. By measuring the time between the
transmission of the pulse and the echo return, the distance to the object can be determined.
The SRF04 outputs a high-going pulse that corresponds to time required for the
echo to return. PULSIN can be used to measure it and determine the distance to the target.
There's a convenient side-effect with PULSIN on the BASIC Stamp 2: the value returned
for the round-trip is in two microsecond units – the same as a one-way trip (sensor to
target) in one microsecond units. The trigger pulse must be at least 10 microseconds long.
PULSOUT can do this for us. The other requirement is that we must wait 10 milliseconds
between measurements.
Frequency Range of Hearing for Humans and Selected Animals:
Animal
Humans
Cats
Frequency (hertz)
Low
High
20
100
20,000
32,000
Dogs
Horses
Elephants
Cattle
Bats
Grasshoppers and locusts
Rodents
Whales and dolphins
Seals and sea lions
40
31
16
16
1,000
100
1,000
70
200
46,000
40,000
12,000
40,000
150,000
50,000
100,000
150,000
55,000
Reference: Encyclopedia Britannica
Sonar is a system in which objects are detected by sound waves. These waves are
very high in frequency and are called ultrasonic. Ultrasound waves have frequencies
above 20 kHz. Few animals can hear ultrasonic waves. Some of the animals that can hear
them are dogs, cats, porpoises, rodents, whales, dolphins, seals, sea lions and bats. The
Ultrasonic Dog Chaser produces a discomforting, but not harmful, high frequency sound,
audible to dogs but not to humans. The frequency range is 20,000 Hz - 25,000 Hz, the
intensity is 135 dB and the effective range is within 20 feet. Although the dogs may hear
the sounds that we cannot hear, they may not respond adversely to them. However they
would only do so if the decibel value was high enough to hurt them.
Capacitor:
A capacitor is a passive electronic component that stores energy in the form of an
electrostatic field. In its simplest form, a capacitor consists of two conducting plates
separated by an insulating material called the dielectric. The capacitance is directly
proportional to the surface areas of the plates, and is inversely proportional to the
separation between the plates. Capacitance also depends on the dielectric constant of the
substance separating the plates. The standard unit of capacitance is the farad, abbreviated
as F. This is a large unit; more common units are the microfarad, abbreviated µF, pF.
Capacitors can be fabricated onto integrated circuit (IC) chips.
They are commonly used in conjunction with transistors in dynamic random
access memory (DRAM). The capacitors help maintain the contents of memory. Because
of their tiny physical size, these components have low capacitance. They must be
recharged thousands of times per second or the DRAM will lose its data. Large capacitors
are used in the power supplies of electronic equipment of all types, including computers
and their peripherals. In these systems, the capacitors smooth out the rectified utility AC,
providing pure, battery-like DC.
DC motor:
A DC motor is an electromechanical device in which an electrical input
determines the speed and the direction of the rotation. DC motors are used extensively in
various applications such as robotics, security doors and vending machines.
Figure 4: DC motor
The DC motor can be controlled in many ways and has many technical
considerations. Depending on the voltage provided to the motor it will either run faster
or slower. There are many ways to control the rate of rotation, but the way that it was
implemented was to use a potentiometer and a 555-timer. The 555-timer gives out on
and off pulses to the DC motor. These pulses are dependent on the resistance value
which is changed by the digital potentiometer.
Resistor:
A resistor is an electrical component that limits or regulates the flow of electrical
current in an electronic circuit. Resistors can also be used to provide a specific voltage for
an active device such as a transistor. All other factors being equal, in a direct-current
(DC) circuit, the current through a resistor is inversely proportional to its resistance, and
directly proportional to the voltage across it.
This is the well-known Ohm's Law. In alternating-current (AC) circuits, this rule
also applies as long as the resistor does not contain inductance or capacitance. A resistor
is a component that has electrical resistance and that is used to control the flow of current
in an electronic circuit.
BASIC Stamp 2 Module:
Figure 5: BASIC Stamp 2 Module
This module normally has no shortage of program space or I/O pins. Serial PC
interface provides enhanced debug features. The BS2-IC is recommended for first-time
BASIC Stamp users because of the many resources, documentation, source code, and
customer projects that are available for the BS2-IC. A PIC-based PBASIC interpreter is
used.
Board of Education:
Figure 6: Board of Education
This Board of Education requires the use of a BASIC Stamp 2. This Board of Education
is used to teach microcontroller programming and interfacing. Mechanically interlocked
power supply to prevent dual connection of wall-pack and 9-volt battery; DB9 connector
for BS2-IC programming and serial communication during run-time; P0 - P15 I/O pins,
Vdd and Vss connections brought adjacent to 5.1 x 3.5 cm (2" x 1 3/8") breadboard area;
Includes set of ten (10) color-coded 22 gauge wires; Female 10-pin dual row connector
for optional AppMods (more breadboard space); Traces on top of the board show
connections between BS2-IC and breadboard connections; and #28150 does not include a
BS2-IC or power supply.
Equipment

IR Transmitter with heat shrink tubing and Infrared Receiver

Devantech SRF04 Ultrasonic Range Finder

BASIC Stamp Editor program

BASIC Stamp II

Board of Education

Programming cable

Transistor

Diode

Two 4-Lead Pushbuttons (Tact Switch)

ZH1531 A Brush Motor (vibration motor)

Parallax Servomotor

Stopper (soft wire hits leg informing a need to stop)

CMOS 555 Timer (NE 555N)

DS1804-100 (100K) Solid State Potentiometer

100 ohm, ¼ watt resistors (brown, black, brown)

100 picoF and Two 0.22 F Capacitors

9 Volt battery or wall transformer

Connecting wires

Cane
Diagrams of Circuit
Figure 1: Physical Picture for Electrical Circuit Setup (IR receiver and transmitter)
Figure 2: Schematic Diagram
Cost Analysis
Items
IR Transmitter with heat shrink tubing
Infrared Receiver
Devantech SRF04 Ultrasonic Range Finder
Board of Education & BS2
9V Battery + AA battery
ZH15431 brush motor (vibration motor)
Cost
$5.20
$2.60
$32.95
$100.00
$5.50
$2.50
$15.00
$1.99
$0.95
$2.00
$4.00
$2.00
$10.00
Cane
Mosfet IRF510
SI Diode IN4001
NE555 CMOS Timer
DS1804 -100K
Box
Miscellaneous
Total
Cost Analysis for Mass Production
$50-70
Program:
'{$STAMP BS2}
x var word
y var word
n var word
output 10
low 10
input 14
input 15
'for the motors
clik0:
is up
if in14=1 then clik0
down(0)
goto main
n=0
' loop here while the button
clik:
is up
if in15=0 then clik0
pause 5000
if in14=1 then drop
down(0)
n=0
' loop here while the button
clik1:
is down
n=n+1
' loop here while the button
' decide if it is up(1) or
' zero the timer
' decide if it is up(1) or
' zero the timer
' increment the timer
if n=500 then longclik
reaches 500
if in15=0 then clik0
goes back up(1)
' branch out if it
' or loop until the button
main:
'------------------infrared-------------------------------IR_det VAR bit
'bit variable for
saving IR
'Initialization
OUTPUT 12
'Set I/O pin 7 to an
output
FREQOUT 12, 1, 38500
signal
IR_det = IN13
output
DEBUG home, bin1 IR_det,cr
PAUSE 20
'Main Routine
'Send a freqout
'store IR detector
if IR_det=0 then normal 'if you detect stairs then play a falling
freqout 7,50,3800
sound, 0 means stairs
freqout 7,50,2533
freqout 7,50,1900
normal:
n=0
' r rezero the time
'------------------sonar sensor----------------------------wDist var word
INT con 0
ECHO con 1
convfac con 74
main_sonar:
pulsout INT, 5
output INT
rctime ECHO, 1, wDist
wDist = wDist/convfac
pause 10
debug dec wDist, cr
if wDist<24 then motor1
if wDist<36 then motor2
if wDist<48 then motor3
if in14=1 then clik
goto clik0
'------------------motor levels-----------------------------
motor1:
output
output
output
output
10
4
5
3
'555 timer on/off
'up/down
'increment
' chip select
high 10
low 3
low 4
for x = 1 to 99
high 5
low 5
next
high 4
for y = 1 to 1
high 5
low 5
next
goto here
'--------------------------------motor2--------------------motor2:
output
output
output
output
10
4
5
3
'555 timer on/off
'up/down
'increment
' chip select
high 10
low 3
low 4
for x = 1 to 99
high 5
low 5
next
high 4
for y = 1 to 30
high 5
low 5
next
goto here
'------------------------motor3----------------------------motor3:
output
output
output
output
10
4
5
3
'555 timer on/off
'up/down
'increment
' chip select
high 10
low 3
low 4
for x = 1 to 99
high 5
low 5
next
high 4
for y = 1 to 65
high 5
low 5
next
goto here
'----------------------------------------------------------drop:
goes back up
freqout 7,50,3800
sound
freqout 7,50,2533
freqout 7,50,1900
if in15=0 then clik0
if in14=1 then drop
goto clik0
' if user drops cane
' r loop until the button
' r play a unique falling
' r back to the top
here:
low 10
'infinite loop
'if in15=0 then clik
if in14=1 then clik
goto clik0
longclik:
pushbutton is held down.
freqout 7,5,3800,2533
chirp in a loop
' come here if
' r play a
if in15=0 then longclik
the button goes back up
goto clik
' r loop here until
' back to the top
Conclusion
Smart Sensors are not just a fad, they are the wave of the future. As more people
realize the value of these inventions the field will grow without bounds. This can be
demonstrated by the design specified. It’s practical, cost efficient and extremely useful.
If all of these characteristics weren’t enough to warrant investigation into this field of
study, these inventions will also make the inventor very wealthy.
Reference
1. “What is a Microcontroller”,
http://www.parallax.com/Downloads/Documentation/edu/What's_a_Microcontroller.
pdf
2. “Earth Measurements”,
http://www.parallax.com/Downloads/Documentation/edu/Earth_Measurements.pdf
3. “Robotics”
http://www.parallax.com/Downloads/Documentation/edu/Robotics.pdf
4. “Motor selection”, http://www.robotroom.com/TinyMotor.html
5. “Ultrasonic applications”, http://hypertextbook.com/facts/1998/JuanCancel.shtml