9th February Notes / Photos


Design and build a mobile robot to act as follows:

  • Randomly "cruise" around
  • Turn towards and approach a source of bright light (torch)
  • Stop if the source of bright light is above a predetermined threshold, not to bump into it
  • Detect a collision with an obstacle and "escape" by backing up and rotating through a suitable angle.

Notes / Comments

The core of the Robot design (i.e. RCX brick placement, motors, treads) were already created during previous tutorials. We already had the light sensors wired up aswell (however they were mounted on the top of the device).

During this tutorial, we mainly re-wrote the control code, but also added the front and rear bump sensors, and relocated the light sensors, as-well-as a few cosmetic changes, and the placing of the lego torch on the back.

Front Bump Sensor

The front bump-sensor went through several design iterations. The principal is the same as our final design, yellow bars that can swing from the top of the robot to some outstrech poles covering the front of the robot which, when hit, will collide with a low mounted bump sensor.

To start with, we only used one yellow bar with several long black poles coming out of it to detect collisions at the front of the robot. This had the problem that when the robot collided with objects away from its center, the yellow bar would have more of a rotational than pushing force applied and the switch would not always trigger.

To combat this, we added a second yellow bar, and placed a brick in the middle to impact against the switch. This was an improvment, however the brick did not originally have a smooth surface so the bump sensor would not always trigger. This was easily solved by the used of a 'smooth' brick placed on top (just visible in some of the photo's).

Rear bump sensor

We would have liked to have created the rear bump-sensor in the same way the front one was designed, however the necessary supports and wires to reach the motors made this slightly impractical. Instead we created a support to place a swinging arm and mounted the switch on the opposite side. Some playing with the lego pieces had to be done to make sure the arm was firmly in place and only had 1 degree of freedom.

Both the rear and front bump sensors are wired into the same input.

Light Sensors

We orginally mounted the front bump sensor supports on top of the light sensors. This quickly changed as we realised the yellow bars where blocking light to the sensors, and they were too high up to properly detect a floor-level torch.

Once the design of the front-bump sensor stabilised, we swapped the light sensors on the top of the robot for some normal blocks and added a second front bar (and grey extenders) to the front of the bump sensor to mount the light sensors against. This has proved generally successfull. However there is a small dead-spot between the two sensors where no light is picked up.

Each light sensor has its own input sensor.

Torch Bulb

We mounted this on the rear of the robot and wired it up to the free output spot.

Robotics Screenshot

An overall shot of the final product.

The design was modified from our previous robot (no photo's exist for that), with the addition of front-and-read bump sensors and low, front-mounted light sensors.

Robotics Screenshot

Close up of front-mechanism

The bump-collision mechanism is simple but effective, any contact with the front device pushes onto the switch and triggers it.

In order to get the light sensors as low as possible, they were mounted on the side of the bump-mechanism.

The wings are superfluous decoration.

Robotics Screenshot

Detail of Top/Side

Here you can see the wiring of the robot - A note for future weeks, it could probably be neatened slightly.

You can also see the simple gearing / powering of the treads by the motor (symmetric on the other side).

Robotics Screenshot

Detail of back bump sensor

Here the bump-sensor will be triggered by the flexible arm that will be forced against it in the event of a collision

Robotics Screenshot

Overview II

Here we can see the front of the robot with the collision arm raised so the IR sensor is clearly visible.

Robotics Screenshot
Robotics Screenshot

Over the little guys shoulder

Sometimes it is important to remember the world looks completely differently over the shoulder of a little lego guy :)

Robotics Screenshot


Robotics Screenshot
Robotics Screenshot


We can clearly see the robot turning towards the light source as it detects it.

Robotics Screenshot
Robotics Screenshot
Robotics Screenshot
Robotics Screenshot
Robotics Screenshot
Robotics Screenshot

We wouldn't...

Robotics Screenshot

...Would we?