Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation Pololu m3pi User’s Guide 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.a. Contacting Pololu . . . . . . . . . . . . . . . . . . . . . 1.b. Included Components . . . . . . . . . . . . . . . . . . . 1.c. Other Things You Might Need . . . . . . . . . . . . . . . 2. Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.a. Adding Components to the Top of the Expansion PCB . . 2.b.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation 1. Overview The m3pi robot is an upgraded version of our popular 3pi robot [https://www.pololu.com/product/975], consisting of a 3pi robot base connected to an m3pi expansion board that simplifies augmenting your robot’s capabilities with an mbed development board [https://www.pololu.com/category/128/mbedmicrocontrollers] (or other microcontroller boards), wireless modules, and sensors.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation Since the m3pi robot is an expansion of the 3pi robot, it also has all the features of the 3pi robot: • Max speed of around 100 cm/second • Regulated motor voltage (performance is unaffected by battery voltage) • 5 reflectance sensors on underside of leading edge for line following and maze solving • 8×2 character LCD for debugging, feedback, and user interfaces Pololu 3pi robot on a 3/4" black line.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation Fully-Assembled m3pi Robot with mbed Socket The following connectors and components are already installed on the fully-assembled m3pi robot (as shown in the picture on the right): • mbed socket • XBee socket • USB A connector • 2-pin battery-charging header • Power pushbutton Fully-assembled Pololu m3pi robot.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation The m3pi expansion kit PCB has all of the surface-mount components populated, but none of the throughhole components ship soldered in. When combined with a 3pi robot [https://www.pololu.com/product/975] (not included), the m3pi expansion kit includes everything required to make your own fully-assembled m3pi robot as pictured in the section above. These components are shown in the picture on the right and include: • Two 2×20 0.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation general-purpose buttons on the expansion PCB • Four screws, spacers, and nuts for mounting the expansion PCB to the 3pi base 1.c. Other Things You Might Need The m3pi is designed to be easily augmented by several additional components that are not included with the m3pi: • 4 AAA batteries. Any AAA cells will work, but we strongly recommend NiMH batteries, which are rechargeable and can be purchased from Pololu [https://www.pololu.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation • An mbed. The m3pi was designed to work with an mbed development board [https://www.pololu.com/category/128/mbedmicrocontrollers] as the main robot controller, and using an mbed allows you to get the most out of your m3pi. This is an optional component, however, as the m3pi can still function without an mbed. The m3pi robot ships with the mbed socket already installed. Pololu m3pi robot with mbed and XBee modules socketed.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation kit. The m3pi robot can be used out of the box without any soldering, but a soldering iron could still come in handy if you want to install a Wixel socket or make use of the robot’s prototyping space for custom circuits or the addition of sensors. An inexpensive soldering iron [https://www.pololu.com/product/156] will work, but you might consider investing in a higherperformance soldering iron [https://www.pololu.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation 2. Assembly If you ordered a fully-assembled m3pi robot [https://www.pololu.com/product/2151], your m3pi expansion board and the included 3pi robot are already populated with all of the standard components except for the Wixel socket headers, because these would interfere with the XBee socket. If you want to use a Wixel, please see the Wixel Socket portion of Section 2.a.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation Assembly location diagram for the m3pi’s top-side components and headers. 2.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation Assembly location picture for the m3pi’s top-side components and headers. Pololu m3pi expansion kit after assembly. mbed Socket 2.
Pololu m3pi User’s Guide If you want to use an mbed development board microcontrollers] © 2001–2017 Pololu Corporation [https://www.pololu.com/category/128/mbed- as the main controller of your m3pi robot, you should solder the two 2×20 0.1″ female headers to create a socket for the mbed as shown in the two diagrams at the top of this section. See Section 4.a for more information on the mbed socket.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation The m3pi expansion kit includes three pushbuttons that can be used to add a power button and two general-purpose user buttons to the m3pi expansion PCB. The locations for these buttons are shown in the two diagrams at the top of this section. See Section 4.c for more information about the pushbuttons.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation section. Please see Section 4.h for more information about the USB A connector. AVRISP Connector If you want to use your mbed as an AVR programmer (e.g. to reprogram the microcontroller on the 3pi base), you should solder the shrouded and keyed six-pin (2×3) 0.1″ male header to the m3pi PCB as shown in the two diagrams at the top of this section.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation m3pi locations for the 1×11 and 1×12 0.1″ female Wixel socket headers. Note: The Wixel socket headers are taller than the XBee socket headers, so you will no longer be able to use the XBee socket once you add the Wixel socket. For this reason, the fully-assembled version of the m3pi does not ship with the Wixel socket installed. You should only add this socket if you are sure you do not want to use an XBee module for your wireless communication.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation 2×7 and two 1×2 0.1″ extended male headers used to connect the m3pi expansion PCB to the 3pi robot base. The short ends of these headers should be soldered to the m3pi expansion PCB in the locations shown in the pictures below; the long ends will plug into female headers on the 3pi robot base. m3pi locations for the headers that connect the expansion PCB to the 3pi robot base (as seen from the top).
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation The m3pi expansion kit includes a 2×7 0.1″ female header and a 1×2 0.1″ female header that must be soldered to the 3pi robot base to act as receptacles for the extended male headers you just soldered to the m3pi expansion PCB: The 2×7 female header becomes the 3pi expansion header and the 1×2 female header becomes the 3pi power button header; the 3pi ships with the 1×2 female battery charge port header already soldered in.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation 3pi robot female headers that connect to the male headers on the underside of the m3pi expansion PCB. Note: Be very careful to plug the expansion board into your 3pi correctly. The female headers do not strictly enforce proper positioning or orientation on their own. Additionally, remember to add batteries to your 3pi before you plug in the m3pi expansion board. We strongly recommend you use rechargeable batteries for your m3pi robot.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation When assembly is complete, you should have an m3pi robot that looks something like this (depending on which components you added in Section 2.a): 2.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation 3. Using the m3pi The m3pi robot was designed to work with an mbed development board category/128/mbed-microcontrollers] [https://www.pololu.com/ as the main robot controller, sending serial commands to a slave 3pi base, but it can also be used with a programmable Wixel module [https://www.pololu.
Pololu m3pi User’s Guide libraries/m3pi]; © 2001–2017 Pololu Corporation many of the serial-slave commands are supported by the m3pi library. To use the library in your mbed program, either base your program off of an existing m3pi program or click the “import this library into a program” link on the m3pi library webpage. If you are using the m3pi expansion kit to upgrade your 3pi robot to an mbed-controlled m3pi robot, you should use your AVR programmer to load the serial slave program [https://www.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation If you are using the m3pi expansion kit to upgrade your 3pi robot to a Wixel-controlled m3pi robot, you should use your AVR programmer to load the serial slave program [https://www.pololu.com/docs/0J21/10.a] onto the 3pi. The source code for the serial slave program is included with the Pololu AVR library [https://www.pololu.com/docs/0J20], as is a precompiled hex file.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation 4. The Expansion Board in Detail 4.a. mbed and Wireless Module Sockets The m3pi expansion board makes it easy to add an mbed development board as the m3pi’s main controller, and it supports the addition of one of several different wireless modules (see Section 1.c for more information). The following diagram shows where these modules connect on the m3pi expansion PCB: 4.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation The m3pi expansion board [https://www.pololu.com/product/2152] ships as shown in the above picture, with the headers required to make sockets for these modules included but not soldered in. The m3pi robot [https://www.pololu.com/product/2151] ships with the mbed and XBee socket headers already soldered in. Headers for the Wixel socket are included but not soldered because they would interfere with the XBee socket.
Pololu m3pi User’s Guide Pololu m3pi robot with mbed and Wixel modules socketed. © 2001–2017 Pololu Corporation Pololu m3pi robot with mbed and XBee modules socketed. The m3pi expansion PCB connects mbed pins P9 and P10 directly to the serial RX (PD0) and TX (PD1) pins of the 3pi base, respectively. It also connects mbed pin P8 to the 3pi’s reset pin (PC6) through a level-shifting MOSFET. The level shifter also acts as an inverter, so driving P8 high resets the 3pi.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation m3pi serial and reset connections to the 3pi robot base. Note: You should not use these jumpers if your m3pi robot has a socketed mbed. The m3pi expansion PCB also connects mbed pins P27 and P28 to the serial TX and RX pins, respectively, of the Wixel and XBee sockets, and it connects mbed pin P26 to the Wixel and XBee socket reset lines (driving P26 low resets the wireless devices). This means that the mbed NXP LPC1768 [https://www.pololu.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation m3pi serial and reset connections between the XBee or Wixel and the mbed. The following schematic shows the m3pi’s serial connections: 4.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation m3pi schematic diagram of the serial connections between the various components. The unused Wixel and XBee pins are connected together as shown in the diagram below. It is not possible to simultaneously use a Wixel and XBee, so these connections exist to provide more multiple convenient access points for each of the unused Wixel and XBee pins. 4.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation General-purpose Wixel or XBee pins can be accessed at multiple points on the m3pi expansion PCB. Warning: The mbed, Wixel, and Xbee use 3.3 V logic and the 3pi uses 5 V logic. While the mbed pins are 5V-tolerant, the Wixel and XBee pins are not. All of the dedicated connections between components on the m3pi expansion board perform the required level shifting, but you must be careful if you make your own connections to free Wixel or XBee pins.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation m3pi power nets. The expansion board’s power comes from the three power rails of the 3pi robot base: VBAT, VBST, and VCC. VBAT is the battery voltage, which is supplied by the 3pi base’s four AAA cells. VBAT will change over time as the batteries discharge, and the nominal voltage depends on whether you are using alkaline or NiMH cells. VBST is the output of a 9.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation 4.c. Pushbuttons The expansion PCB has designated connection points for three pushbuttons: a push-on/push-off power button connected in parallel with the power button on the 3pi base, a general-purpose pushbutton connected to mbed pin P21 on one side and ground on the other, and a general-purpose pushbutton that is not connected to anything except a set of prototyping pins on each side.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation The m3pi expansion board has four general-purpose 2/3 voltage dividers that can be accessed by the set of four upper “HV” and “LV” pins (pictured to the right) located between the Wixel and XBee socket pins. These voltage dividers can be used to safely connect 5 V outputs to 3.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation The LEDs are evenly distributed both radially and horizontally, which means they can conceivably be used for persistence of vision displays when the m3pi robot is spinning in place or driving straight.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation Please note that rechargeable batteries are not required as the 3pi can use regular alkaline cells, but we strongly recommend investing in some NiMH cells and a charger. If you use non-rechargeable batteries, you will need to regularly replace them, which each time requires the somewhat cumbersome process of removing the m3pi expansion board and the 3pi LCD. 4.g.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation soldered to the PCB; the m3pi expansion kit includes this header, but it is not soldered in. If you are assembling the m3pi expansion kit and want to include an AVRISP header, please make sure to align it properly: pin 1 on the header, denoted by a triangle in the plastic, must connect to pin 1 on the PCB, denoted by a caret on the silkscreen and an octagonal pad. The AVRISP connector is not used to program anything on the m3pi expansion PCB.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation drives around. This connector is only required if you want to use your mbed as a USB host; it does not serve the same function as the mbed’s mini-B USB connector, which is used to program the mbed. 4.i. 3pi Base Pins The m3pi expansion board has access to a number of pins from the 3pi base via a 20-pin header near the center of the PCB: m3pi PCB header for accessing pins on the 3pi robot base.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation m3pi mbed socket pins that connect to PD0 and PD1 on the 3pi base. You can find out more about these I/O lines from section 10.c of the 3pi user’s guide [https://www.pololu.com/docs/0J21/10.c].
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation Note: 3pi pin PB3 doubles as a 3pi motor driver input and an AVR programming pin. We strongly recommend that you not connect this pin to anything. By default, pin PC5 is an AVR output whose state depends on what the 3pi is doing with its line sensors, even with the PC5 jumper removed. Unless you modify the 3pi base firmware appropriately, do not connect an output to this pin! 4.j.
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation A larger version is available for download as a pdf: m3pi schematic [https://www.pololu.com/file/download/ m3pi_schematic.pdf?file_id=0J499] (25k pdf). Advanced users might also be interested in the 3pi schematic [https://www.pololu.com/file/download/3pischematic.pdf?file_id=0J119] (481k pdf). 4.