1970's Robot - Page 1
Forum section: electronics / projects

author: Omega Glory
author_rank: Regular Contributor
timestamp: June 08, 2016, 11:25:04 pm
content: For the past three years or so I have been working on constructing the robot described in the 1979 book “How to Build Your Own Working Robot Pet” by Frank DaCosta. While it could use some more work, I feel I have reached the point where I can call it completed, and so I thought I would post it here.The robot consists of a tricycle like chassis with a steerable powered wheel in the front, and two free spinning wheels in the back. On the head there are three sonar sensors facing right, left and to the front, and on the neck, there is a microphone for voice control. There is also a speaker for emitting electronic “barks.” I have tried to stay as true to the original design as possible, so the electronic mostly consists of 74LS series parts, some linear ICs, and a bunch of desecrate components.Steering System:The steering system consists of a servo system, motor drivers, and some glue logic. The servo system is made with an ADC and a feedback potentiometer which is coupled to the steering column. The ADC is constructed by clocking a 4-bit counter who’s count is fed to both a latch and a resistor ladder. The resistor ladder, with the aid of an op-amp, produces a 16 step voltage ramp as the counter increments from 0 to 16. This voltage ramp is fed into one input of a voltage comparator, while the other input is connected to the feedback potentiometer. Exactly when the voltage ramp passes the voltage level of the potentiometer, the comparator triggers, clocking the latch, which saves the current count of the 4-bit counter. This produces a 4 bit representation of the position of the potentiometer, and thus, the steering column. The 4-bit counter resets after reaching 16, so the ADC runs continuously. The output of this ADC is fed into one input of a 4-bit magnitude comparator, while the other 4-bit input is connected to one of the processor’s I/O ports. The comparator is wired to the motor driver, such that when the value from the ADC is greater than the value from the processor, the steering motor turns left, and when it is less than that value, it turns right. Finally, when the value from the ADC equals the value from the processor, the steering motor is stopped and is electrically braked. This system allows for the processor to control the position of the steering column with a 4 bit word.Sonar:The sonar system is can be split up into two main circuits, the transmitter, and the receiver. The transmitter consists of a pulse generator, ultrasonic transducers, and their driving circuitry. The pulse generator is constructed to produce a 430 microsecond burst of a 37.5 kHz square wave, every 27 milliseconds. The output of this pulse generator is fed into the input of a demultiplexer who's outputs are connected to the front, right, and left facing Tx transducers. The processor is connected to the demultiplexer, so that it can select which transducer to transmit from. The receiver circuit consists of a two stage amplifier and a frequency detector for each Rx transducer. The frequency detectors are used to ascertain whether or not an amplified signal from a transducer is, in fact, 37.5 kHz, frequency of the signal that is outputted by the transmission circuitry. The output of all the frequency detectors are gated together so that if any of them indicate that a echo has been received, an input line to the processor will go high. In operation, the processor will have the sonar system transmit from the transducer selected by the demultiplexer, and will also start a timer. The processor will then poll the input pin connected to the frequency detectors, and if a echo is detected, it will halt the timer. The processor will then use the timer’s value calculate the distance from the transducer to the object which reflected the transmission pulse.Voice Control:The voice control system allows the operator to communicate with the robot by singing a sequence of tones of varying frequencies. To initiate communication, the operator first sings a reference pitch, and then sings 4 data pitches. If a data pitch has a higher frequency than the initial reference pitch, it is considered to be a 1, otherwise, a 0. After they have been decoded, the four data pitches are assembled to create a 4-bit control word which the processors acts on to perform different actions. The voice control system consists of two main circuits: an amplifier, and a frequency counter. The amplifier is just a microphone coupled to a simple op-amp setup with some filtering. The frequency counter circuit starts with a comparator which converts the output from the amplifier to a square wave. The square wave is then used to clock an 8-bit counter whose output is fed into a latch. A 555 clocks the latch, and clears the counter every 0.2 seconds. This produces the frequency of the signal from the amplifier, divided by five, on the output of the latch. Some glue logic is used to determine if the frequency of the signal is greater than 160 Hz, and if it is, it triggers an external interrupt on the processor, indicating that there is valid communication data on the latch. The 160 Hz cutoff offers some crude filtering to prevent stray noises in the environment from putting the robot into a communication session.Bark Generator:The bark generator is a purely aesthetic. It produces electronic “barks” with the aid of several 555 timers and a demultiplexer to select different timing capacitors for the 555s.Control System:The control system consists of an Intel 8085 processor clocked at 1.5 MHz and two Intel 8155 peripheral chips. Each 8155 has 256 bytes of RAM, two 8-bit I/O ports, one 6-bit I/O port, and a 14-bit timer/counter.Programmers:There are two programmers that I made for the robot. The first one is the manual programmer which was described in the book, and it is incredibly painful to operate. To use the programmer, the operator must first set up an address with pushbuttons, latch the address, setup the data, and then write the data to the memory. Since the robot’s program memory is RAM, the robot must be reprogrammed each time its power is cycled, and since the program is several hundred lines long, it is quite panful to use the manual programmer. For the original robot, the author constructed a tape interface that would allow the operator to upload and download programs to and from a cassette tape. The circuitry for the tape interface was complicated enough that I decided I would construct a more modern solution to the problem. The automatic programmer I designed, is a simple AVR microcontroller board that plugs into the programming port on the back of the robot. To use it, the operator simply presses a button, and the AVR loads the robot’s RAM with the data that is stored in its flash.I decided to build this robot because I wanted to learn more about electronics and low level programming. Since I was pretty new to those fields, I made a bunch of pretty stupid mistakes, but I learned a whole lot in the process. You can see the build log here:http://www.societyofrobots.com/robotforum/index.php?topic=18083.0If there are any other pictures you would like to see, or schematics, tell me, and I will post them here.

