background image

Copyright © Parallax Inc.  

Penguin Robot (#27313-27316) 

v1.4  2/16/2010  Page 18 of 23 

3.0 PROGRAMMING THE PENGUIN 

3.1. PROGRAMMING CONCEPT 

Programming the Penguin to walk is a matter of shifting its center of gravity from side to side with the tilt 

servo, coordinated with moving the legs forward and backward with the stride servo. The BS2px24’s high 
speed and expanded memory and RAM are useful for storing motion sequences and for performing the 

computations needed in sensor-based autonomous navigation.  

 

 

Close the Debug Terminal before downloading a new program, disconnecting the USB cable, 
or switching off the power to your tethered Penguin!

  If you fail to close the Debug Terminal 

before any of these actions, the port may hang up and the BASIC Stamp Editor may freeze when you 
next try to program your Penguin.  If this happens, close the Editor with the Task Manager. Be sure to 
download the latest version of the BASIC Stamp Editor from www.parallax.com. 

3.2. SERVO CALIBRATION 

The Penguins servos must be calibrated before the Penguin can walk.  This is a crucial step and the 
Penguin will not walk without it.  

 

 

 

1) Run 

Penguin-ServoCalibration.bpx.

 

2)  Click in the white Transmit area at the top of the Debug Terminal.

 

3) Press 

Enter

 to enable the servos.

 

4) Press 

+

 and 

 to adjust the tilt servo until the Penguin can stand level.

 

5)  Press the space bar to switch to the stride servo.

 

6) Press 

+

 and 

 to adjust the stride servo until the Penguin’s feet are in line with each other.

 

7) Press 

S

 to save the new settings.

 

8)  Listen for the long beep to ensure that the settings were saved.

 

 

 

Tip: Pressing 1 through 5 changes the coarseness of the adjustments 

3.3. PENGUIN’S BASIC STAMP 2PX24 PINOUT 

I/O Pin 

Description 

Direction 

P0 

Photoresistor – right  

Output 

P1 

Photoresistor – left  

Output 

P2 

Infrared emitter – right 

Output 

P3 

Infrared emitter – left 

Output 

P4 Infrared 

receiver 

Input 

P5 

Front I/O expansion port 

Input/Output 

P6 Servo 

stride 

Output 

P7 Servo 

tilt 

Output 

P8 

7-segment LED clock 

Output 

P9 

7-segment LED data 

Output 

P10 

7-segment LED latch 

Output 

P11 

Rear I/O expansion port 

Input/Output 

P12 Speaker 

Output 

P13 

Hitachi HM55B Compass – CLK (clock) 

Output 

P14 

Hitachi HM55B Compass – CS (chip select) 

Output 

P15 

Hitachi HM55B Compass – DIN/DOUT (data in/out) Input/Output 

Summary of Contents for Penguin

Page 1: ...ed together for this robot to walk This basic biped design functions best in the Penguin s small scale The Penguin mechanics have a close tolerance fit and are designed to provide precise electronic c...

Page 2: ...The Penguin s electronics are fully assembled and wired to an assortment of I O devices Additionally it has a fairly complex programming process which is more difficult to understand than a two wheele...

Page 3: ...5 2 56 threaded rod 2 5 long 2 710 00013 4 40 1 8 long 0 149 diameter stainless steel shoulder screw 4 710 00010 4 40 1 8 long 1 8 diameter stainless steel shoulder screw 4 710 00011 4 40 1 4 button s...

Page 4: ...Copyright Parallax Inc Penguin Robot 27313 27316 v1 4 2 16 2010 Page 4 of 23 1 5 BODY KIT MECHANICAL DRAWINGS...

Page 5: ...process includes several steps where you will be exposed to danger You will be using a sharp drill bit to enlarge a tiny hole and tiny pieces may fly You will be pressing ball joints together where a...

Page 6: ...ted Orientation may differ from picture shown c Plug two servos into the bottom of the power pack being careful to orient them correctly From the perspective of this photo the servo s white leads are...

Page 7: ...on the stride servo Locate the small black plastic stride linkage with two ball shaped ends This part has changed the style shown on the left is included in your kit The previous style is shown in al...

Page 8: ...est part of the ankle faces forward Shoulder screws have a 1 8 diameter smooth stainless steel surface upon which the legs will rock back and forth To install the leg assemblies on the Penguin use the...

Page 9: ...ach foot has an additional 2 56 threaded hole where the Penguin s ball joints mount for the threaded rod which connects to the tilt servo the ski poles These threaded holes denote the front of the foo...

Page 10: ...quent step Open the package and thread the 2 56 ball link post into the front of each foot You can tighten them using a 3 16 socket or small wrench Be careful not to scratch the feet as you tighten th...

Page 11: ...des an assortment of servo horns We ll use the widest servo horn in this step If you make a mistake it s okay because there s a second one in the other servo package Put on your safety goggles Place t...

Page 12: ...16 ball links on the servo horn Tighten carefully but don t deform the plastic Step 11 Attach the servo horn to the tilt servo Press the assembled servo horn onto the tilt servo positioning it cross w...

Page 13: ...ocket Future adjustments can be made quite easily by disconnecting the ball link socket from the feet only To disconnect them use a small screwdriver as a lever against the foot Cover the foot with a...

Page 14: ...board to the Penguin body The Penguin s top board contains the BASIC Stamp 2px24 circuitry It is mounted on the top of the Penguin using 2 2 56 1 4 button socket cap stainless steel screws and the 0...

Page 15: ...power pack board is installed using 4 2 56 long flathead screws and the 0 050 hex key When you mount this board be sure that the servo wires are not preventing it from properly seating into position P...

Page 16: ...ll be oriented in the same direction refer to the pictorial molded into the bottom of the battery holder s plastic surface Coil up the servo wires behind the robot It s also possible to hide them in t...

Page 17: ...to knife to remove any plastic burrs inside the plastic socket b Add a drop of oil into the socket c Reassemble the ball links and check for friction Legs move too much from left to right Pressing the...

Page 18: ...the Penguin can walk This is a crucial step and the Penguin will not walk without it 1 Run Penguin ServoCalibration bpx 2 Click in the white Transmit area at the top of the Debug Terminal 3 Press Ent...

Page 19: ...space is required Separate versions of the following programs have been created to allow for either more available resources or a more accurate compass Original Code Code Incorporating a Calibrated C...

Page 20: ...0 Freq Play the frequency Freq Freq Scale lower frequency by 1 octave NEXT Parallax Penguin Robot Penguin PhotoresistorTest bpx STAMP BS2px PBASIC 2 5 RLDRPin PIN 0 LLDRPin PIN 1 LeftLDR VAR Word Righ...

Page 21: ...2px PBASIC 2 5 Rev A boards use the OUTC port to control a 74LS47 BCD to 7 segment decoder LEDDisplay VAR OUTC The LED display mirrors OUTC Rev B boards use a 74HC595 shift register to individually se...

Page 22: ...ReadCompass DEBUG CRSRXY 9 0 DEC Heading PAUSE 150 LOOP ReadCompass Compass module subroutine HIGH Enable Send reset command to HM55B LOW Enable SHIFTOUT Compass Clock MSBFIRST Reset 4 HIGH Enable HM...

Page 23: ...ave approximately the same capacity as the more expensive ones and they re sold by Parallax at less than half the price of retail outlets Don t be fooled into paying high prices for CR123 batteries If...

Page 24: ......

Reviews: