University of Florida
Department of Electrical and Computer Engineering
EEL 5666 - Summer 2005
Intelligent Machines Design Laboratory
Instructor: A. Arroyo
TAs: William Dubel, Steven Pickles

Teresa, the Six-Legged Robopuppy
FORMAL PROPOSAL
Blake C. Sutton
Table of Contents
Abstract 3
Introduction ..3
Integrated System . 4
Mobile Platform ............... 5
Actuation .. 5
Sensors .7
Behavior.. .9
Moods 10
Experimental Layout and Results ..11
Conclusion .....12
Documentation...................................................................................................................................12
Abstract
Teresa the Six-Legged Robopuppy is a hexapod entertainment robot that mimics a pet. She is equipped with a pyroelectric sensor to seek out humans, ultrasound ranging for proximity detection, contact switches or photoreflectors for edge-of-the-world detection, and contact switches to track the pull of a leash. She will be able walk forward and backward and turn using three servo motors attached to her legs by control wires.
Teresas behavior will include avoiding obstacles, finding a playmate (a human or animal), walking on a leash, dancing, wandering, and making noises. She will also have two different moods, happy and grumpy, which are determined by her outside environment, time, and her battery level. Her current mood will be indicated by the sounds she makes and differing behavior.
Introduction
Teresa the Six-Legged Robopuppy is an entertainment robot that imitates the playfulness and short attention span of a puppy. Meant to be a pet substitute for people who cannot have a living puppy due to constraints on time or space, Teresa will seek out humans, dance in happiness when she finds one, and then wander off a few seconds later if she isnt picked up. She will also have the ability to be walked on a leash. She will have moods that influence her behavior and are triggered by external events such as being walked or being picked up, and that influence her reactions to external events. A variety of noises (possibly including polka music) will indicate how Teresa is feeling. Of course like any animal Teresa will avoid obstacles in her path, including walking off the edge of a table. This combination of characteristics, in addition to her novel six-legged looks, makes Teresa the ideal apartment pet! Cute, fun, and interactive, Teresa is sure to be a hit with anyone she meets.
An integrated system of four sensors, a microcontroller board, and a six-legged mobile platform will bring Teresa to life. Sensors and motion control will be arbitrated by the central microcontrollerTeresas brain. All programs will be written in the C language. The six-legged platform will allow Teresa to walk forward and backward and turn via servo-connected control wires on her legs. Teresas body will be based on Cricket the Robot, a fully planned and tested platform described in [3]. Teresas brain, body, muscles (actuators), senses (sensors), and behavior will be discussed in detail in following sections.
In planning this project, two books and many people were helpful. [1] is a good introduction to the concepts of motors, servos, and weight as applied to robotics. [2] provided a thoughtful treatment of common problems and solutions in robot behavior. Background information from William Dubel, Michael Ihms (designer of ELSI), countless IMDL final reports, and several websites made up the backbone of the research for this project.
Integrated System
Teresas integrated system will consist of a microcontroller board, a six-legged physical platform, three servo motors, a pyroelectric sensor, contact switches, a sonar sensor, and a voltage divider circuit. These represent, respectively, Teresas brain, body, muscles, heat sensing , touch, vision, and level of energy. The servo motors used to realize Teresas motion will be controlled through this board. Teresas brain will also periodically poll all sensors to inform her decisions.
Like human or animal brains, the central microcontroller board will serve as the hub where all activity and ability is generated. The microcontroller board selected for Teresa is the Mavric-IIB. Based on the Atmega128 chip, the Mavric-IIB has 128K FLASH memory, 4K Static RAM, and 4K EEPROM. With its built-in voltage regulator, small size (2.2 x 3.6 inches), and built-in servo headers, the Mavric-IIB seems ideal for Teresas brain.
The programs which determine Teresas everyday behavior will be written as C modules. All programs will be compiled with WinAVR and downloaded to the board with PonyProg. An ISP cable will serve as the physical interface.
Three servo motors will move Teresas six legs in a modified tripod gait determined by software. In the same way, feedback from Teresas sensors will motivate behavior changes such as avoiding an obstacle.
Mobile Platform
Teresas body will be based on the six-legged platform designed in [3]. Due to a lack of mechanical experience, a platform which has already been tested and perfected seems ideal for this project. The platform also calls for relatively easy to find materials, such as aluminum tubing and piano wire.
Using this platform, Teresa will be able to walk forward and backward and turn in any direction. With the modified tripod gait in software, at least three legs will always be on the ground to maintain stability, but the maximum pace is faster than the maximum speed when using other gaits. However, Teresa will not be capable of traversing rough, uneven surfaces. Instead, she will be limited to small irregularities on any relatively flat surface. After all, carpet, wood flooring, linoleum, and the occasional sidewalk are Teresas native environment.
The body construction consists of six legs, control wires, servo motor brackets, and a chassis consisting of a carapace and two side pieces. The chassis will probably be made of 1/8" balsa wood cut in the laboratory. Specific information on the construction of the rest of the body can be found in [3].
Actuation
Teresas actuators (muscles) will consist of servo motors. Three servo motors will control her six legs: one for her two center legs, one for the back and front legs on her left side, and one for the back and front legs on her right side. This three-servo scheme is one of the most efficient methods of achieving fast, flat-surface walking in a six-legged robot. In this scheme, the center legs move up and down while the front and back legs on each side move forward and backward. This motion is achieved by attached control wires between servo cranks and Teresas legs.
The algorithm (implemented in software) which allows Teresa to walk is a modified tripod gait. In the tripod gait, three legs are always on the ground to ensure stability. In this modified tripod gait, the front and back legs on each side are tied together and move at the same time. To walk, Teresa will repeatedly go through the following steps:
1. Lift center legs, tilting body to one side.
2. Move right set of legs forward.
3. Move left set of legs forward.
4. Set down center legs.
To turn, Teresa will walk forward with one side while reverse-walking on the other. The number of steps to achieve various turns and distances will be determined from observation and manual calibration. To achieve the dancing effect, Teresa will probably wobble from side to side by shifting her center legs, or turn in circles.
The power and torque characteristics of the three servos are currently undetermined. The servo model recommended by the platform designer is a Cirrus CS-60, but it has been difficult to find this part to examine its characteristics. Instead, a servo will probably be chosen after estimating the total weight of the platform and consulting people who have built a similar platform in the past.
Sensors
Teresas senses (sensors) will provide her brain with the feedback on the outside world required to make decisions. She will be equipped with an ultrasound sensor, a pyroelectric sensor, contact switches, and possibly photoresistors. These sensors will enable her to see obstacles in her path, find humans (as heat sources), know when she has firm footing, know when she has been picked up, and know which direction her leash is pulled when she is walked.
Ultrasound / Sonar
Teresas ultrasound sensor(s) will give her vision in the sense of proximity detection. By periodically emitting an ultrasound pulse and measuring the time it takes to receive the return pulse, the distance to the reflecting object (in the direction of the pulse) can be determined. Unlike infra-red sensors intended for the same purpose, an ultrasound sensor continues to function outdoors (with high ambient IR). An ultrasound sensors operation is also independent of the surface the pulse reflects from, unlike IR. For this reason, ultrasound sensors seem to be a better choice.
One or more ultrasound sensors will be mounted on the front of Teresas body, enabling her to steer clear of obstacles. It is possible a single sensor will be sufficient, due to the wobbling of her body when she walks forward. This will have to be determined by experimentation. From recommendations, the SF04 appears to be the most promising model to use.
Pyroelectric
The purpose of Teresas pyroelectric sensor is to give her the capability of finding humans or animals to interact with. The sensor is sensitive to infra-red and motion, and gives feedback of different kinds when these things are detected. Since these sensors are somewhat expensive, it may be possible to create a one from several chips, a printed circuit board, and relatively inexpensive components, or to figure out how to use the sensor in a pre-made part such as a motion-activated light.
Contact switches / Bump detectors
Contact switches in combination with a sliding rod will be used for Teresas leash-walking behavior. As the leash is attached to the rod, a pulling motion forward, backward, right, or left will be translated by the rod into activating the switch for the respective direction. Once the direction of the pull has been determined (by activating the appropriate switch), Teresa can take appropriate action to follow the leash.
Contact switches may also be used as bump detectors on the bottom of Teresas feet. Sensitive switches would trip when Teresa has firm footing, allowing her to avoid falling off of a table. Such switches would also allow her to know when she has been picked up off the ground, and respond according to her mood.
CDS Cells / Photoresistors
It is possible that instead of using contact switches on Teresas feet, photoresistors will be used. If contact switches cannot be properly mounted, or prove unreliable in different environments, photoresistors will replace them. If so, they will be used in very similar fashionwhen there is zero (or close to zero) light detected, the foot is considered to be flat on a firm surface. Otherwise, the foot must be on uneven ground or standing on air.
Behaviors
It is Teresas behavior, in conjunction with her moods, that brings her to life. To seem like a pet she must act like a pet, and her six behaviors serve this purpose.
Obstacle Avoidance / Edge of the World Detection
Although Teresa is meant to mimic a rambunctious puppy, she should not crash into things and damage herself. As a result, Teresa will detect obstacles and avoid them. When faced with an obstacle (an object within a certain distance of her front), Teresa will back up a short distance and turn until she no longer detects it in front of her. In this way, she will avoid hitting tables, clutter on the floor, people, and angry hamsters.
In addition, Teresa will detect and avoid falling off the edge of her world. Since she is not equipped to walk on uneven surfaces (or thin air), she will constantly check that her feet have actually found firm purchase before she continues forward. When she realizes a foot has gone off the edge (or has been set on uneven ground), she will back away.
Wandering
When she is in the right mood (see the Moods section), Teresa will wander happily and randomly around her world. She will do this by using a random factor to decide when and how much to turn while she walks. Of course, her obstacle avoidance behavior is still in effect while she wanders.
React When Picked Up
Teresa may or may not want to be picked up, depending on her mood and what she is doing. If she doesnt want to be picked up, she will squeal and wiggle her legs when she feels all six legs leave the ground, and keep up the racket until she feels firm footing again. If she doesnt mind being picked up, she will coo and stay still until she is put back down.
Seek Out Humans
When she is in a good mood, Teresa looks for humans or animals to play with using her pyro sensor. By following a motion and heat signature, she will try to find a human or animal and get his or her attention by dancing.
Dancing
By either rocking back and forth or turning in circles, Teresa will dance with happiness when she finds a human or animal to play with. At the same time, she will make various attention-getting noises. If nothing happens after a certain period, she will get bored and wander off.
Walking on a Leash
Like any reasonably trained pet, Teresa is trained to walk on a leash. Like most dogs, this training is somewhat sketchyshe only responds to four directions of pulling on the leash, and her response is delayed due to her interest in her surroundings. Like a dog, Teresa will complain if the leash is pulled forward to get her to hurry up.
Moods
To further imitate life, Teresa will have moods which influence her behavior. Teresa can be either happy or grumpy as a result of a variety of factors, including battery power left, whether she is walked, how many times she has collided with obstacles, and whether she has reached the edge of her world. Her moods are indicated to the outside world by her behavior and the sounds she makes.
Happy Mood
Teresa always starts out in a happy mood and only changes when events occur which make her grumpy. She also immediately becomes happy if she is walked.
When she is happy, Teresa looks for humans or animals using her pyroelectric sensor. When she finds something, she pauses and does a dance to get attention. If she isnt picked up after dancing for a certain period, she will wander off in search of something more entertaining. While Teresa is happy, she will also randomly make happy or excited noises.
Grumpy Mood
Teresa becomes grumpy after a certain number of collisions or discovering that she cant go any further (the edge of her world has been reached). She also becomes grumpy if she is picked up when she is trying to go somewhere, or when she has reached a certain low level of battery power. Once a grumpy mood is triggered, it will expire after a certain period and Teresa will become happy again. Teresa will also become instantly happy if she is walked.
When she is in a grumpy mood, Teresa will not bother with finding humans and walk in straight lines instead of wandering. She will also make irritable noises to herself.
Experimental Layout and Results
Since Teresas integrated system is complex, each part of her system will be tested separately to ensure understanding and correct operation. After each component or subsystem has been tested and understood, components will be integrated one at a time with careful testing. To avoid the human error and durability problems associated with wire-wrapping, printed circuit boards and detachable cables will be used for all possible connections.
In addition, an LCD screen will be mounted on Teresas body to provide real-time debugging information. This LCD can display information such as Teresas mood, the current behavior she is trying to perform, sensor readings, motor pulses, battery power, and other useful internal information.
Conclusion
Work to create and bring to life Teresa the Six-Legged Robopuppy is now underway. Although most of the conceptual work for Teresa is finished, the platform is not yet built. The microcontroller board, ISP cable, and LCD screen have been bought, but no other parts are yet in hand. Code has been downloaded to the board via the ISP cable, providing a good test of the hardware and familiarity with the programs that will be used (WinAVR, PonyProg). In addition, sources have been found for most of the platform parts and sensors.
The next step for Teresa is to order all sensors (including some extras when possible) and parts needed for platform construction. Next, a cable needs to be made for the LCD screen, and routines to display a string on the LCD must be written. Platform construction and interfacing obstacle avoidance sensors is the next highest priority and will occur as parts arrive.
Documentation
[1] D. Clark, M. Owings, Building Robot Drive Trains, New York: McGraw-Hill, 2003.
[2] J. L. Jones, Robot Programming, New York: McGraw-Hill, 2004.
[3] H. Arnold, "Cricket the Robot" [Online document], Available HTTP: http://home.earthlink.net/~henryarnold/