me 3484 - nyu tandon school of...
Post on 28-Jan-2020
0 Views
Preview:
TRANSCRIPT
ME 3484
Integrated Term Project Prototype:
Smart Cane
Group 9: Daniella Bacskay Yahya Khattab
Bumsoo Kim
5/1/03Abstract
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 Frequency (hertz) Low High
Humans 20 20,000 Cats 100 32,000 Dogs 40 46,000 Horses 31 40,000 Elephants 16 12,000 Cattle 16 40,000 Bats 1,000 150,000 Grasshoppers and locusts 100 50,000 Rodents 1,000 100,000 Whales and dolphins 70 150,000 Seals and sea lions 200 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 CostIR Transmitter with heat shrink tubing $5.20
Infrared Receiver $2.60
Devantech SRF04 Ultrasonic Range Finder $32.95
Board of Education & BS2 $100.00
9V Battery + AA battery $5.50
ZH15431 brush motor (vibration motor) $2.50
Cane $15.00
Mosfet IRF510 $1.99
SI Diode IN4001 $0.95
NE555 CMOS Timer $2.00
DS1804 -100K $4.00
Box $2.00
Miscellaneous $10.00
Total
Cost Analysis for Mass Production $50-70
Program:
'{$STAMP BS2}x var word 'for the motorsy var wordn var wordoutput 10low 10input 14input 15
clik0: ' loop here while the button is upif in14=1 then clik0 ' decide if it is up(1) or down(0)goto mainn=0 ' zero the timer
clik: ' loop here while the button is upif in15=0 then clik0pause 5000if in14=1 then drop ' decide if it is up(1) or down(0)n=0 ' zero the timer
clik1: ' loop here while the button is downn=n+1 ' increment the timer
if n=500 then longclik ' branch out if it reaches 500if in15=0 then clik0 ' or loop until the button goes back up(1)
main: '------------------infrared--------------------------------IR_det VAR bit 'bit variable for saving IR
'InitializationOUTPUT 12 'Set I/O pin 7 to an output
'Main RoutineFREQOUT 12, 1, 38500 'Send a freqout signalIR_det = IN13 'store IR detector outputDEBUG home, bin1 IR_det,crPAUSE 20
if IR_det=0 then normal 'if you detect stairs then play a falling freqout 7,50,3800 sound, 0 means stairsfreqout 7,50,2533freqout 7,50,1900
normal:n=0 ' r rezero the time
'------------------sonar sensor-----------------------------wDist var wordINT con 0ECHO con 1
convfac con 74
main_sonar:pulsout INT, 5output INTrctime ECHO, 1, wDistwDist = wDist/convfacpause 10debug dec wDist, crif wDist<24 then motor1if wDist<36 then motor2if wDist<48 then motor3
if in14=1 then clikgoto clik0
'------------------motor levels-----------------------------
motor1:
output 10 '555 timer on/offoutput 4 'up/downoutput 5 'incrementoutput 3 ' chip select
high 10low 3low 4
for x = 1 to 99high 5low 5next
high 4
for y = 1 to 1high 5low 5next
goto here'--------------------------------motor2---------------------motor2:
output 10 '555 timer on/offoutput 4 'up/downoutput 5 'incrementoutput 3 ' chip select
high 10low 3low 4
for x = 1 to 99high 5low 5next
high 4
for y = 1 to 30high 5low 5next
goto here
'------------------------motor3-----------------------------motor3:
output 10 '555 timer on/offoutput 4 'up/downoutput 5 'incrementoutput 3 ' chip select
high 10low 3low 4
for x = 1 to 99high 5low 5next
high 4
for y = 1 to 65high 5low 5next
goto here
'-----------------------------------------------------------
drop: ' if user drops cane ' r loop until the button goes back upfreqout 7,50,3800 ' r play a unique falling soundfreqout 7,50,2533freqout 7,50,1900if in15=0 then clik0if in14=1 then dropgoto clik0 ' r back to the top
here:low 10 'infinite loop'if in15=0 then clikif in14=1 then clikgoto clik0
longclik: ' come here if pushbutton is held down.freqout 7,5,3800,2533 ' r play a chirp in a loop
if in15=0 then longclik ' r loop here until the button goes back upgoto clik ' 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
top related