Pololu 3pi Robot Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Hardware Pololu 3pi Robot herunter. Pololu 3pi Robot User Manual Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken

Inhaltsverzeichnis

Seite 1

Pololu 3pi Robot User's GuidePololu 3pi Robot User's Guide © 2001–2014 Pololu Corporationhttp://www.pololu.com/docs/0J21/all Page 1 of 63

Seite 2

Two rechargeable AAA Ni-MHbatteries.5. How Your 3pi Works5.a. BatteriesIntroduction to BatteriesThe power system on the 3pi begins with the batteries,

Seite 3 - 1. Introduction

output is multiplied by the number of batteries. When they are connected in series, with the positive terminal of oneconnected to the negative termina

Seite 4 - 2. Contacting Pololu

• Linear regulators use a simple feedback circuit to vary how much energy is passed through and how much isdiscarded. The regulator produces a lower o

Seite 5

A typical small brushed DCmotor, with no gearbox.One other interesting thing about this power system is that instead of gradually running out of power

Seite 6

The 30:1 gearmotor used on the3pi.Motor operation: current and speed vs. torque.The free-running speed of a small DC motor is usually many thousands o

Seite 7 - 4.a. What You Will Need

If switches 1 and 4 are closed (the center picture), current flows through the motor from left to right, and the motorspins forward. Closing switches

Seite 8 - 4.b. Powering Up Your 3pi

PWM speed control, showing gradual deceleration.Speed control is achieved by rapidly switching themotor between two states in the table. Suppose wekee

Seite 9 - 4.d. Included Accessories

The 3pi demonstrating the effects of various motorsettings.5.d. Digital inputs and sensorsThe microcontroller at the heart of the 3pi, an Atmel AVR me

Seite 10 - 5. How Your 3pi Works

The sensing element of the reflectance sensor is the phototransistor shown in the left half of U4, which is connected inseries with capacitor C21. A s

Seite 11 - 5.b. Power management

