This is the Revision A verion of the BIROD22 RoboBrick. The status of this project is that it has been replaced by the BIROD5 RoboBrick.

BIROD2 Robobrick (Revision A)

Table of Contents

This document is also available as a PDF document.

1. Introduction

The BIROD2 RoboBrick is used to connect to up to 2 of the Sharp® GP2D05 IROD (InfraRed Optical Distance) measuring sensors. This version of the Sharp chip provides a single bit of information for when the sensor is within a fixed distance an object.

The picture below shows the BIROD2A RoboBrick:

Picture of Birod2-A RoboBrick

2. Programming

The basic operation is to send a query to the BIROD2 RoboBrick to read the 2 bits of data. The programmer can download a complement mask to cause any of the bits to be complemented prior to reading.

There is an enable mask that allows the programmer to individually enable and disable one or the other IROD. In addition, there is an alternate bit which, when set, causes the IROD's to be alternately strobed. The alternate bit would be set if you are concerned that one sensor might interfere with another.

The BIROD2 RoboBrick supports RoboBrick Interrupt Protocol. The interrupt pending bit is set whenever the the formula:

L&(~I) | H&I | R&(~P)&I | F&P&(~I)]
is non-zero, where: and Once the interrupt pending bit is set, it must be explicitly cleared by the user.

The BIROD2 RoboBrick supports both the standard shared commands and the shared interrupt commands in addition to the following commands:

Command Send/
Receive
Byte Value Discussion
7 6 5 4 3 2 1 0
Read Inputs Send 0 0 0 0 0 0 0 0 Return input values ab (after XOR'ing with complement mask)
Receive 0 0 0 0 0 0 a b
Read Raw Send 0 0 0 0 0 0 0 1 Return raw data ab (without XOR'ing with complement mask)
Receive 0 0 0 0 0 0 a b
Read Alternate Bit Send 0 0 0 0 0 0 1 0 Return alternate bit a
Receive 0 0 0 0 0 0 0 a
Read Enable
Complement Mask
Send 0 0 0 0 0 0 1 1 Return enable mask ee and complement mask cc
Receive 0 0 0 0 e e c c
Read High
Low Mask
Send 0 0 0 0 0 1 0 0 Return high mask hh and low mask ll
Receive 0 0 0 0 h h l l
Read Raising
Falling Mask
Send 0 0 0 0 0 1 0 1 Return raising mask rr and falling mask ff
Receive 0 0 0 0 r r f f
Set Alternate Bit Send 0 0 0 0 0 1 1 a Set the alternate bit to a.
Set Enable
Complement Mask
Send 0 0 0 1 e e c c Set enable mask to ee and complement mask to cc.
Set High Low Mask Send 0 0 1 0 h h l l Set high mask to hh and low mask to ll.
Set Raising Falling Mask Send 0 0 1 1 r r f f Set raising mask to rr and falling mask to ff.
Read Interrupt Bits Send 1 1 1 0 1 1 1 1 Return the interrupt pending bit p and the interrupt enable bit e.
Receive 0 0 0 0 0 0 e p
Set Interrupt Bit Commands Send 1 1 1 1 0 c c c Execute shared set interrupt command ccc.
Shared Commands Send 1 1 1 1 1 c c c Execute shared command ccc.

3. Hardware

The hardware consists of a circuit schematic and a printed circuit board.

3.1 Circuit Schematic

The schematic for the Birod2 RoboBrick is shown below:

BIROD2 Schematic

The parts list kept in a separate file -- birod2.ptl.

The table below provides the color code for connecting Sharp® GP2D05's to the BIROD2 RoboBrick:

IROD Pin Symbol Wire Color Connect To RoboBrick Pin
1 Vin Green VIN0 or VIN1 2 or 4
2 Ground Black GND 1
3 Vout Blue VOUT0 or VOUT1 3 or 5
4 Vcc Red PWR 6

3.2 Printed Circuit Board

The available printed circuit boards are listed below:

birod2_back.png
The solder side layer.
birod2_front.png
The component side layer.
birod2_artwork.png
The artwork layer.
birod2.gbl
The RS-274X "Gerber" back (solder side) layer.
birod2.gtl
The RS-274X "Gerber" top (component side) layer.
birod2.gal
The RS-274X "Gerber" artwork layer.
birod2.drl
The "Excellon" NC drill file.
birod2.tol
The "Excellon" NC drill rack file.

4. Software

Each Birod2 RoboBrick has essentially the same program in it as the In4 Robobrick. The only difference is that the Robobrick Query command gives back a different number.

The Birod2 software is available as one of:

birod2.ucl
The µCL source file.
birod2.asm
The resulting human readable PIC assembly file.
birod2.lst
The resulting human readable PIC listing file.
birod2.hex
The resulting Intel® Hex file that can be fed into a PIC12C5xx programmer.

The Birod2 test software is available as one of:

birod2_test.ucl
The µCL source file.
birod2_test.asm
The resulting human readable PIC assembly file.
birod2_test.lst
The resulting human readable PIC listing file.
birod2_test.hex
The resulting Intel® Hex file that can be fed into a PIC12C5xx programmer.

5. Issues

The following issues have come up:


Copyright (c) 2000-2002 by Wayne C. Gramlich. All rights reserved.