You are on page 1of 5

P89V51RD2 BOARD

P89V51RD2 General Purpose Microcontroller Board

Content : i. ii. Basic overview of the circuit How to Use this Board? a. Connecting the inputs b. Calibration of inputs c. Connecting the outputs d. Giving the power supply e. Burning the Program f. Testing the Functionality of the circuit g. Advanced Applications h. Required Additional Components

Page 2 3 3 3 4 4 4 4 5 5

Robotics Core School


A Unit Of MATA SHAKUNTALA DEVI MANAV VIKAS SANSTHAN

www.rcs.cera.co.in
Page 1

P89V51RD2 BOARD

Brief overview of the circuit: This is a general purpose microcontroller circuit board which can be used in many applications. Lets look at what all does it contain in brief! The main components on the board Philips Microcontroller (P8951V51RD2) Onboard comparator circuit (LM324) Motor driving circuit (L293D) Onboard Burner circuitry (MAX232 & 555 IC)

P89V51RD2: It is a microcontroller of the 8051 family manufactured by Philips. It contains four ports (P0, P1, P2, and P3) which can be used as input/output ports. It has the inbuilt peripherals like Timers, Serial Port etc., for advanced applications. In this board the four ports are used as follows (see the figure to indentify the ports) P0: Can be used either as a digital input or output port. P1: Can be used to connect digital sensors (A provision is made for supplying voltage to sensors with 3 pin female connectors) P2: Can be used as output port to drive motors. (Provided with holders to connect motors) P3: Can be used to connect analog sensors. (e.g.: IR sensors for line detection)

LM324: It is quad opamp IC which has four inbuilt comparators in it. The comparators are used to convert any analog inputs (given at P3 port) into digital inputs before giving them to microcontroller. L293D: It is a motor driver IC used to interface the microcontroller outputs (at P2 port) to motors. It can be used to interface four motors. MAX232 & 555 IC: This board is provided with onboard burning (feeding the program into microcontroller) facility. These ICs help while dumping our programs into the microcontroller.

Robotics Core School


A Unit Of MATA SHAKUNTALA DEVI MANAV VIKAS SANSTHAN

www.rcs.cera.co.in
Page 2

P89V51RD2 BOARD

How to use this board? With the above overview we can proceed to learn how to use this board! Lets take an example of using this circuit to build a Line Follower Robot. For a simple line follower robot there will be two IR(infrared) analog sensors to detect the color of the line (black or white) Two motors to run the two wheels of the robot

Connecting the inputs: First let us see how to connect the inputs. Normally the IR sensor modules will have a three pin connector to connect it with this board. Connect two IR sensors to the analog port (Port 3) on the board. (See the figure, where the board has been provided with four slots for analog sensors) The fours slots are marked on the board with names Sen1, Sen2, Sen3, Sen4. (Can be seen on the board) These four sensors are connected to the following pins of the microcontroller. Sen1: P3.4 (Port3, Pin number4) Sen2: P3.5 Sen3: P3.6 Sen4: P3.7 Note: These connection details are important while writing the programs. Corresponding to each sensor a Led has been provided namely Led1, Led2, Led3 and Led4 to indicate the state of the sensor (High or Low). Normally, the Led glows if the corresponding IR sensor is on black color. Calibration of Inputs: Since the IR sensors are analog in nature they are digitalised using a comparator. And while using a comparator it should be provided with a reference voltage to do this analog to digital conversion. To provide these reference voltages, four Trimpots are provided on the board namely Pot1, Pot2, Pot3 and Pot4 corresponding to each comparator.(See the board to locate the Trimpots) After connecting the sensors to corresponding adjust (Rotate using a screw driver) these Trimpots until you find this situation,

Robotics Core School


A Unit Of MATA SHAKUNTALA DEVI MANAV VIKAS SANSTHAN

www.rcs.cera.co.in
Page 3

P89V51RD2 BOARD
Led should glow when you place your sensors on one color (normally black) and Led should turn off when you place the sensor on the other color (normally white). This completes calibration of your sensors. Connecting the outputs: Now coming to the Connection of the outputs, The outputs of the Port2 should be given to motors. The board has been provided with slots to insert the motor terminals (refer the board to locate these slots). Insert the terminals at the right place and use a screw driver to tighten them. Giving the power supply: After giving these connections, we can supply power to the board. The board can be powered through a dc battery source (12V) by using a two pin connector. Two switches have been provided to control the power supply. Switch1: Main On/Off switch (to turn on or off the supply for the entire board) Switch2: To control the power supply to the motors. Note: An On/Off indication led has been provided for swith1.

Burning the Program: The program in the hex format (which is normally written in software called keil) is to be dumped into the microcontroller. For this burning, a RS-232 socket has been provided on the board. (See the board to locate it!) The steps to be followed for burning are, 1. Insert the serial cable into the RS 232 socket provided on the board 2. Press the option, Start Burning in the flash magic software (A software used to load programs into Philips microcontrollers) 3. Turn on the Main On/off switch on the board. 4. Turn off after seeing the burning completed statement in Flash Magic. Note: It is better to switch off the Motor controller switch while burning the program. Testing the Functioning of the Circuit:

Robotics Core School


A Unit Of MATA SHAKUNTALA DEVI MANAV VIKAS SANSTHAN

www.rcs.cera.co.in
Page 4

P89V51RD2 BOARD
The outputs can the tested by seeing the voltage on the corresponding pins of the microcontroller. A Mulitimeter can be used for this purpose. 1. Place one of the terminals of the Multimeter at the ground of the circuit board. The flat extension on top of the voltage regulator IC 7805 (See the board to locate the voltage regulator IC) can be used as ground. 2. Place the other terminal of the multimeter on the particular pin of the microcontroller where you would like to see the output. Advanced Applications: The circuit can also be used for advanced applications involving tasks like serial communication Image processing

To know in detail about how to use this circuit board for such advanced applications kindly go through the respective articles from our site, www.rcs.cera.co.in. Required Additional Components: To complete the example project, Line Follower robot discussed in this manual the following are the additional components required. Two IR Sensor Modules 12 volt DC Battery Mechanical Design Two DC Motors RS 232 Cable Multimeter (Optional i.e. for testing)

To Purchase these components visit the RCS Mart at our website.

Hope you got an idea how to use this circuit board. For any further queries or doubts feel free to post at our forum, www.rcs.cera.co.in

Robotics Core School


A Unit Of MATA SHAKUNTALA DEVI MANAV VIKAS SANSTHAN

www.rcs.cera.co.in
Page 5

You might also like