author: Omega Glory
author_rank: Regular Contributor
timestamp: June 08, 2016, 11:29:55 pm
content: Here are a few more pictures:

author: xrunner
author_rank: Super Contributor
timestamp: June 08, 2016, 11:43:37 pm
content: Very nice work! Can you briefly explain what the robot is supposed to "do", that is, does it go around randomly avoiding walls and so on, or does it follow a programmed path?

author: JPortici
author_rank: Super Contributor
timestamp: June 09, 2016, 06:03:54 am
content: oh god... the wood... so... 70s... furniture

author: Fungus
author_rank: Super Contributor
timestamp: June 09, 2016, 10:49:48 am
content: This thread is useless without audio of you singing to your robot.(and the robot barking back at you...)

author: Chris Mr
author_rank: Regular Contributor
timestamp: June 09, 2016, 11:15:07 am
content: Fantastic!Is there a video of it doing it's thing?I can remember as a kid making a four wheeled thing out of a Philips Electro mechanical engineering kit that had a sliding carriage on top with a switch to make it go backwards when it hit something. It had a bit of bias so it didn't just go in straight lines - an entertaining way of draining batteries

author: joeqsmith
author_rank: Super Contributor
timestamp: June 09, 2016, 12:44:29 pm
content: I like it! Can we see it in action?

author: sanman
author_rank: Contributor
timestamp: June 09, 2016, 03:10:56 pm
content: I had that book! I so wanted to build that when I was 13. Great job!

