Pololu 3pi Robot User Manual

Page 61

Advertising
background image

In addition to PD0 and PD1, the 3pi robot has a limited number of I/O lines that can be used as inputs for additional
sensors or to control additional electronics such as LEDs or servos. These I/O lines can be accessed through the pads
at the center of the 3pi, between the two motors, labeled PD0, PD1, ADC6, ADC7, and PC5. If you are using an
expansion kit, these lines are brought up to the expansion PCB.

Pins PC5, ADC6, and ADC7 are all connected to 3pi hardware via removable shorting blocks. By removing the
shorting block, you can use these pins for your own electronics. Pin PC5 can be used as either a digital I/O or an
analog input. When its shorting block is in place, it controls the emitters for the IR sensors; when its shorting block is
removed, the emitters are always on. Pin ADC6 is a dedicated analog input that connects to a voltage divider circuit
that monitors the battery voltage when its shorting block is in place, and pin ADC7 is a dedicated analog input that
connects to the user trimmer potentiometer when its shorting block is in place.

Note: If you call the Pololu AVR library’s sensor reading functions, the 3pi will drive pin PC5 high for
the duration of the sensor read, and it will then drive pin PC5 low. It does this even if the PC5 shorting
block is removed. If this behavior will interfere with what you want to connect to PC5, you can modify
the library code to initialize the sensors with a bogus emitter pin (e.g. 20 instead of 19).

If you are willing to give up the LCD, as is required when you use the

expansion kit without cutouts

[http://www.pololu.com/product/978]

, you gain access to several more I/O lines. Removing the LCD completely frees the

three LCD control pins (PB0, PD2, and PD4), and it makes the four LCD data pins (PB1, PB4, PB5, and PD7)
available for limited use. If you do use the LCD data pins, you must make sure that their alternate functions do not
conflict with whatever you connect to them. Pins PB1, PB4, and PB5 connect to the user pushbuttons, and PD7
connects to the green user LED. It is important to note that PB4 and PB5 are also programming lines, so you must not
connect anything here that would interfere with programming.

So in summary, pins PD0 and PD1 are completely free digital I/O lines that can be used for general-purpose I/O
or for TTL serial communciation. Pins PC5, ADC6, and ADC7 can be freed from 3pi hardware by removing their
respective shorting blocks. PC5 can be used as an analog input or a digital I/O, and ADC6 and ADC7 are dedicated
analog inputs. Pins PB0, PD2, and PD4 become completely free digital I/O lines once you remove the LCD, and pins
PB1, PB4, PB5, and PD7 are digital I/O lines that you can use for certain applications if you are careful not to cause
conflicts between them and their alternate functionality.

For more information, please see

Section 9

for the 3pi pin assignment tables and

Section 5.e

for the 3pi schematic

diagram.

Pololu 3pi Robot User's Guide

© 2001–2014 Pololu Corporation

10. Expansion Information

Page 61 of 63

Advertising