time = 0;last_time = TCNT2;while (time < _maxValue){// Keep track of the total time.// This implicity casts the difference to unsigned char, so// w

Seite 12

1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Seite 13 - 5.c. Motors and Gearboxes

You can download a pdf version of the schematic here [http://www.pololu.com/file/download/3pi-schematic.pdf?file_id=0J119](481k pdf).Pololu 3pi Robot

Seite 14

6. Programming Your 3piTo do more with your 3pi than explore the demo program or use it as a serial slave to a master device, you will needto program

Seite 15

Pololu 3pi robot on a 3/4" black line.7. Example Project #1: Line Following7.a. About Line FollowingNow that you have learned how to compile a si

Seite 16

function used later in the code also depends on having calibrated values. For more information, see Section 19of the command reference [http://www.pol

Seite 17

• Display sensor readings on the LCD. Since writing to the LCD takes a significant amount of time, you shoulddo this at most few times per second.• In

Seite 18

lcd_load_custom_character(levels+4,4);lcd_load_custom_character(levels+5,5);lcd_load_custom_character(levels+6,6);clear(); // the LCD must be cleared

Seite 19

if(counter < 20 || counter >= 60)set_motors(40,-40);elseset_motors(-40,40);// This function records a set of sensor readings and keeps// track o

Seite 20 - (481k pdf)

right_led(0);}else if(position < 3000){// We are somewhat close to being centered on the line:// drive straight.set_motors(100,100);left_led(1);rig

Seite 21 - 6. Programming Your 3pi

// Compute the derivative (change) and integral (sum) of the// position.int derivative = proportional - last_proportional;integral += proportional;//

Seite 22 - 7.a. About Line Following

8. Example Project #2: Maze Solving8.a. Solving a Line MazeThe next step up from simple line following is to teachyour 3pi to navigate paths with shar

Seite 23

1. IntroductionNote: Starting with serial number 0J5840, 3pi robots are shipping with the newer ATmega328Pmicrocontroller instead of the ATmega168. Th

Seite 24

switch(dir){case 'L':// Turn left.set_motors(-80,80);delay_ms(200);break;case 'R':// Turn right.set_motors(80,-80);delay_ms(200);b

Seite 25

// The "proportional" term should be 0 when we are on the line.int proportional = ((int)position) - 2000;// Compute the derivative (change)

Seite 26

that on the way, since you’ll travel down every hallway exactly twice. We use this simple, reliable strategy in our 3pimaze solving example:// This fu

Seite 27

}}The first main loop needs to drive down a segment of the course, decide how to turn, and record the turn in the pathvariable. To pass the correct ar

Seite 28

We’ll discuss the call to simplify_path() in the next section. Before that, let’s take a look at the second main loop,which is very simple. All we do

Seite 29 - 8.a. Solving a Line Maze

// Path simplification. The strategy is that whenever we encounter a// sequence xBx, we can simplify it by cutting out the dead end. For// example,

Seite 30

The above list of actions is a record of all the steps we took to fully explore the maze while looking for the end,which is marked by the large black

Seite 31 - 8.c. Left Hand on the Wall

When we encounter the first intersection after our first “back” action, we know we have reached a dead end that canbe removed from our list of actions

Seite 32 - 8.d. The Main Loop(s)

We next end up with the sequence ‘RBL’, which reduces to a single back ‘B’, and this combines with the next actionto produce the sequence ‘LBL’, which

Seite 33

The last dead end gives us the sequence ‘SBL’, which reduces to a sigle right turn ‘R’. Our action list is now just ‘R’and represents the shortest pat

Seite 34 - 8.e. Simplifying the Solution

2. Contacting PololuYou can check the 3pi product page [http://www.pololu.com/product/975] for additional information, including pictures,videos, exam

Seite 35

• Increasing the line-following speed.• Improving the line-following PID constants.• Increasing turning speed.• Identifying situations where the robot

Seite 36

Typically, one might use encoders to measure the lengths of the segments. We were able to just use timing on the3pi, however, because of the 3pi’s pow

Seite 37

9. Pin Assignment TablesGeneral features of the Pololu 3pi robot, top view.Pololu 3pi Robot User's Guide © 2001–2014 Pololu Corporation9. Pin Ass

Seite 38

Labeled bottom view of the Pololu 3pi robot.Pololu 3pi Robot User's Guide © 2001–2014 Pololu Corporation9. Pin Assignment Tables Page 43 of 63

Seite 39

Specific features of the Pololu 3pi robot, top view.Pololu 3pi Robot User's Guide © 2001–2014 Pololu Corporation9. Pin Assignment Tables Page 44

Seite 40 - { 3, 3, 6, 5, 8, ... }

Pin Assignment Table Sorted by FunctionFunction ATmegaxx8 Pin Arduino Pinfree digital I/Os (x3)(remove PC5 jumper to free digital pin 19)PD0, PD1, PC5

Seite 41

Pin Assignment Table Sorted by PinATmegaxx8Pin3pi Function Notes/Alternate FunctionsPD0 free digital I/O USART input pin (RXD)PD1 free digital I/Oconn

Seite 42 - 9. Pin Assignment Tables

10. Expansion Information10.a. Serial slave programThe Pololu AVR library (see Section 6) comes with an example serial slave program for the 3pi in li

Seite 43

(XBee, Wixel [http://www.pololu.com/product/1337], Bluetooth, etc). Please note that the m3pi robot is also available fullyassembled. Please see the m

Seite 44

CommandbyteCommandDatabytesResponsebytesDescription0x81 signature 0 6Sends the slave name and code version, e.g. “3pi1.0”. Thiscommand also sets motor

Seite 45

3. Important Safety Warning and Handling PrecautionsThe 3pi robot is not intended for young children! Younger users should use this product only under

Seite 46

0xBA autocalibrate 0 1Turns the robot left and right while calibrating. For use whenthe robot it positioned over a line. Returns the character ‘c’when

Seite 47 - 10. Expansion Information

serial_set_mode(SERIAL_AUTOMATIC);unsigned int position = read_line(sensors, IR_EMITTERS_ON);serial_set_mode(SERIAL_CHECK);// The "proportional&q

Seite 48

}// Returns true if and only if the byte is a data byte (< 0x80).char is_data(char byte){if (byte < 0)return 0;return 1;}// If it's not a d

Seite 49

int message[1];unsigned int tmp_sensors[5];int line_position;if(pid_enabled)line_position = last_proportional+2000;else line_position = read_line(tmp_

Seite 50 - Source code

void do_play(){unsigned char tune_length = read_next_byte();if(check_data_byte(tune_length))return;unsigned char i;for(i=0;i<tune_length;i++){if(i

Seite 51

set_motors(-60, 60);while(get_ms() < 750)calibrate_line_sensors(IR_EMITTERS_ON);set_motors(60, -60);while(get_ms() < 1000)calibrate_line_sensors

Seite 52

break;case (char)0x87:send_calibrated_sensor_values(1);break;case (char)0xB0:send_trimpot();break;case (char)0xB1:send_battery_millivolts();break;case

Seite 53

• GND-GND• PD0-PD1• PD1-PD0Turn on both master and slave. The master will display a “Connect” message followed by the signature of the slavesource cod

Seite 54

// character, and character 255 (a full black box), we get 10// characters in the array.// The variable c will have values from 0 to 9, since// values

Seite 55

// print to the slave LCDvoid slave_print(char *string){serial_send_blocking("\xB8", 1);char length = strlen(string);serial_send_blocking(&a

Seite 56 - 10.b. Serial master program

4. Getting Started with Your 3pi RobotGetting started with your 3pi can be as simple as taking it out of the box, adding batteries, and turning it on.

Seite 57

// get the line positionserial_send("\xB6", 1);int line_position[1];if(serial_receive_blocking((char *)line_position, 2, 100))break;// get t

Seite 58

In addition to PD0 and PD1, the 3pi robot has a limited number of I/O lines that can be used as inputs for additionalsensors or to control additional

Seite 59

11. Related ResourcesTo learn more about using the Pololu 3pi Robot, see the following list of resources:• Pololu AVR Programming Quick Start Guide [h

Seite 60

12. Revision History and Errata• 3pi robots with serial numbers less than 0J7259 have AREF connected to AVCC. This makes it unsafe toconfigure the AVR

Seite 61

Labeled bottom view of the Pololu 3pi robot.The following subsections will give you all the information you need to get your 3pi up and running!4.a. W

Seite 62 - 11. Related Resources

You might find the following materials useful in creating an environment for your robot to explore:• Several large sheets of white posterboard (availa

Seite 63

all of the sensors should return entirely black readings with IR off. Removing the jumper marked PC5 disablescontrol of the emitters, causing them to

Kommentare zu diesen Handbüchern

Keine Kommentare