Mobile Robot Controlled by a Phone
Amit K Singh Sudip Pathak
Advisor: Dr. Tarek M. Sobh Technical Advisors: Professor S. Grodzinsky, Professor L. Hmurcik Computer Science and Engineering University of Bridgeport
Table of Contents:
1. Abstract 2. Objective 4. Design Ideas
2 3 3 7 7 8 9 12 12 13 15 16 18 20 21 23 25 32 35 35 36 37 39 42 43 49 51 52
3. Introduction and Background Search ----------------------------a) Build a robot with a phone chip --------------------------b) Using the Internet telephony server --------------------c) A combination of the Phone and the Internet -------5. Methodology and Justification 7. Implementation ---------------------------------6. Hardware/software and test equipment required -------------------------------------------------------------------------------A) Ring Detect and Phone Line Connection B) DTMF Decoder C) FPGA Control
i) Relay Switch ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
i) Clock Division Module ii) Ring Detect Module
iii) Robot Control Module ---------------------------------iv) Motor Control module ---------------------------------D) Assembling various parts and combining the different modules --------------------------------------------8. Economic Analysis ---------------------------------------------------9. Safety Concern 11. Appendices A) VHDL Source Code for Clock Division Module ----------B) VHDL Source Code for Ring Detect Module ----------C) VHDL Source Code for Robot Control Module ----------D) VHDL Source Code for MotorControl Module ----------E) Combine all the VHDL modules -------------------------------12. Bibliography ------------------------------------------------------------------------------------------------------------10. Conclusions and Future Directions ------------------------------ -
Mobile Robots have numerous applications: unmanned exploration, land mine removal, energy plants and manufacturing factories. Robotics as a field has a long history since 1801 when Joseph Jacquard invented a textile machine, which operated by punch cards. Today over 100,000 robots are in use in the United States, compared with millions of computers and cell phones. Robotics, as an area, has undergone a significant change in the last two decades. Dramatic improvements in optimization, profound changes in costs and vast increases in applications have made it possible for us to consider a design of a personal robot.
We introduce a cost-effective robot that may be used in our everyday life. The idea is simple and has been the focus of many researchers, namely using a remote controller to request a robot to perform a specific job just as a remote controller is used for a TV to change channels. Our focus is on reducing the costs and making the robot controllable by a device that almost every person in the United States owns – a phone. With the introduction of video cell phones it will be possible for the user to see the robotic movement in real-time. Examples include “calling” the robot on the way home from work and have it do various jobs like vacuum the room and sprinkle the garden. This could also be done by logging on to the web server via an internet connected device and sending signals to the robot, or directly sending specific commands to the robot through cellular phones to a wireless server at home (with or without a web connection).
The objective of this project is to introduce an idea of controlling a personal robot via phone line for practical applications in our daily life. This project is divided into two sections: i) ii) Conduct research on various applications of robotic systems and their feasibility. Focusing on the design and actual implementation of a control mechanism of the robot over the existing phone lines, more precisely analog copper wires.
Introduction and Background Search:
A robot is a re-programmable multifunctional manipulator designed to move material, parts, tools, or specialized devices through variable programmed motions for the performance of a variety of tasks .
Today, with the dawn of the new millennium, we are perusing a new technology. It would have been hard to imagine how microprocessor-based computers could evolve in the 20 century. It may be the same with the personal robots, the only difference being that we can imagine and visualize robots working in our homes for us. We consider personal robots to be at the same stage that personal computers were in the 1970s. However, with the advancement in computer technology, it might take only 10 to15 more years for the personal robots to be ubiquitous.
In the early days, robots were built to replace human workers, especially, in the automotive industry. The first industrial robot saw service in 1962 in a car factory run by General Motors in Trenton, New Jersey. The robot lifted hot pieces of metal from a die-casting machine and stacked them. The idea that robots would be universal machines, capable of rapid reprogramming for a
The definition developed by the Robot Institute of America (RIA), a group within Society of Manufacturing Engineers (SME)
wide variety of tasks, motivated the development of the PUMA (Programmable Universal Machine for Assembly) by Unimation in 1978.
In practice, early robots were hard to reprogram and failed to compete with humans. Spraying and welding were some of the few applications carried out by robots. SCARA (Selectively Compliant Articulated Robot Arm) robots developed were for the assembly tasks in Japan, i.e. for mounting components on printed circuit boards for the electronics industry.
The ideas about robots were then limited to consider those tasks that a human could not perform. These include: 1) Working in hazardous environments, for example land mines, offshore oil or nuclear industry. 2) Working in a place inaccessible to humans, for example outer space or on the seabed. 3) Work on larger scale that humans find difficult, for example a large assembly plant or handling tasks, and to manipulate objects at the microscopic scale.
The early robots were more expensive and developing them required the expenditure of millions of dollars in research. For example, Manny , an anthropomorphic manikin developed at Battelle's Pacific Northwest Laboratories in Richand, Washington, took 12 researchers 3 years and $2 million to build.
Manny has 42 degrees of freedom and was delivered to the US Army's Dugway Proving Ground in Utah in 1989.
With the introduction of personal computers in 1970s and wireless communications around the same time. Inc. a new smart and affordable personal robot was launched” by Probotics. Cye is controlled by Map-N-Zap. deliver mail. On May 12. 1999. In fact some personal robots are already out in the market for limited applications. “Designed for home or office. technology has advanced from the industrial age to the information age. Using wireless communications technology.
Figure 1: “Cye in Living Room” Photograph by: Neoforma Design
Figure 2: "Orange Cye-sr with Cordless Vac" Photograph by: Neoforma Design
.Why are we considering this project? In the last 30 years we have seen technology and technology application grow dramatically. “The compact personal robot can do a wide variety of tasks such as carry dishes.
Sony Corporation has introduced Aibo. profound changes in costs and vast increases in applications have made it possible for us to consider the design of a personal robot. Dramatic improvements in optimization. the intelligent pet. lead guests to a conference room and vacuum the carpet”. called Cye. a highly intuitive graphical user interface (GUI) loaded on any PC with a 133 MHz Chip or higher.
Figure 3: R100 personal robot designed by NEC. mechatronics and Internet communication technologies. dial and buttons. and move smoothly around the home. understand verbal commands. kind. considerate but at times maybe a little cranky and just human like the rest of us” (NEC). responding and acting which is different from the ones that communicate via keyboard.
Computers may be indispensable today. avoiding such obstacles as tables and chairs” (NEC). “the robot can recognize individual faces. Their aim is to develop a “robot companion who will become like a family member dependable.
From our background search we conclude that controlling a robot over the existing telephone lines has not yet been implemented. voice recognition. NEC is conducting research on a personal robot to break through the barrier between people and computers.
. listening. This robot communicates by talking. Hence the idea of controlling a mobile robot via phone sounds fascinating to pursue for our senior year project.A prototype robot named R100 developed at NEC's Central Research Laboratories is capable of visual recognition. To implement a control mechanism for controlling any robot over a telephone line appears challenging. but they are not that friendly for many of us.
c. music and images can be interspersed to make efficient use of circuits and equipment. A digital signal can pass through an arbitrary number of regenerators with no loss in signal and thus travel long distances with no information loss. we thought of using the Personal Communications Services (PCS). Compared to analog transmission. Much higher data rates are possible using existing lines. Build a robot with a phone chip.
An example of this system is “calling” the robot on the way home and requesting the robot to vacuum the room or take a coke can out of the refrigerator. Voice. The radio spectrum in the 1. A combination of the Phone and Internet for robot control
a) Build a robot with a phone chip
One way to communicate with the robot could be to build a robot with a phone chip (similar to Lucent Technologies’ phone on a chip).
. Using the Internet Telephony Server. Various types of phones exist in the market.8 2GHz range is typically used for this mode of digital cellular transmission that competes with analog and digital services in the 800Mhz and 900MHz bands. we came up with these three different methods to implement our idea of controlling a robot over the phone. a.Design Ideas: Based on our research. There are several advantages of using digital transmission. data. b. it is much cheaper than analog transmission as we only need to distinguish between 0 and 1. Initially.
we can connect to the web server using ASP or CGI programs. The web server then generates the easily decodable touch-tone. One of the added features of using the internet and the telephony server would be the ability to display a simulation of the robotic movements at the remote location or a real time video feedback system can be implemented.
. Then the same techniques would be used on the receiving end of the robot as described earlier. An Internet telephony server links phone lines to the Internet. With the Internet.Figure 4: An application of Robot with a phonechip
b) Using the Internet Telephony Server
Another approach to the same design problem could be through using the Internet to communicate with the robot using the same PCS wireless technique.
then using the internet will be more economic than using a phone system.Figure 5: Example of using Internet Telephony Server
c) A combination of the Phone and Internet for robot control
A third possibility for personal robot control is to merge both of the above mentioned approaches and use both direct dialing system and access through the Internet.
. Similarly. if we are in some third world country and need to access the robot in our apartment in California. then using a phone will definitely be the only option. For example. when we are driving on I-95 and need to access the robot to clean up our apartment before we get back. Figure 6 shows the flexibility of using an alternate system when the other system is unavailable or more expensive.
Flowchart showing the combination of the two design methods:
Telephone unit placing a call directly to the Robot
Internet controlled telephony server used to communicate with the receiving unit
Call receiving unit
FPGA chip with decoder and kinematics logic
Another application Personal Robots may be used for is grocery shopping. Optimistically. This idea can be further implemented by designing robots for the ambulances. where a doctor can remotely monitor a patient and operate on him/her. The existing online grocery shopping do home delivery at certain times. we can do grocery shopping online and at the same time we can request our Phonebot to open the door.
Figure 7: Combining the two design methods
. This helps the doctors to provide immediate care to the critical patients. We know that the experiments with the robot in the field of surgery are already being done. carry the delivery and put it in the refrigerator.
to make the robots more user friendly and be able to communicate with them as we can communicate with other people around the globe. Capacitors and Diodes
Software Requirements: Altera's MaxPlus II OrCAD HTML CGI/ASP Java Matlab Test Equipment: Oscilloscope Logic Analyzer Multimeters Nerd-Kit
. we will start with a design similar to the one described under design idea (a). Our main objective was.58MHz Crystal Oscillators (Part # ) Variable Power Supply Resistors.
Hardware/Software and Test Equipment Required
Hardware Requirements: Flex 10K70 Chipset Talrik II Robot (including the Servo motors and Sensors) TelePhone Set Teltone's M-8870-01 Chip SPST 90-2323.Phonebot. Thus we decided to design a simple prototype of a robot that can be controlled via phone .Methodology and Justification:
Considering the fast paced modern technology the new generation of engineers need to look a step ahead. To keep it simple. 5V relay switch from RadioShack 3. and is. From the beginning of this project we focused primarily on communication with a robot.
The project was implemented using a top-down process. Hence this part was renamed as FPGA control and divided into two parts and the lead person on each part is as follows: C) FPGA Control i) ii) iii) iv) Clock Division (VHDL program). or by using the telephony server via Internet.Implementation
As mentioned above. Initially we broke down the project into two parts – sending a signal through the phone line and robot control with the FPGA device. during the implementation we found out that receiving and decoding signal coming through the phone line required a lot of work.Amit Singh Ring Detect (VHDL program) – Sudip Pathak Motor Control (VHDL program) – Sudip Pathak Robot Control (VHDL program) – Amit Singh
. First a call is placed to the Phonebot using either Plain Old Telephony System (POTS) or a Personal Communication System (PCS). However. We started by defining various modules. our primary objective is to communicate and control the Phonebot over the analog phone system. Once the Phonebot receives the ring. This part was further broken down into two modules and we divided the work as shown (the description of each module follows the basic block diagram of Phonebot and VHDL programming section is described separately under FPGA control): A) Ring Detect and connect phone line – Sudip Pathak B) DTMF decoder – Amit Singh
The robot control part also required a new module for the controlling the motors. a ring detector circuit detects it and the call is complete by establishing a connection between the phone chip and the FPGA chip.
In the end we worked together to: D) Assembling various parts of Phonebot and combining the different VHDL modules. we had to consult more often and work very closely in order to synchronize the different modules.
Figure 8: PHONEBOT – Basic Block Diagram
Ring Detect And Line Connect
Motor / Sensor Control
FPGA (FLEX 10K20/10K70)
ee.1 uf 1N914 10 uF 100K 10K Figure 9: Phone detect circuit
Ring detect circuit obtained from the website. the telephone company is sending a ringing signal. it could be between 40 and 150 Volts. There are various types of ring detectors available in the market. The common frequency used in the United States is 20 HZ and in Europe is typically 25 Hz and it can be any frequency between 15 and 68 Hz. We found the following circuit for the ring detector very easy and inexpensive to design.washington. Most of the world uses frequencies between 20 and 40 Hz.A) Ring Detect and Phone Line Connection
When the phone rings.
C1 CR1.CR3 C2 R1. which is an AC waveform.html
. It is very important that we connect the diodes the right way.edu/circuit_archive/circuits/F_ASCII_Schem_Tel.CR2. The voltage at the subscribers end depends upon loop length and number of ringers attached to the line.R3 R2
Using the idea of electromagnetism. In the circuit shown in Figure 9. a spring and a set of electrical contacts. The circuit is depicted in Figure 10. an armature can be attracted by the electromagnet. Diodes CR1 and CR2 guarantee that the output (ring detect logic) does not exceed the power supply levels and prevent any damages to other circuits driven from its output. the capacitor C2 is charged. Unfortunately.
The circuit worked exactly as expected and we had no major problem wiring the circuit and testing it. capacitor C1 blocks the DC and the voltage divider circuit obtained from R3 and R2 resistors prevent the low level AC from having any effect on the circuit. When the telephone rings. Since C2 and R1 have the time constants of 1s. Instead. the output goes low for 1second after the ring stops.
i) Relay switch for establishing phone line connection
After detecting the circuit the next step was to establish the phone line connection. using an electromagnetic switch was a lot easier approach.The telephone line mostly has only DC (-48V) and/or small signal AC (audio). First we tried to use a BJT switch but this complicated the problem even more as the signal we needed to pass was negative 48 DC.
. while debugging the circuit at a later stage we almost damaged the bread-board by connecting the VCC and GND the opposite way. Now when the telephone rings. This provided enough voltage for the diode to be reverse biased and the heat produced was sufficient to almost melt the board. it brings about 90V RMS of AC at 20Hz. This pulse is to be detected and used for connecting the telephone circuit by the FPGA chip.
which completes the telephone circuit. 5V relay switch from RadioShack. Thus we switched them around and with VCC and output pin 0V there was sufficient current flowing through the wire to charge the electromagnet in the relay switch. We were originally thinking of sending 5V from the Altera board and grounding the other end of the coil of wire. We bought the SPST 90-2323. When the electromagnet is not activated. This is equivalent to picking up the phone to establish a connection. In our project. a magnetic field is created around the electromagnet resulting different polarities at the ends of the electromagnet. the electromagnet attracts the top metal leaf to close the upper circuit. However this did not work and we assume that it could be because not enough current was flowing out of the Altera’s output pins.Figure 10: Schematic capture of the relay circuit used for the connection. the spring pulls the switch open.
. Hence we found several kinds of these in the RadioShack website. In Figure 10 when a current flows around the electromagnet.
We noticed that a relay switch was listed in the OrCAD library and this made us think that it should be available in the market. Thus. once the ring signal is detected we activate the switch by sending 0V signal from the Altera board to close the telephone path.
B) DTMF Decoder
Dual Tone Multi Frequency (DTMF) signals are used for speed dialing and replace the conventional rotary dialing system. This information can be utilized to find out which button was pressed on the keypad and can be used for various applications. The internal circuit used by the chip to decode the DTMF is shown in figure 11. These signals correspond to the digits on the dial pad of any modern touch-tone phones. Each of those touch-tones is constructed with the combination of two different frequencies.
. The chip uses a series of low pass and high pass filters to decode the frequencies. This data is supplied to the FPGA chip for further use. Then it uses a digital detection algorithm and a code converter to provide its output in the form of four binary output data. We used the M-8870-01 DTMF decoder chip to decode this information. The construction of the signals according to different frequencies is shown in table as:
High Frequency Values (Hz) 1209 697 Low Frequency Values (Hz) 770 852 941 1 4 7 * 1336 2 5 8 0 1477 3 6 9 # 1633 A B C D
Table 1: Signals related to different frequencis
These frequencies can be decoded using precise filters and then we can decode which digit was pressed depending upon these decoded frequencies.
resistors or capacitors could trigger a significant errors. current. “Talk down” errors occur when we miss some of the detected signals due to line noise or outgoing/incoming voice. We are suspicious that this could actually be a 3.3V device. which can provide false DTMF signals at times.Figure 11: Internal circuit of the DTMF decoder (from Teltones Data Sheet). It was realized while testing the circuit that the Teltone’s decoder works under very specific ranges of voltage and current. There are various problems in decoding these DTMF signals such as “Talk off”. “Substandard DTMF”. “Talk down”.
. While testing the DTMF decoder circuit we observed that a slight change in the voltage. “Substandard DTMF” are the errors in generated DTMF signals due to substandard components in the generating device such as the telephone set or the keypad. etc. It was very strange for us to find out that the 5V device actually worked better with 3V. Most of these errors can be eliminated if we use more precise components (resistors and capacitors). “Talk off” errors occur when false signal is detected due to voice or other noise.
issue commands to the robot. They have the ability to increase integration. The FPGA chip can also be programmed to store the complex kinematics of the robot and send a feedback. and enable designing real systems to operate at increasingly higher frequencies. The Phonebot can be programmed within few minutes to do any task.C) FPGA Control
For the controller we decided to use the Altera’s Flex 10K70 chip. Once programmed the robot will have the “intelligence” to complete the requested task. This provides us with a great flexibility for using the Phonebot.
The FPGA chip decodes the 4-bit binary output (from the DTMF decoder) into its useful commands for the robot. The FPGAs contain arrays of logic cells. and send pulses to the servo-motors based on the logic programmed into it. The device is programmed to decode the DTMF signals. using the DTMF generator via the same phone line (this has not been implemented in this project). The most important factor for selecting this chip is that we can program and reprogram the device while it is in a system. The controller consists of these four modules:
. For our project. Flex 10K70 is used to control the Phonebot based on the signals decoded by the DTMF decoder. to place more and more electronics in a chip and use all available gates within the FPGA thereby providing cost-effective solutions.
100Khz. 10Hx and 1Hz. 10KHz. Clock_1MHz Clock_100KHz Clock_25MHz Clock_10KHz
Clock Division Module
Figure 12: Block diagram of clock division module
Figure 13: Flow chart of Clock Division module
. As shown in Figure 12. The Robot Control module requires 10Hz clock whereas the Motor Control module requires 10KHz clock.i) Clock Division Module
This module divides the 25MHz clock of Altera’s University Board into slower clocks so that we can provide the precise timing for the servo-motors because these motors work at pulses in the order of milliseconds. the 25MHz clock is divided into 1Mhz. The VHDL source code for this module is provided in Appendix A.
Clock change within 20us:
Clock changes at 13 cycles of 25MHz clock (for 1MHz clock)
Clock change within 1ms range:
Clock changes at 5 cycles of 100KHz clock (for 10KHz clock)
Clock change within 20ms range:
Clock changes at 5 cycles of 10KHz clock (for 1KHz clock) Figure 14: Timing diagrams for clock division
ii) Ring Detect Module
This module takes its input from the ring detector circuit and the DTMF decoder. it opens the switch again.
SB Clear Ring_Detect D (Touch Tones) Ring_Connect
Ring Detect Module
Figure 15 : Block diagram of Ring Detect Module
Figure 16: Ring Detect Timing Diagram
. it would connect and disconnect on its own. provides output to the relay for closing or opening the telephone circuit. This problem was resolved by resetting the signals in the FPGA device on the falling edge of the SB signal (SB signal goes high when there is a valid code detected by the DTMF decoder). As soon as a ring is detected this module provides a 0V signal to the relay and thus closes the circuit. When it senses a DTMF code for digit 0. We had a small problem while disconnecting the phone. The FPGA device stored the code for digit 0 even after it was disconnected and for the same reason next time we dialed up.
Figure 17: Ring Detect Module Flow Chart
it moves the robot in forward direction for 4 seconds. the FPGA device determines where the collision occurred and issues a signal to the Phonebot to change the direction of its path. We also added few bump switches to the Phonebot. It determines the path of the robot and provides a signal for the servo motor control module controlling the direction and the duration of running the motors.S2. These bump switches send a high signal to the FPGA when they are bumped. if we press 7. For example. and if we press #.S3)
Robot Control Module
Figure 18: Robot Control Module Block Diagram
. Phonebot comes to a complete stop.
Clk_10 Hz SB D Sensors (S1. the Phonebot moves in reverse direction for 4 seconds.iii) Robot Control Module
This module programes the movement of the robot according to the detected DTMF signals. if we press 8. Depending upon which bumper detects switch closures.
Figure 19: Robot Control Module Flow Chart
If we provide a pulse for 1 to 1.5 to 2ms. The information on hacking the servos was obtained from Mekatronix manual for the Talrik II robot (…). then the motor spins in another direction.
Clk_10KHz Lmotor_speed Rmotor_speed Lmotor_dir Rmotor_dir
Motor Control Module
Figure 21: Motor Control Block Diagram
. First we had to hack these motors to create a DC gearhead motor. The hacked servos work on Pulse Width Modulation (PWM).iv) Motor Control Module
The Phonebot has two servo motors to aid its movement. This module takes care of this pulse generation timing. The pulses have to be issued in an interval of about 20ms. then the motor spins in one direction and if we provide a pulse for 1. This module provides the robot with pulses at specific times.5ms.
Figure 22: Motor Control Flow Chart
Figure 23: Motor Control Timing Diagrams
The main controller program was implemented in structural format combining the various components. The following table shows the amount we had to spend to design the Phonebot. The VHDL source code for combining all the different modules is provided in Appendix E. Putting together the physical parts was a lot more arduous task.D) Assembling various parts of Phonebot and combining the different VHDL modules
The final task in the project involved assembling the different modules together.00 0.50 2. The Altera was not detecting the decoded signals produced by the DTMF decoder until we made a common ground.00 N/A 1.00 10.50 2.00 $ 63.00 15.40 + FPGA Chip
Prices were quoted from RadioShack’s website (http://www.radioshack.00 15. Part *Servo Motors and Wheels *FPGA chip (Flex 10k70) DTMF Decoder (Teltone M-8870-01) Relay Switch (SPST 90-2323) Oscillator Capacitors Resistors Diodes Wires/Circuit Board Sensors *Wood 9V Adapter / Ni-MH Battery TOTAL COST (Estimate) QTY 1 1 1 5 8 3 1 pk 4 1 Per unit 1.60 ~ 0.00 4.50 0.50 5.40 3.00 3.50 5. the circuit we designed for the ring detection and the DTMF decoder.40 3.00 8.com) * Estimated price for comparison purpose only
. We had to be make a common ground for the FPGA device.00 1.
Overall cost for the Phonebot was very small.00 10.00 2.
40. Depending upon the task the Phonebot is programmed to carry out. these figures would drop significantly. Compared to CYE which costs $800. we can build a Phonebot for about $163.00 or Aibo which costs $2500. If we were to do a mass production. Putting a cover around the Phonebot would protect anyone from tampering with the wires. Never touch the wires when a phone is ringing. i) One should always keep in mind that there is 90V AC coming from the telephone wire when a telephone rings. we could either use a remote phone jack that is available in the market. Phonebot is very cheap.
Safety Concerns: Phonebot does require some safety measures.Assuming the FPGA chip costs around $100. If this were to be a commercial product.
.00. ii) Phonebot has a wire connecting it to the phone jack on the wall. more safety measures may be required. During our implementation phase we took an extra precaution. The Phonebot does not have a cover.
Hence. there are 750 million people in the world who can dial to our Phonebot and control it.
The idea of Phonebot evolved from our original idea of designing a wireless controlled robot. It was only after we got 24 hrs access to the EE labs that we found out we really had all the resources required to implement a project like this. etc. After we got full access to the EE labs. We encountered various problems as described under various modules. we had all the resources we needed including the logic analyzer. This project involved an extensive research during the first semester and a successful implementation during the 2 semester of our
. For several days we tried to build a circuit to decode the DTMF signals from the Teltone’s 5V device and we were not progressing. we did have problems getting the right equipment at the right time. oscilloscope. there are 750 million people in the world who use telephones. This project required: • • • • • An understanding of Robotics Considerate knowledge of FPGAs and proficiency in VHDL Exceptional knowledge of Electronics and Circuit design Hands on experience on Assembling/Soldering parts Fair knowledge of Telecommunications
In several instances we realized that the courses we took during our last 3 /4 years were crucial and sufficient for us to be able to implement a project like this. Designing the Phonebot was an enthralling project. Probably this is the first of its kind. Besides these. power supplies. It was during our research phase that we started considering the idea of controlling a robot via a telephone line.Conclusions and Future Directions:
According to a research conducted by Nortel networks. The current phone number assigned to the Phonebot is (203) 576 4156.
the Phonebot can be programmed to do certain tasks. especially Dr. the Phonebot would know what were bought and what to expect when a delivery person comes.
Upon successfully implementing our idea of Phonebot. Sobh. Besides. This feature could also be used for security purpose. The current link to the website is http://www.Integrating with the Internet is another possibility that would add more access to the Phonebot. there are several features that could be added to the Phonebot: . .Using more sensors and a visual feedback would make the Phonebot more animated and will be able to carry out more tasks.Program the Phonebot to do specific tasks like vacuum a room.bridgeport. .
This report is also available on the Computer Science and Engineering website under the projects. A movie file is also included on the website. However. T. Hmurcik for their guidance. Hence.edu/cse/projects/phonebot/index.Instead of the DTMF decoder. we conclude that Phonebot has the potential to generate a new wave in the modern technology. we have gained more confidence in our skills learned in the last few years. we can use a voice encoder/decoder. When a person does an online grocery shopping.html . This would be very suitable for grocery shopping. the voice decoder would recognize certain frequencies and depending upon those frequencies. . Grodzinsky and Professor L.
. Phonebot could also be programmed to keep track of what is available in the stock. This shows that a list for improvements on Phonebot and various application it could be used is very long. Similar to a DTMF decoder.senior year. Professor S. This project not only utilized our knowledge and skills but refined them to a professional level. Finally we thank our Professors at UB. take out a coke can from the refregerator.
clock_1Mhz <= clock_1Mhz_int. STD_LOGIC. END IF. count_100hz. IF count_1Mhz < 12 THEN clock_1Mhz_int <= '0'.
.STD_LOGIC_UNSIGNED. count_10hz. clock_1Khz <= clock_1Khz_int. ELSE count_1Mhz <= "00000". clock_1Khz_int : STD_LOGIC. BEGIN PROCESS BEGIN -. IF count_1Mhz < 24 THEN count_1Mhz <= count_1Mhz + 1.Generate 100KHz clock : : : : : : : : IN OUT OUT OUT OUT OUT OUT OUT STD_LOGIC.APPENDIX A
--THIS PROGRAM DIVIDES THE 25MHz CLOCK OF THE ALTERA'S ** --UNIVERSITY BOARD INTO DIFFERENT SLOWER CLOCKS TO RUN ** --OTHER MODULES WHICH REQUIRE SLOWER CLOCKS ** --********************************************************* --********************************************************* library IEEE. use IEEE.STD_LOGIC_ARITH. STD_LOGIC.This portion generates a 1MHz clock WAIT UNTIL clock_25Mhz'EVENT and clock_25Mhz = '1'.all. STD_LOGIC. count_100Khz. SIGNAL clock_100hz_int. use IEEE. STD_LOGIC. clock_10Khz_int. STD_LOGIC. -. clock_10hz <= clock_10hz_int.all. clock_10Hz_int. clock_100hz <= clock_100hz_int. clock_1Mhz_int. ENTITY clk_div IS PORT ( clock_25Mhz clock_1MHz clock_100KHz clock_10KHz clock_1KHz clock_100Hz clock_10Hz clock_1Hz END clk_div. use IEEE. STD_LOGIC). clock_1Hz_int : STD_LOGIC. ARCHITECTURE a OF clk_div IS SIGNAL SIGNAL SIGNAL SIGNAL count_1Mhz: STD_LOGIC_VECTOR(4 DOWNTO 0). count_1hz : STD_LOGIC_VECTOR(2 DOWNTO 0). END PROCESS. clock_10Khz <= clock_10Khz_int. END IF.STD_LOGIC_1164. ELSE clock_1Mhz_int <= '1'.count_1Khz :STD_LOGIC_VECTOR(2 DOWNTO 0). clock_1hz <= clock_1hz_int. clock_100Khz <= clock_100Khz_int. STD_LOGIC. count_10Khz.all. clock_100Khz_int.
-. END PROCESS.PROCESS BEGIN WAIT UNTIL clock_1Mhz_int'EVENT and clock_1Mhz_int = '1'. clock_1Khz_int <= NOT clock_1Khz_int. ELSE count_100khz <= "000".Generate 100Hz clock PROCESS BEGIN WAIT UNTIL clock_1Khz_int'EVENT and clock_1Khz_int = '1'.Generate 10Hz clock PROCESS BEGIN WAIT UNTIL clock_100hz_int'EVENT and clock_100hz_int = '1'. -. END IF. END IF. -. -. ELSE count_100hz <= "000". END IF. END IF. ELSE count_1khz <= "000". clock_10hz_int <= NOT clock_10hz_int. clock_10Khz_int <= NOT clock_10Khz_int. -. END PROCESS. END PROCESS.Generate 1KHz clock PROCESS BEGIN WAIT UNTIL clock_10Khz_int'EVENT and clock_10Khz_int = '1'. clock_100Khz_int <= NOT clock_100Khz_int. IF count_1Khz /= 4 THEN count_1Khz <= count_1Khz + 1.
. END PROCESS. IF count_10Khz /= 4 THEN count_10Khz <= count_10Khz + 1.Generate 1Hz clock PROCESS BEGIN WAIT UNTIL clock_10hz_int'EVENT and clock_10hz_int = '1'. END IF. IF count_10hz /= 4 THEN count_10hz <= count_10hz + 1. ELSE count_10hz <= "000". END PROCESS. ELSE count_10khz <= "000".Generate 10KHz clock PROCESS BEGIN WAIT UNTIL clock_100Khz_int'EVENT and clock_100Khz_int = '1'. clock_100hz_int <= NOT clock_100hz_int. IF count_100hz /= 4 THEN count_100hz <= count_100hz + 1. IF count_100Khz /= 4 THEN count_100Khz <= count_100Khz + 1.
IF count_1hz /= 4 THEN count_1hz <= count_1hz + 1. ELSE count_1hz <= "000". END a. END PROCESS.
. clock_1hz_int <= NOT clock_1hz_int. END IF.
STD_LOGIC_ARITH. END PROCESS.extra_pin) BEGIN IF extra_pin = '0' THEN --DISCONNECT THE PHONE IN THE BEGINNING ring_connect <= '1'. use IEEE.STD_LOGIC_UNSIGNED. use IEEE.
. END IF.STD_LOGIC_1164.
ARCHITECTURE a OF ring_detection IS BEGIN PROCESS (ring_detect.all.all. END IF. ELSIF ring_detect = '1' THEN --CONNECT AS SOON AS A RING IS DETECTED ring_connect <= '0'. use IEEE.all. --COMING FROM RING DETECT CIRCUIT ring_connect : OUT STD_LOGIC). ENTITY ring_detection IS PORT(extra_pin
: IN STD_LOGIC. IT ALSO OPENS THE SWITCH TO DISCONNECT --THE PHONE AT THE END library IEEE. --TOUCH TONE DECODED FROM M-8870-01 ring_detect : IN STD_LOGIC.APPENDIX B
--THIS PROGRAM DETECTS THE TELEPHONE RING AND --THEN CLOSES THE SWITCH TO COMPLETE THE PHONE --CIRCUIT. END a. --ASSERTED AT LOW ELSIF SB’EVENT AND SB = ‘0’ THEN IF (D = "1010") THEN --DISCONNECT IF USER PRESSES '0' ON HIS PHONE ring_connect <= '1'. END ring_detection. --CLEAR PIN TO DISCONNECT THE PHONE IN THE BEGINNING D : IN STD_LOGIC_VECTOR(3 DOWNTO 0).
ELSIF clock_10hz'EVENT AND clock_10hz = '1' THEN CASE state IS WHEN stop => --DECIDE WHAT TO DO WITH THE NEW TOUCH TONE lmotor_speed <= '0'.pathA4. stop. ELSIF (D = "0111") THEN state <= forward.turnright. rmotor_speed : OUT STD_LOGIC. SIGNAL D_flag : STD_LOGIC. rmotor_dir : OUT STD_LOGIC).STD_LOGIC_1164.all.Rmotor_speed 1 = GO 0 = STOP --DTMF SIGNALS: --6 is for return back movement --7 is for forward movement --8 is for left turn --9 is for right turn --10 is for disconnect --11 is for specific path A --All the rest are for stop --******************************************************** --******************************************************** library IEEE. ELSIF (D = "1000") THEN : IN STD_LOGIC.pathA. use IEEE. use IEEE.State Machine to Control Robot CONTROL_PROCESS: PROCESS (clock_10hz.Lmotor_dir 0=forward 1=reverse -.SB --SENSORS --SB IS INDICATION OF NEW --TOUCH TONE DETECTION D : IN STD_LOGIC_VECTOR(3 DOWNTO 0).SB) BEGIN IF SB = '1' THEN --DETECTION OF A NEW TOUCH TONE state <= stop.all.return_back2.APPENDIX C
--********************************************************* --**THIS PROGRAM DECODES THE DTMF SIGNALS INTO USEFUL ** --**COMMANDS OF ROBOTIC MOVEMENT AND ALSO DEALS WITH ** --**THE INPUTS FROM SENSORS ** --********************************************************* -. turnleft.Lmotor_speed 1 = GO 0 = STOP -. IF (D = "0110") THEN state <= return_back.pathA3. ARCHITECTURE a OF control_robot IS SIGNAL timer : STD_LOGIC_VECTOR(7 DOWNTO 0). use IEEE.turnleft2.sensor.return_back. SIGNAL state: STATE_TYPE. --STOP OR GO FOR ROBOT lmotor_dir.
.sense3).rest. turnright2.pathA2.all. TYPE STATE_TYPE IS (forward.forward2.Rmotor_dir 1=forward 0=reverse -. --TOUCH TONE DECODED BY M-8870-01 CHIP lmotor_speed.S2.S3 clock_10hz. SIGNAL sensor_flag : STD_LOGIC. rmotor_speed <= '0'.sense2. : IN STD_LOGIC.STD_LOGIC_ARITH.sense1. ENTITY control_robot IS PORT(S1. --DIRECTION OF SPIN OF SERVO MOTORS END control_robot. BEGIN -.STD_LOGIC_UNSIGNED.
WHEN turnright => --RIGHT TURN OF THE ROBOT IF sensor_flag = '1' THEN lmotor_speed <= '0'. rmotor_speed <= '0'. ELSE lmotor_speed <= '1'. state <= turnleft2. ELSE state <= rest. timer <= timer + 1. state <= sensor. state <= forward2. ELSIF (D = "1011") THEN state <= pathA. END IF. END IF. rmotor_speed <= '0'. ELSE
. rmotor_speed <= '1'. END IF. END IF. timer <= "00000000". WHEN turnleft2 => IF sensor_flag = '1' THEN lmotor_speed <= '0'. ELSIF (D = "1001") THEN state <= turnright. ELSE timer <= timer + "1". rmotor_speed <= '0'. rmotor_speed <= '0'. ELSE lmotor_speed <= '1'. END IF.state <= turnleft. END IF. ELSE state <= rest. ELSE IF timer > 40 THEN state <= rest. WHEN turnleft => --LEFT TURN OF THE ROBOT IF sensor_flag = '1' THEN lmotor_speed <= '0'. state <= sensor. END IF. state <= sensor. WHEN forward => --FORWARD MOVEMENT OF THE ROBOT IF sensor_flag = '1' THEN --IF SENSOR IS DETECTED lmotor_speed <= '0'. WHEN forward2 => IF sensor_flag = '1' THEN lmotor_speed <= '0'. state <= sensor. timer <= "00000000". rmotor_speed <= '0'. state <= forward2. state <= sensor. ELSE IF timer < 15 THEN state <= turnleft2. rmotor_speed <= '1'.
rmotor_speed <= '1'. timer <= timer + 1. state <= turnright2. ELSE IF timer < 40 THEN
. rmotor_speed <= '0'. rmotor_speed <= '0'. timer <= timer + 1. PATHA3 AND PATHA4 IF sensor_flag = '1' THEN lmotor_speed <= '0'. ELSE state <= rest. ELSE lmotor_speed <= '1'. state <= sensor. rmotor_speed <= '0'. END IF. END IF. ELSE state <= pathA4. timer <= timer + 1. END IF. ELSE IF timer < 15 THEN state <= turnright2. ELSE state <= pathA3. WHEN pathA => --SPECIFIC PATH OF THE ROBOT: PATHA. ELSE IF timer < 30 THEN state <= pathA3. state <= sensor. rmotor_speed <= '1'. rmotor_speed <= '0'. rmotor_speed <= '0'.lmotor_speed <= '1'. END IF. END IF. timer <= "00000000". state <= sensor. WHEN pathA3 => IF sensor_flag = '1' THEN lmotor_speed <= '0'. state <= sensor. WHEN pathA2 => IF sensor_flag = '1' THEN lmotor_speed <= '0'. END IF. timer <= "00000000". state <= sensor. WHEN turnright2 => IF sensor_flag = '1' THEN lmotor_speed <= '0'. ELSE IF timer < 15 THEN state <= pathA2. state <= pathA2. END IF. WHEN pathA4 => IF sensor_flag = '1' THEN lmotor_speed <= '0'. PATHA2. END IF.
timer <= "00000000". END IF. ELSE state <= forward. IF timer < 15 THEN state <= sense1. state <= forward2. END IF. WHEN sensor => --WHEN A SENSOR DETECTS AN OBSTACLE timer <= "00000000". rmotor_speed <= '1'. state <= sensor. ELSE IF timer < 40 THEN state <= return_back2. ELSE state <= rest. timer <= timer + 1. END IF. timer <= timer + 1. rmotor_speed <= '0'. IF SB = '1' THEN state <= stop. rmotor_speed <= '1'. rmotor_speed <= '0'. IF S1 = '1' THEN state <= sense1. WHEN return_back => --TURN AROUND AND GO MOVEMENT IF sensor_flag = '1' THEN lmotor_speed <= '0'. WHEN return_back2 => IF sensor_flag = '1' THEN lmotor_speed <= '0'. ELSE state <= rest. ELSIF S3 = '1' THEN state <= sense3. ELSIF S2 = '1' THEN state <= sense2. ELSE lmotor_speed <= '1'. END IF. timer <= timer + 1. END IF. state <= sensor. state <= return_back2. WHEN sense2 =>
. WHEN sense1 => --ACTION FOR RIGHT SENSOR lmotor_speed <= '1'. END IF. END IF. END IF.state <= pathA4. WHEN rest => lmotor_speed <= '0'. rmotor_speed <= '0'. ELSE timer <= "00000000".
turnleft. turnleft2. sense3. sense3. sensor. pathA. timer <= timer + 1. END CASE. IF timer < 15 THEN state <= sense3. WHEN sense3 => --ACTION FOR LEFT SENSOR lmotor_speed <= '1'. pathA2. return_back. sense1. pathA4. turnright2. rmotor_speed <= '1'. n n specify outputs of state machine WITH state SELECT lmotor_dir <= '1' '1' '1' '1' '0' '0' '0' '0' '1' '0' '0' '0' '1' '1' '0' '1' '1' '1' '0' '0' '1' '1' '0' '0' '1' '0' '0' '1' '0' '0' '1' '1' '0' '1' '1' '1' WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN WHEN forward. IF timer < 15 THEN state <= sense2. END IF. sense1.--ACTION FOR FRONT SENSOR lmotor_speed <= '1'.
WITH state SELECT rmotor_dir <=
--Sensor detection algorithm
. pathA3. return_back2. return_back2. rmotor_speed <= '1'. pathA. sense2. rest. forward. END IF. forward2. stop. return_back. stop. forward2. END PROCESS CONTROL_PROCESS. turnleft2. pathA2. sense2. END IF. rest. turnright. turnright. pathA3. sensor. ELSE state <= forward. ELSE state <= forward. pathA4. turnleft. timer <= timer + 1. turnright2.
.SENSOR_DETECT: PROCESS(S1. END IF.S2. END PROCESS SENSOR_DETECT.S3) BEGIN IF (S1 = '1' OR S2 = '1' OR S3 = '1') THEN --SENSOR DETECTS AN OBSTACLE sensor_flag <= '1'. END a. ELSE --NO OBSTACLE sensor_flag <= '0'.
IF count_motor /=200 THEN --RESET COUNTER AT EVERY 20ms count_motor <= count_motor + 1. END IF. WHEN '1' => --REVERSE SPIN lmotor <= '0'. --DIRECTION OF SPIN FOR MOTORS lmotor_speed. ELSE rmotor <= '1'. USE IEEE. ELSE lmotor <= '1'. END IF. END IF. --SEND PULSE FOR NEXT 0. WHEN OTHERS => NULL. --COUNTER TO COUNT UPTO 20ms BEGIN PROCESS BEGIN WAIT UNTIL clock_10Khz'EVENT AND clock_10Khz = '1'. USE IEEE. rmotor_dir : IN STD_LOGIC. ELSE count_motor <= 0. --GO OR STOP FOR MOTORS lmotor. END CASE.APPENDIX D
--************************************************************ --**THIS PROGRAM PROVIDES THE PULSES FOR THE SERVO MOTORS ** --**AT SPECIFIC TIMES REQUIRED BY THE MOTORS FOR THEIR ** --**CLOCKWISE AND ANTI-CLOCKWISE MOTION.STD_LOGIC_ARITH.ALL. --SEND PULSE FOR 1. ENTITY motor_control IS PORT(clock_10khz : IN STD_LOGIC. USE IEEE.5ms DEPENDING UPON DIRECTION OF SPIN OF MOTORS
ELSIF count_motor >195 AND count_motor <200 THEN IF lmotor_speed /= '0' THEN --LEFT MOTOR MOVEMENT CASE lmotor_dir IS WHEN '0' => --FORWARD SPIN lmotor <= '1'.5ms IRRESPECTIVE OF DIRECTION OF SPIN OF MOTORS IF count_motor >= 180 AND count_motor < 195 THEN IF lmotor_speed = '0' THEN lmotor <= '0'.STD_LOGIC_1164. --PULSES FOR THE TWO MOTORS END motor_control. ARCHITECTURE a OF motor_control IS SIGNAL count_motor: INTEGER RANGE 0 TO 200.ALL. lmotor_dir. rmotor : OUT STD_LOGIC). IF rmotor_speed = '0' THEN rmotor <= '0'.STD_LOGIC_UNSIGNED. IF rmotor_speed /= '0' THEN
. ELSE lmotor <= '0'. END IF.ALL. ** --************************************************************ LIBRARY IEEE. rmotor_speed : IN STD_LOGIC.
ELSE rmotor <= '0'. END PROCESS.--RIGHT MOTOR MOVEMENT CASE rmotor_dir IS WHEN '1' => --FORWARD SPIN rmotor <= '1'.
. WHEN OTHERS => NULL. END CASE. WHEN '0' => --REVERSE SPIN rmotor <= '0'. END a. END IF. END IF.
c lock_10Hz_sig. rmotor_dir_sig : STD_LOGIC.STD_LOGIC_UNSIGNED. rmotor_dir lmotor_speed. rmotor END COMPONENT. STD_LOGIC. ** --************************************************************* --************************************************************* LIBRARY IEEE.
. SIGNAL lmotor_speed_sig.clock_1Hz_sig : STD_LOGIC.STD_LOGIC_ARITH. lmotor_dir.ALL. ring_detect.
COMPONENT control_robot --DETERMINES THE DIRECTION AND DURATION OF PORT(S1. :IN STD_LOGIC. :IN STD_LOGIC_VECTOR(3 DOWNTO 0). STD_LOGIC. --PROVIDES SLOWER CLOCKS FOR THE SERVOS : : : : : : : : IN OUT OUT OUT OUT OUT OUT OUT STD_LOGIC. : IN STD_LOGIC. COMPONENT clk_div PORT( clock_25Mhz clock_1MHz clock_100KHz clock_10KHz clock_1KHz clock_100Hz clock_10Hz clock_1Hz END COMPONENT.clock_1KHz_sig.clock_10KHz_sig. rmotor_speed_sig : STD_LOGIC. :IN STD_LOGIC.APPENDIX E
--************************************************************* --*********MOBILE ROBOT CONTROLLED BY A PHONE****************** --************************************************************* --**THIS PROGRAM COMBINES ALL THE INDIVIDUAL MODULES INTO A ** --**SINGLE MODULE TO BE DOWNLOADED ONTO THE FPGA CHIP TO ** --**CONTROL THE ROBOT. ARCHITECTURE A OF main IS SIGNAL clock_1MHz_sig. STD_LOGIC. SB : IN STD_LOGIC. rmotor. USE IEEE.S3 D lmotor. : IN STD_LOGIC. lmotor_speed. rmotor_dir : OUT STD_LOGIC). COMPONENT ring_detection PORT(extra_pin D ring_detect ring_connec END COMPONENT. : OUT STD_LOGIC). STD_LOGIC). SB. STD_LOGIC. : IN STD_LOGIC.S2. USE IEEE. END COMPONENT. COMPONENT motor_control PORT(clock_10khz lmotor_dir. ring_connect END main.ALL. STD_LOGIC.STD_LOGIC_1164. USE IEEE. :OUT STD_LOGIC). SIGNAL lmotor_dir_sig. STD_LOGIC. BEGIN --PROVIDES PULSES FOR THE SERVO MOTORS : IN STD_LOGIC.clock_100Hz_sig. rmotor_speed lmotor. : IN STD_LOGIC_VECTOR(3 DOWNTO 0).ALL. ENTITY main IS PORT (clock.extra_pin S1.clock_100KHz_sig. D : IN STD_LOGIC_VECTOR(3 DOWNTO 0).S3 : IN STD_LOGIC. --ROBOT'S MOVEMENT clock_10hz. : OUT STD_LOGIC).
--CONNECTS THE PHONE LINE WHEN IT RINGS : IN STD_LOGIC.S2. rmotor_speed : OUT STD_LOGIC.
D.U1: clk_div PORT MAP(clock. U2: ring_detection PORT MAP(extra_pin.clock_100KHz_sig.S3. U3: control_robot PORT MAP(S1.lmotor_speed_sig. clock_1KHz_sig. END .clock_10Hz_sig. rmotor_speed_sig.clock_10KHz_sig.rmotor_dir_sig).SB.lmotor_dir_sig.rmotor_dir_sig.ring_detect. lmotor_speed_sig.rmotor_speed_sig.rmotor).lmotor_dir_sig.S2. U4: motor_control PORT MAP(clock_10KHz_sig.ring_connect).clock_100Hz_sig.
com/news/gizmos/0. Internet: http://www.phonezone.pdf
. Sudhakar. 2.1452. 6. Academic Press Inc.com/homepages/Bill_Bowden/page3.d2tech. Internet: http://www. Internet: http://www.com/dtmfbenefits.ee. 1996. Prentice Hall.howstuffworks. Meyers. Robert A.32930-3.htm 9.com/pub/8870.htm 14.html 7.edu/circuit_archive/circuits/F_ASCII_Schem_Tel. VHDL for Programmable Logic. Doty.asp 10. 4.compuserve. Mekatronix . 5. Kevin. Internet: http://www. Computer Networks. New Jersey. Skahill.lu/documentation/connectors/Serial. Internet: http://www.htm#spr 8. 1998.teltone.washington. Internet: http://www.htm 13. Yalamanchili. Encyclopedia of Telecommunications. Internet: ftp://ftp. VHDL Starter's Guide.00. Andrew S. Keith L. Addition-Wesley. Internet: http://ourworld. Tanenbaum.Bibliography:
1. Internet: http://www.com/relay.wired.com/how_phones_work. Prentice Hall. 3.htm
11. TALRIK Assembly Manual.attitude-long-distance.com/tutorial/index.phm. 1999.html