author: Omega Glory
author_rank: Regular Contributor
timestamp: June 09, 2016, 05:00:28 pm
content: QuoteWell according to the original design as described in the book, the robot would generate a pseudo random number, and then use that number to select a subroutine from a list, to execute. Once that subroutine was finished, it would return to the random number generator, which would choose another subroutine to execute. One of those subroutines is the Travel routine, which causes the robot to navigate Its environment, avoiding obstacles. One of the other subroutines was the Watch Dog routine. The robot would stay still, and "bark" if it detected anything with its sonar.Well that is what the code wassupposedto do. When I was examining the hex code in the book, I noticed several typos, including missing instructions, and instructions that didn't exist. I attempted to fix all the typos, but was unsuccessful, and so I wrote my own obstacle avoidance code, based on the original code. Its not nearly as good as the original was supposed to be, but I hope to work at it till it gets there.QuoteHahaha. Well the original robot was constructed completely out of aluminum. Aluminum, however, is much more expensive than wood, and is harder to work with, so I decided build with wood, and only use aluminum where its superior strength was necessary. I didn't have access to a sheet metal brake, but I was able to construct one out of some scrap wood. It doesn't make particularly sharp bends, but it did the job.QuoteWell right now the robot is immobile, hopefully temporarily. When I was experimenting with the sonar and the obstacle avoidance algorithm, I damaged the gearbox on the steering motor, stripping its teeth. I have had this problem before, and I think that it is probably due to the fact that the servo system causes the steering motor to start and stop suddenly. The steering motor is electrically braked when it is stopped, and I think the momentum of the steering column probably apples to much torque to the gearbox, stripping its teeth. I tried to solve this problem by slowing down the motor by driving it at a lower voltage, but I ran into the same problem. I think that I should probably get a gearmotor with a stronger gearbox, but that would mean machining another coupler from the steering column to the motor, and figuring out how to mount the new motor. If I get this figured out, I will definitely get some footage and post it.

author: frankdacosta
author_rank: Newbie
timestamp: August 16, 2016, 10:57:56 pm
content: Awesome work, sir.Veryimpressive! Yikes: it has been37 yearssince I wrote that book and built the robot pet. I am glad that you made up (in ingenuity and persistence) for my shortfalls in explanation and design.Now, of course, "consumer robotics" is a lot easier, enabled by the spiral of miniaturization and exponentially greater processor power. But wa-ay back in the 70's, it was a new worldYou can bet, for instance (as you found), that byte-by-byte hex assembly command entry as a way to load programs would be as quaint (and painful) today as doing Morse code for ham radio. If I were working on aRobot Pet 2.0today, you know it'd be driven by a Raspberry Pi or the like, coded in Python, loaded over Bluetooth. But the raw mechanics and electronics would remain the challenge.Again, kudos for your success! It looks great. You have sharpened your toolset well. What project is next?

author: bitslice
author_rank: Frequent Contributor
timestamp: August 16, 2016, 11:27:02 pm
content: OP builds a robot from a book, author of book pops in to congratulate OP.It probably doesn't get any cooler than that O0

author: Mr.B
author_rank: Unknown
timestamp: August 16, 2016, 11:48:09 pm
content: Quote from: bitslice on August 16, 2016, 11:27:02 pm+1

author: b_force
author_rank: Super Contributor
timestamp: August 16, 2016, 11:53:07 pm
content: Quote from: bitslice on August 16, 2016, 11:27:02 pmAgreed!Kudos for even building something like this.Deserves a spot in hall of fame.Maybe a new idea for Dave, to show every month the best Eevblog projects.

author: timb
author_rank: Super Contributor
timestamp: August 17, 2016, 03:49:01 am
content: Quote from: bitslice on August 16, 2016, 11:27:02 pmThings like this only seem to happen here. Dave's forum is quite the magical place!

author: Omega Glory
author_rank: Regular Contributor
timestamp: August 17, 2016, 05:11:05 pm
content: QuoteThank you very much sir, it is very good to hear from you!QuotePrograming in hex was indeed painful, however what I learned in the process, such as the internal workings of a CPU, was invaluable. I actually found that the 3 or 4 typos in the code actually benefited me, because it forced me to go through the whole program and understand how it worked, before copying into the robot. My grandfather, on the other hand, does not share my sentiments, he thinks I'm crazy, and has said as much.QuoteWell I am not quite decided yet. I am about to start my last year of school before college, so I don't think that I will have a lot of time for working on a complicated project, however Idowant to build something. I have thought about building a robot pet 2.0, this time using more modern components. I have also considered attempting to build an ultrasonic levitator like this one:https://www.eevblog.com/forum/projects/ultrasonic-acoustic-levitation/I would also like to restore the robot pet to good working order, and perhaps augment and improve it with more modern components. I am not decided yet and I am open to suggestions if anyone has a project idea.QuoteOur local library had two books on robotics: "Robot Building for Beginners" by David Cook, and your book "How to Build Your Own Working Robot Pet." Both of these books were instrumental in my learning of robotics, the former, for teaching me basic electronics principals and construction methods, such as Ohm's Law, how to solder, and how to source parts, and the latter, for teaching me construction techniques, digital and analog circuit design, and low level programing. Your book has really inspired me to pursue electronics and has taught me a lot in the process, and for that I am very grateful.Thank you,Omega Glory

