Our robot had a lot of goals to meet in this assignment including a slightly modified version of those in previous projects.
The bad part about it all is that a lot of the previous code had to be rewritten because it was never intended to be used all at once. This means that we basically had to start over.
Because there was so much to this project, we decided to build two separately functioning robots that could work together to complete all of the goals. One would have the primary function of searching for victims and checking their status while the second had the ability to remove them from the arena and climb the ramp to see if any were up there. The smaller and more agile robot is named Optimus Prime, and the larger, stronger robot is called Megatron.
This is really the more important of the two robots as it has to job of actually finding the victims and generating a map. The priorities of this robot are speed and mobility rather than strength. As usual, as few of parts are used to construct a functional and aesthetically appealing body. Continuous servo motors were used in a differential drive configuration. Another servo was placed in the front of the robot to serve as a turret for panning the sensors and camera. Rear omni-wheels were once again incorporated for better navigation. Also, a rear bumper system consisting of spring loaded switches and wheels was placed on the back in such a way that the robot could easily align itself with a wall by backing into it. The wheels allow the robot to move up against the wall without ripping loose any of the sensors. Finally, a bracket is placed on top of the robot to hold the communication circuitry.
This robot seemed to be performing very well at first, but it was noticed that the front wheel tended to slip when they first turned. This was huge problem considering our robot needed to know somewhat exactly how far it was traveling. Wheel slippage would result in inaccurate results so my team built a weight box for the front of the robot to give it more traction.
If it had been me, I would have just moved the XBC further forward, but I was not there when this was done. Also, since the weight appeared to be helping, I decided not to mess with it.
The creation of this robot was done for fun just as much as anything. This robot had two main functions: climb the ramp and carry a victim. Climbing the ramp was tacked first. A set of thick, sticky sumo tires were found in the lab and screwed to Lego gears to be used for increased traction. A gear reduction of 7.5 to 1 was applied to each drive wheel and a frame was built around it. This first robot, named "Blue" because of the color scheme, was tested successfully on the ramp.
Although this robot proved to have ample strength in its initial state, a lot of trouble was encountered while trying to create a claw capable of grabbing and moving the victims. adding weight to the front of the robot would cause to tilt forward and rock back and forth. This was not good, and entire new robot was designed. This time, a four wheel drive drive train was built around the sumo tires with a single motor driving each side pair of wheels. The gear boxes created in the first version robot were duplicated such that the robot had four identical sets.
The main problem with this arrangement is turning. The lack of any sort of castor wheels combined with four very thick and sticky tires made rotation almost impossible for the robot. To correct this, a kickstand was created and placed in the rear of the robot so that if the robot needs to do a standing rotation, it will first lower the kickstand to raise the back in off of the ground. This apparatus would have been powered by a servo, but it was not strong enough on its own, and there was not enough room to create a gear box around it. So a standard Lego motor was used because of the ease of creating a gear box for it.
The two sides of the robot were connected in such a way that it would be easy to separate it in case any other changes needed to be made and a front claw was created. Rather than making a simple front claw consisting of two swing arms as was done in project 4, an entire arm was placed on top of the robot. This arm would rest on top of the robot to allow full use of the front sensors at all times. When it was time to be used, the arm would swing down into position. Two servos were used to power the arm with a 5:1 gear ratio on each. Another servo is used to rotate the the gripper and a final servo opens and closes the end effector. This arm proves to be more then capable of picking up any victims.
Once the robots were built, it was time to add some intelligence. Both robots uses quite a few sensors, but Optimus also has an intricate communication circuit on board.
This guy uses a lot of sensors. Each side held two IR "ET" sensors, and the back incorporated two spring action switches used for allignment. The front of the robot held a camera, ET, and sonar as well as light sensors, lights, a speaker, and a microphone. All of these electronics were placed on the aforementioned servo turret to allow panning.
The circuit used in project 3 was redesigned with new functionality, namely, a 750Hz tone decoder and a 1kHz tone generator. At first, the XBC itself was used to create this tone with an amplified speaker attached to the headphone jack, but the tone was not very pure and seemed to contain a static associated with ground loops. A 555 timer circuit was instead used to create the 1kHz waveform used. This is the completed block diagram.
The complete circuit was built and attached to the top of the robot. The power for the circuit was supplied directly by the XBC instead of using an external battery pack.
Because the creation of the 3.5kHz tone decoder was described in detail in the project 3 page, it will not really be discussed here. The same equations were used to create a 740Hz tone decoder as were used for the 3.5kHz one.
The outputs of the filters were directed into two LM567 tone decoders, and a potentiometer across the timing resistor nodes so that the correct tone(s) to be decoded could be precisely keyed in using test tone generators in the lab. The outputs of the decoders illuminate an LED to give a visual cue of the victims' responses before being fed into the digital inputs of the XBC. This method was used instead of the one used in project 3 because the robot only cares what tone is being emitted, not how loud it is.
The next stage to be designed is the 555 timer circuit. The values for RA, RB, and C1 were chosen to satisfy Equation 1 in generating a period of 1 / 1000Hz. This circuit and the resulting simulated waveform are shown.
The most unusual sensor used on Megatron is a break beam sensor acting as an encoder for the kick stand. As the robot rotates, the Lego wheel turns and the break beam sensor is triggered by each of the holes in the frame of the wheel. This allows for very accurate rotations as it was not feasible to use the "motor ticks" method from project 2 alone because of the sumo tires.
Megatron would then enter and go straight down the hallway, looking for the ramp to climb. Once there, he would climb the ramp to look for any victims up there. If any were found, he could carry them back down to be questioned for their health status by Optimus. As Optimus found victims and communicated with them, he would update the host and Megatron with their coordinates in the warehouse as well as their condition. Megatron could then go to retrieve the victims, removing them from the warehouse. Once every room had been searched and every victim had been removed, both robots would exit the warehouse, and our group would be praised by the class and instructors on what an awesome job we did. That was the plan anyway... robots can sometimes seem to have a mind of their own.
Even though the only goal not completed was the removal of the victims, that was the part we had planned the most on - primarily for the glory aspects of doing so. In the end, we learned a valuable lesson that with increased functionality comes increased complexity. When designing robots, it is more important that they do one thing perfectly than 10 things once in a while.
Trans-wheels are used instead of rear castors.
The front weight box is rather unsightly, but it serves its purpose.
T = 2RB*C*ln(2)
f = 1 / T