db2 is built on a very compact strong frame and has repositionable ultrasonic and light sensors, a single motor clamp and lift mechanism, it also has front and rear bumpers which trigger a single touch sensor.
The frame is as compact as possible with the three motors mounted as close as they can fit. The touch sensor and sound sensor are fitted on their side to save space. The wiring is compact yet allows access to change the batteries.
The ultrasonic and light sensors are connected to the upper jaw fitted with rubber ’teeth’ to aid grip. The two jaws are connected to a gear train which runs down the centre of the neck. When the neck is lowered to the bottom it hits some stoppers and can’t drop any further. At this point the same gear train which lowered the neck is used to open the jaws.
Linking the jaw and neck gears in this way means one motor can be used to raise and lower the sensors and mouth as well as opening and closing the jaws.
Both the front and rear bumpers are connected to beams on either side of a pivot. The beam then presses the touch sensor, this means one sensor can be used to detect both bumpers.
The position of the front bumper also means it can use it as a sensor to detect when the mouth is fully opened as the lower jaw presses into it.
The main program running on db2 is a state machine consisting of 4 main routines; seek, approach, pickup and drop. The robot moves between states itself based on input from the sensors. There is also a calibrate program to enable the robot to store light levels of objects to pickup or to avoid, this data is saved in a text file on the NXT.
There is an additional program for line following, due to the way db2 is built all that needs to happen is for the neck to rotate to a known position which lowers the light sensor to about half an inch above the ground.
Dogbot was my first multipurpose NXT MOC, it lasted a few weeks before being built into my current MOC db2. Here is a video of Dogbot searching for and finding the ball and also line following: