- Sussex University Home Page - COGS Home Page - EASy Home Page -
HOME
- Home - Resources - Robot Gallery - Projects - Links -
Hardware: -
Software: -
Examples: -

LEGO Robot Resources
Building a Braitenberg
Vehicle

A simple Braitenberg vehicle utilizes two light sensors and two motors to create a vehicle that will perform phototaxis.
To build this simple phototactic robot you will need the following:
Two Light Sensors >>>
(These have Velcro on the underside and can be attached to LEGO pieces that have Velcro on the top)

Two Sensor Cables >>>
(The sensor cables have a three pin plug at one end and a three pin socket at the other)

Two Motors >>>


Two Motor Drivers >>>


Two LEGO Motor Connectors >>>
(These clip on to the LEGO motors and have a two pin plug on the end of the wire that connects to the motor driver)

Two Motor Cables >>>
(The motor cables look like the sensor cables but they have a six pin plug on one end and a four pin socket on the other end)

and a two wheeled LEGO platform >>>
(You'll have to build this yourself!!)

Stage One - Building the robot


1: Attach Light Sensors
***The cables and the sockets are colour coded - make sure the colours match up so the yellow on the plug lines up with the yellow on the socket***
You need two light sensors and two sensor cables for the robot. The sensor cable connects the light sensors to the computer and they should be plugged into the Analogue to Digital Converter (AD) on the controller. There are 7 AD channels available but we are only using two light sensors so you can plug them into channels 0 and 1.

2: Attach Motors and Motor Controller
The two motors need to be connected to a motor controller or H-Bridge, this is a device that turns the low power signals from the computer into high power signals to drive the motor.

Once the motor has been connected to the H-Bridge, and the motor control cable has been attached it can then be plugged into the computer controller. To control the motors we need to use the TPU ports and for each motor we need two channels. The TPU ports, like the AD channels are arranged in pairs on the controller so you can plug the motor cable into one pair of TPU ports. For this project we are using two motors so we can use ports 0 and 1 for one motor and ports 2 and 3 for the other motor.


3: The complete system
The diagram below shows how all the sensors and motors should be connected.

**REMEMBER - make sure the wires are plugged in the right way round - match up the yellow, red and black colour markings


4: Setting the power switches
Once all the parts have been plugged in we need to perform one final check before we switch on the controller and start to program it. The controller has a number of switches that control how much power can be supplied to devices like the motors.

The motors require a higher power supply than most other devices that we might plug into the controller so we need to set the power switches correctly so that the motors will receive power directly from the battery, rather than from the on board power regulator.

To do this you should set the switch marked AUX (on the left under the AD ports) to the position marked Main Batt.

There are four other switches, each located at the bottom of the two banks of TPU channels, and the Digital IO ports E and F. Each switch has two positions marked AUX and Int 5V. Each switch determines what power source will be used to power the I/O sockets it is associated with. When the switch is in the Int 5V position it will supply those ports with the regulated power and when it is in the Aux position it will supply power from another source.

Because we have already set the Aux switch to Main Batt we can now switch the TPU channel driving the motors to the Aux setting so the motors will be driven from the main battery.

Finally you should check the other switches and make sure they are all set to Int 5v. Even though none of the other switches or ports are in use it is good practice to set them to 5v. Some devices that can plug into these ports can be damaged if they are given to much power whereas nothing will get damaged if it is powered from the 5v supply.

The image below shows the location of the power switches, plus some extra power sockets that can be ignored for the moment. **The power switches shown are not all in the correct positions for this project!!


Next: Stage Two - Writing a programme

Copyright Sussex University 2002
Maintained by wb23@sussex.ac.uk