author: Pjotr
author_rank: Frequent Contributor
timestamp: August 17, 2016, 07:29:40 pm
content: Quote from: Omega Glory on August 17, 2016, 05:11:05 pmWhat I am misssing is behaviour of the robot to keep itself alive. First (and mandatory) improvement should be: Search for food! It should search for free mains wall outlets and upon finding them recharge its batteries.Happy HEX coding!

author: Enigma-man
author_rank: Regular Contributor
timestamp: August 19, 2016, 03:05:13 am
content: @OmegaGlory:Back in the late 70's there was this book. You could build your own robot named "Mike".The controller was a KIM-1, the grand-daddy of all 6502 computers. I had a 6800 based system whichhad a similar instruction set. The KIM-1 was more of a controller while mine was the great grandpappyof today's desktop PC's.I made a robot based on the frame design almost identical to yours. It looked like Huey fromthe classic scifi movie Silent Running. Had the square light on it and was black plexiglass with whitepinstriping for the trim. I only had a rudimentary control system with a series ofmomentary push buttons to control movements. It could bend forwards and back. The coolestpart was the arm which looked like Huey's from the movie. Sadly, I have no pictures and the robotno longer exists. The only parts that survived are the three drive motors like the one on the book's cover.I do have a Tomy Omnibot 5402 RX with a dead Yuasa 6V battery. Gotta do something about thatbecause it worked perfectly. I stuck an empty beer can in the gripper to show you his future job...With Arduinos and Pi's everywhere, it may be time to resurrect my old robot and build it from scratch.

