Pololu 3pi Robot Instrukcja Użytkownika

Przeglądaj online lub pobierz Instrukcja Użytkownika dla Sprzęt komputerowy Pololu 3pi Robot. Pololu 3pi Robot User Manual Instrukcja obsługi

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj

Podsumowanie treści

Strona 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

Strona 2

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 12

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 21 - 6. Programming Your 3pi

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

Strona 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

Strona 23

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

Strona 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

Strona 25

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

Strona 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

Strona 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

Strona 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

Strona 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,

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 35

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 41

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

Strona 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

Strona 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

Strona 44

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

Strona 45

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

Strona 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

Strona 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

Strona 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

Strona 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_

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 55

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

Strona 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.

Strona 57

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Komentarze do niniejszej Instrukcji

Brak uwag