author: Omega Glory
author_rank: Regular Contributor
timestamp: July 01, 2017, 12:36:53 am
content: Well I haven't been able to work on the robot much until recently (school, and preparing for college), but I have made some progress.I ordered an identical steering motor as a replacement, and dropped the driving voltage with some diodes, and at first that seemed to keep the motor's gearbox from stripping (see the earlier posts).Previously the sonar system worked, although it was rather intermittent. After going over the plans in the book, I discovered the mistake. When the sonar system takes a measurement, it first emits a pulse, and clears two counters/timers that are running. The first counter/timer is actually responsible for the generation of the pulse (and is therefore synchronized to the beginning of this pulse) but it is also used to measure how much time passes until the echo is received, so that the processor can calculate the distance. The second counter/timer is used as a general purpose event timer. It is clocked by a free running 555 timer that isn't synchronized to any other system. In the sonar software, this second counter was used as a timeout counter. In operation, the sonar system emits a pulse, clears the timeout counter to 0, and then polls for the return echo and for the timeout counter. If the system receives an echo, it grabs the count from the first synchronized counter to calculate the distance to the object. However, if the system doesn’t receive an echo before the unsynchronized timeout counter reaches its time limit, the sonar system assumes that there is no echo coming (i.e. the path is clear), and starts the cycle over again. If the system didn’t utilize a timeout counter, it would wait indefinitely for an echo that might never come. The problem I discovered in the book arose from the fact that the set timeout period was 1/10th of a second, and that the frequency of the unsynchronized 555 that was clocking the timeout counter was 10Hz. The problem with this is that the timeout period is reached after the counter has only been clocked once,andthe 555 is unsynchronized to the start of the sonar pulse. What this means is that after asynchronously clearing the counter, the first tick is garbage, because we don't know if we cleared the counterright beforethe next clock edge, orright afterthe previous clock edge. This means that the timeout counter could reach a count value of one the instant after we clear it, or up to 1/10th of a second after we do so. This made the timeout counter useless, and accounted for much of the instabilities in the sonar system. I was able to fix it by increasing the 555 frequency from 10Hz to 100Hz, thus making the timeout counter tick ten times to reach the timeout period of 1/10th of a second. While the first tick is still useless, it only causes a maximum of a 10% error instead of the previous maximum of 100%, and for my purposes, this was adequate.Fixing this timer also improved the voice control system significantly, so the robot can now decode high and low whistles as a binary control word. I was also able to write a better obstacle avoidance algorithm which worked quite nicely, It was a bit difficult to get there though, because of some errors in the book. I had been using the book as a reference for the 8085 instruction set, and unfortunately there was a small, but very annoying flaw with it. It said that for the compare immediate instruction (CPI) the carry flag was set if the value in the accumulator wasless thanthat of the argument byte, when it reality, the carry flag was set if the accumulator wasgreater thanthe argument byte. It was quite hard to trace down origin of this problem that caused my code to branch in the exact opposite direction of what I had expected. It wasn’t until very late that I discovered that my documentation was at fault.Another improvement that I made was again with the sonar system. While the counter/timer fix improved the reliability, it’s range was still quite limited. I had been driving the output transducers at 5V, but I constructed a buffer/driver circuit that allowed me to drive them with 9V, and that improved the range by about a good foot and a half. The driver circuit is pretty embarrassing. It’s not at all well designed, but I was running very low on part, and at this point, I just wanted to finish the project.Unfortunately Istilldo not have video of the robot in action. Soon after writing the new obstacle avoidance algorithm, the steering motor gave out again (I checked the gear box, and it had the same stripping problem as before). I didn’t particularly want to invest in another motor, at this point, but I had this old broken electric pencil sharpener lying around, so I decided to try and use the motor and gearbox from that. It actually fit surprisingly well, and was not terribly difficult to mount and couple to the steering shaft. The gearbox had this removable tube-like shaft with a blade on it which was meant for the pencil. This fitted quite nicely over the steering column and I was able to couple it to it with gorilla hot glue (I know it’s a poor replacement for the machined coupler that I had used before, but I didn’t have access to the person who machined the previous one). Unfortunately, there were two problems with this. First, the motor was a bit too fast, and would overshoot, causing the servo system to oscillate (Though I was able to fix this by slowing it down with a PWM circuit). The second problem is that the gearbox has quite a bit of slop, on the order of 15º to 20º. I’m not sure how to deal with this yet, though a friend did mention taking out the slack with a spring constantly pulling to one side. I would really like not to have to purchase a new gear motor and then figure out how to mount and couple it again, so I might try that and see how it goes, first.Because of this, I don’t know how long it will take me to get video of this thing up and running (though I suppose I could make one on the some of the subsystems), but I will post some pictures of the new steering setup, along with the embarrassing schematic of the sonar driver.

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: July 01, 2017, 12:39:53 am
content: Just please don't build Hector from the terrible movie Saturn 3. Stuff of nightmares.

author: Cyberdragon
author_rank: Super Contributor
timestamp: July 01, 2017, 01:23:41 am
content: Quote from: Alex Eisenhut on July 01, 2017, 12:39:53 amIt looks like a retro Terminator.

author: Omega Glory
author_rank: Regular Contributor
timestamp: July 07, 2017, 07:49:17 pm
content: Well here are the pictures of the current steering column setup. In the first photo, the steering column is set so that the wheel ought to face directly forward, but because of the slop, you can see that it is allowed to point off to the left quite a few degrees. I am probably going to end up getting another gear motor with less internal slop, and figuring out how to mount and couple it.

author: Omega Glory
author_rank: Regular Contributor
timestamp: April 30, 2021, 05:29:48 pm
content: Here's a short video clip of the robot pet avoiding obstacles. I've been silent for 4 years because of college, but for senior design I decided to work on a new and improved version called "Pet on a Chip" where everything is placed on a single FPGA. Now I'm updating the documentation for the original project and will soon document the new project as well. Better footage of both should be coming out this summer.

author: Renate
author_rank: Super Contributor
timestamp: May 01, 2021, 11:43:45 am
content: You deserve some kind of prize for giving us an update after 4 years!

author: MikeK
author_rank: Super Contributor
timestamp: May 01, 2021, 08:37:36 pm
content: I seem to remember reading this book. Is this the one that had a charging station the robot would return to?

author: BrianHG
author_rank: Super Contributor
timestamp: May 01, 2021, 09:29:45 pm
content: Bravo!Excellent work.Quote from: Omega Glory on April 30, 2021, 05:29:48 pmWord of warning about the FPGA. Unless you have some serious development knowledge about FPGAs, you are better off using a mid range microcontroller. Any logic you have on your PCB, though can be coded onto an FPGA effectively, that same logic can be software coded as well. A 16 or 32 bit PIC/Atmel MCU will have multiple ADC inputs and a C compiler development language behind it, not to mention that such MCU's are <5$.

author: Stray Electron
author_rank: Super Contributor
timestamp: May 01, 2021, 10:25:20 pm
content: Quote from: Omega Glory on June 09, 2016, 05:00:28 pmLOL! I remember that book and if I recall correctly it published by TAB. All of their books were full of mistakes!I still have a Heathkit Hero robot packed away in my yet to do projects.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 01, 2021, 10:47:28 pm
content: Quote from: BrianHG on May 01, 2021, 09:29:45 pmI would suggest a 32 bit microcontroller that supports FreeRTOS. Probably an ESP32 which would also give you wireless capabilities. Or go up to some mid/high end embedded Linux platform and get machine vision.

author: Omega Glory
author_rank: Regular Contributor
timestamp: May 01, 2021, 10:55:45 pm
content: Quote from: MikeK on May 01, 2021, 08:37:36 pmI believe the book did have a discussion about that, but it was it wasn't implemented. However in the book "How to Build Your Own Self-Programming Robot" by David L. Heiserman, also published the same year by TAB, I believe that was incorporated.Quote from: Stray Electron on May 01, 2021, 10:25:20 pmOh yeah, there were a lot of small mistakes which stumped me for a very long time. At some point I want to write up an errata page for anyone else who might try to build the project. Still, it has been my favorite book on robotics to date.Quote from: BrianHG on May 01, 2021, 09:29:45 pmI've actually finished the projected already. It has a custom CPU, sonar controller, integral motor speed controller, UART, counter/timers, and a 640x480 80-column text mode VGA graphics card. I've also written a custom 2 pass assembler for it with nice features like symbolic expressions, definitions, and all sorts of useful directives. I'm just finishing up the documentation for it, and after my final exams this month, I'll post it! I know it would make a *lot* more sense to just put the thing on a cheap microcontroller, but it has been a dream of mine to design my own CPU and learn about FPGAs, so that's why I took that route, even though it's not at all practical.

author: Omega Glory
author_rank: Regular Contributor
timestamp: May 31, 2021, 02:10:04 am
content: For the benefit of readers in the future, a full thread on the new version of the robot can be found here:https://www.eevblog.com/forum/projects/pet-on-a-chip/.

author: vk6zgo
author_rank: Super Contributor
timestamp: May 31, 2021, 02:50:16 am
content: Quote from: frankdacosta on August 16, 2016, 10:57:56 pmLots of people use Morse code for ham radio!

author: james_s
author_rank: Super Contributor
timestamp: May 31, 2021, 03:18:44 am
content: Quote from: Renate on May 01, 2021, 11:43:45 amI was expecting to see one of those spam posts from a brand new account at the bottom once I realized this was a 5 year old thread.