56
Nomad HDATS Kit Assembly, Tuning and Example Program VERSION 1.0

NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

Nomad HDATS Kit Assembly, Tuning and Example Program

VERSION 1.0

Page 2: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

2

WARRANTY CrustCrawler warrants its products against defects in materials and workmanship for a period of 30 days. If you discover a defect, CrustCrawler will, at its option, repair, replace, or refund the purchase price. Simply call for a Return Merchandise Authorization (RMA) number, write the number on the outside of the box and send it back to CrustCrawler. Please include your name, telephone number, shipping address, and a description of the problem. We will return your product, or its replacement, using the same shipping method used to ship the product to CrustCrawler.

14-DAY MONEY BACK GUARANTEE If, within 14 days of having received your product, you find that it does not suit your needs, you may return it for a full refund. CrustCrawler will refund the purchase price of the product, excluding shipping / handling costs. This does not apply if the product has been altered or damaged. Please refer to our web site for the latest warranty information.

COPYRIGHTS AND TRADEMARKS This documentation is copyright 2004 by CrustCrawler, Inc. BASIC Stamp is a registered trademark of Parallax, Inc. If you decided to use the name BASIC Stamp on your web page or in printed material, you must state that "BASIC Stamp is a registered trademark of Parallax, Inc." Other brand and product names are trademarks or registered trademarks of their respective holders.

DISCLAIMER OF LIABILITY CrustCrawler, Inc. is not responsible for special, incidental, or consequential damages resulting from any breach of warranty, or under any legal theory, including lost profits, downtime, goodwill, damage to or replacement of equipment or property, and any costs or recovering, reprogramming, or reproducing any data stored in or used with CrustCrawler products. CrustCrawler is also not responsible for any personal damage, including that to life and health, resulting from use of any of our products. You take full responsibility for your BASIC Stamp and robotic application, no matter how life-threatening it may be.

INTERNET ACCESS We maintain internet systems for your use. These may be used to obtain software, communicate with members of CrustCrawler, and communicate with other customers. Access information is shown below: E-mail: [email protected] Web: http://www.CrustCrawler.com

Page 3: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

3

Preface The Nomad HDATS (Heavy Duty, All Terrain System) is an original design from Alex Dirks of the CrustCrawler team. The Nomad HDATS is the result of months of development and design work to ensure a high quality, solid product for the robot enthusiast. Experience programming the BASIC Stamp is helpful, but if you need more help in this regard you can find plenty of robotic programming resources on our web site (www.crustcrawler.com). All of the sensors we sell include BASIC Stamp program examples which you could readily adapt to the Nomad HDATS. Great resources for electronics can be found at Mouser www.mouser.com and Digikey (www.digikey.com). Batteries and chargers can be found on the Crustcrawler web site. Support for your Nomad HDATS, should you need it, is as simple as and e-mail ([email protected]) or phone call away (480-577-5557). We have also provided a web forum for each of our product categories if you would like to ask a question or share information about your robotics project. The CrustCrawler team assures you that when you successfully complete the Nomad HDATS you’re in for an exciting series of robotic projects that you will find highly rewarding.

Source Code from the CrustCrawler Web Site (WWW.Crustcrawler.Com)

Nomad HDATS Source Code

The CrustCrawler web site and the Nomad DATS page contains complete, commented sample BS2P-IC source code, this installation guide and additional pictures of Nomad to aid you during the construction process.

Projects and Accessories are available from the CrustCrawler web site

Nomad Projects / Accessories

Projects that include updated code; electronics and hardware accessories are always being added to the Crustcrawler web site. Check with our site often for the latest updates.

Page 4: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

4

Chaper #1 - Preparing To Assemble the Nomad HDATS

REQUIRED TOOLS The following tools will be required to build your SG5 robotic arm:

Phillips screwdriver Drill 1/8” drill bit Small adjustable crescent wrench or socket set Wire cutters A small amount of white grease or equivalent

SG5 ROBOTIC ARM FULL KIT INVENTORY The Nomad HDATS kit contains the following components:

Electronics\Software:

(12) HiTec HS-475 HB Servos 6 HiTec HS-645 MG servos. Servo Wire Extensions – (6) 12” ans (2) 6” Parallax BOE, BS2P24 module, (2) PSC servo controllers and (1) Parallax LCD Appmod

(available in the full kit only)

Aluminum Parts:

(1) Upper Deck (1) Lower Deck (6) Side braces (6) Servo holders (6) Front legs (6) Back legs (6) front foot (6) back foot (6) servo pivot braces

Nuts, Bolts, Washers Screws & Spacers

(12) #2- 5/16” screws (64) #4 – 1/4” screws (12) #4 – ½” screws (12) #4 – 5/16” screws (64) #4 nuts (12) #4 lock nuts (64) #4 lock washers (24) #4 washers (12) #4 -1/4” nylon spacers (36) #6 –3/8” screws (42) #6 nuts (42) #6 lock washers (6) #6 – 1/2” screws (12) #6 washers

Page 5: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

5

(6) #6 lock nuts (18) ¼” SAE flat washers (6) #8 – 1.25” screws (6) #8 Lock nuts (12) #8 washers (6) #8 - ½” nylon spacers (6) #8 – ¼” nylon spacers

Miscellaneous

(1) Nomad HDATS construction and programming manual (24) Cable Ties (6) Rubber Foot Bumpers (12) Tie rod couplers (12) Brass balls (12) #4 hex screws (6) 4/40 threaded rods

Page 6: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

6

ADDITIONAL PARTS YOU NEED TO SUPPLY Like other hobby kits, completing the Nomad HDATS kit requires additional parts that you will need to supply. This hardware is not included in the Nomad kit because it would only drive the cost higher as most of these items are readily available at hobby stores or www.crustcrawler.com.

• 5 V NiMH or NiCd six-cell rechargeable battery for servo power. This is a standard 1800 mAH to 3300 mAH battery pack, commonly used in R/C cars. Crustcrawler has an excellent, deep cycle, 3300 series NiMH battery pack which has been selected just for the Nomad HDATS kit.

• AC/DC Digital Peak Charger for the 5 V NiCd/NiMH battery. CrustCrawler carries an excellent charger from Hi-Tec. Refer to our web site for details.

• Zip-ties of the smaller sizes are very useful for securing wires in a tidy fashion. Approximate cost is probably a few dollars. Available from any hardware store. (12) Zip ties have been included in your kit.

• Robot sensors Nomad has been designed for sensor integration. Selecting the appropriate sensor is left up to you, our customer. CrustCrawler (www.crustcrawler.com) has many acceptable add-on sensors for Nomad. The S3 and S2 series of sensor stands have been especially designed to bolt right to the Nomad chassis and accept almost all of the most common sensors available today. Additional sensors can be purchased from Parallax (www.parallax.com).

Page 7: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

7

Chapter #2: Pre-Assembly Tips

PAY ATTENTION TO DETAILS • Work in a well lit, clean environment with lots of workspace

• Organize your nuts, bolts and screws so that you have each specific size of lock-nuts, screws, washers in the same group and are easily within reach.

• Take your time! The Nomad HDATS kit is a precision made product and requires all parts to be assembled in the exact order as described in this installation manual.

• The average time to construct Nomad is between 3 to 6 hrs..

• During the construction process, please refer to the reference pictures in this guide frequently. Refer to and study the pictures and close-up diagrams carefully before starting the construction of any part of your kit.

• Always note the orientation and direction of screws and aluminum parts and which side of Nomads legs you are constructing! It absolutely makes a difference!

Page 8: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

8

PREPARING THE SERVOS • Remove the aluminum body parts from their protective bags and lay them loosely in their

respective groups on your work surface.

• Remove the riser tabs from both sides of the (12) HiTec HS-475HB servos as shown below. The removal of this plastic riser will allow the servo to sit flush against the servo holder. These servos will be installed in the next few steps of the construction process.

Figure 1 - Servo Tab Removal

Page 9: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

9

Chapter #3: Assembling The Upper Deck

1. Using a 1/8” drill bit, drill out the holes of (12) of the servo horns as shown in figure 2. Tip: Drill the holes with the servo arm still mounted on the servo. After completing the holes, remove the round servo arm and temporarily place the servo screw back onto the servo.

Figure 2 - Servo Arm Modification

2. Using (2) #4 – 1/4” screws, lock washers and nuts, install the (6) round servo arms to the upper deck as shown in figure 3. Ensure that the center of the servo hole is centered in the hole of the upper deck before tightening the assembly.

Figure 3 - Servo Horn Installation

Page 10: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

10

3. Using (2) #6- 3/8” screws , lock washers and nuts, install the HitTec 645MG servo to the top of the 2 tabs on the servo holder with the servo oriented as shown in figure 4.

Figure 4 - Horizontal Servo Installation

4. Using (2) #6- 3/8” screws , lock washers and nuts, install the HiTec 475 HB servo to the servo holder as shown in figure 5. Ensure that the servo is positioned as shown in figure 5. Use (1) tie wrap to secure the servo wires to the servo holder (reference figure 5b). Repeat steps 3 and 4 for all (6) servo holders.

Figure 5 - Vertical Servo Installation – Front View

Tie Wrap

Page 11: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

11

Figure 5b – Securing the servo wires

Page 12: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

12

5. Fold the servo wires into a small bundle and tie wrap them to keep the servo wires from

interfering with the next few steps in the construction process (figure 6).

6. Install the completed servo holder assembly’s to the upper decks round servo arms as shown in figure 6. Ensure that the servo holder assembly can be rotated approximately 90 degrees from center before securing the assembly with the servo arm screw. Ensure that the servo arm screw from the HiTec 645MG servo is used to secure the servo holder assembly to the upper deck as these screws are different from that of the HiTec 475 HB servos. Figure 6b shows the completed assembly.

Figure 6 - Servo Holder Installation

Page 13: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

13

Figure 6b

Page 14: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

14

7. Using (2) #4 – 1/4” screws, install each of the (6) side braces to the upper deck as shown in

figure 7. Figure 7b shows the completed installation.

Figure 7 – Side Brace Installation

#4 – ¼” Screw

Page 15: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

15

Figure 7 – Completed Side Brace Installation

Side Brace

Page 16: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

16

Chapter #4: Assembling the Lower Deck

8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the (2) Parallax Servo Controllers (PSC’s) to the lower deck as shown in figure 8. Ensure to note the orientation of the PSC controllers as they are mounted on the lower deck. Daisy chain the (2) PSC’s together so that (1) PSC controller is configured for ports 0 -15 and the other is configured for ports 16 - 30 as noted in the PSC users manual. Also, connect any battery power connecter(s) to the PSC’s at this time (figure 8b).

Figure 8 - PSC Installation

Page 17: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

17

Figure 8b – PSC Wiring and Power Connections

Note: There are several ways to configure power for the PSC’s. The example in figure 8b has both PSC’s sharing power with 1 power supply (the PSC power inputs are connected together). You can configure the PSC’s to have a dedicated battery for each as well. PSC power configuration is left up to you, our customer.

Battery Harness

Page 18: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

18

9. Using (4) #4 – ¼” screws, lock washers and nuts, install the battery braces to the other side of the lower deck as shown in figures 8c and 8d.

Figure 8c

Figure 8d

Page 19: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

19

10. Apply a small amount of grease to the base of each of the (6) pem spacers of the lower deck as shown in figure 9.

Figure 9 - Grease Application

11. Install (1) ¼” SAE flat washer (flat side down) to each of the (6) pem spacers of the lower deck. Apply a small amount of grease to the top of each of the (6) SAE flat washers as shown in figure 10.

Figure 10 - Grease Application

Page 20: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

20

12. Gently place the upper deck onto the lower deck ensuring that the pem spacers align with and

insert into the pem spacer hole located at the bottom of each of the (6) servo holders (figure11). Do not secure the upper deck to the lower deck with the side braces until you have ensured that all of the pem spacers have been inserted into the pem spacer holes for each of the (6) servo holders. Flip over the assembly when the (2) decks are together.

Figure 11

13. Using (4) #4 – 1/4” screws, secure only (2) opposite side supports to the lower deck as shown in figure 12. Only (2) side supports are secured at this point to make it easier to remove the top deck to connect the servo wires to the Parallax Servo Controllers later in the construction process.

Figure 12

Page 21: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

21

• The completed assembly

Figure 12b – The Completed Assembly

• Set the completed assembly to the side of your work area.

Page 22: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

22

Chapter #5 - Leg Assembly

14. Apply a small amount of grease to the pem spacer on the back leg as shown in figure 14.

Figure 94 – Grease Application

15. Install (2) ¼” SAE flat washers (flat side towards the back leg) onto the pem spacer and apply a small amount of white grease to the top of the second washer as shown in figure 15.

Figure 15 – Washer Installation and Grease Application

Page 23: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

23

16. Using (2) #4 – 5/16” screws, washers, lock washers and nuts, install the back foot to the servo pivot brace as shown in figure 16. Ensure that the large, pem spacer hole of the servo brace is aligned with the pem spacer hole of the back foot before tightening the #4 screws.

Figure 16

17. Using (1) #6 – 1/2” screw, (2) washers and (1) lock nut, attach the servo pivot brace and foot assembly from figure 16 to the back leg as shown in figure 17 and 17b. Do not tighten the lock nut completely! Tighten the lock nut just enough so the back leg can swing freely with little resistance.

Figure 17

Pem Spacer Hole

#6 – ½” Screw

#6 – Washer

Back Foot

Servo Pivot Brace

Page 24: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

24

Figure 17b

#6 – Lock Nut

#6 – Washer

Page 25: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

25

18. Place (1) HiTec 475 HB servo to the top of the servo pivot brace with the servo spindle oriented toward the bottom of the foot as shown in figure 18.

Figure 18

19. Using (2) #6 – 3/8” screws, lock washers and nuts, install the front foot to the servo as shown in figure 19 and 19b.

Figure 19

#6 – 3/8” Screw

Page 26: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

26

Figure 19b

#6 – Lock Washer #6 – Nut

Page 27: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

27

20. Figure 19c depicts the leg assembly completed to this point.

Figure 19c

21. Using (1) #6 nut, and lock washer, install the rubber foot to the bottom of the foot assembly as shown in figure 20.

Figure 20

#6 – Nut

#6 – Lock Washer

Page 28: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

28

22. Using (2) #4 - ¼” screws, lock washers and nuts, install the round servo arm to the front foot as shown in figure 21. The servo arm should be mounted to the inside of the bend of the front foot.

Figure 21

Page 29: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

29

23. Install the leg assembly to the front leg assembly as shown in figure 22. Before securing the front foot to the front leg assembly with the servo horn screw, hold the front leg in parallel with the back leg and be sure that the foot can rotate freely to the points illustrated in figure 22 and figure 22b.

Figure 22

Figure 22b

Page 30: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

30

24. Using (2) #4 – ¼” screws, lock washers and nuts, connect the front leg to the back leg as shown in figure 23 and 23b.

Figure 23 – The front of the leg

Figure 23b – The back of the leg

• Repeat steps 13 – 21 for the remaining (5) legs in your kit.

Page 31: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

31

• The completed leg assembly

Page 32: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

32

25. Obtain (2) round brass balls from the servo coupler bag. With your thumb, press each brass ball into each of (2) tie rod couplers as shown in figure 24. Secure the brass ball in the tie rod couplers using (1) #2 – 5/16” screw. Note: Insert the #2 screw to the tie rod coupler hole that is slightly larger than the #2 screw first.

Figure 24

26. Partially thread (1) 4/40” threaded rod into (1) end of the tie rod coupler assembly as shown in figure 25.

Figure 25

27. Thread the other tie rod assembly onto the 4/40” threaded rod to complete the assembly as shown in figure 26. Be sure that the heads of the #2 – 5/16” screws are facing in the same direction as shown in figure 26. Repeat steps 25- 27 for the remaining (5) tie rod couplers.

Figure 26

#2 –5/16” Screw

Brass Ball

Tie Rod Couplers

4/40” – Threaded Rod

Page 33: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

33

28. Using (1) #4 – ½” hex screw, brass spacer and lock nut, install the tie rod coupler to the completed leg assembly as shown in figure 27. Note the orientation of the brass spacer and the #2- 5/16” screws as it relates to the leg assembly. The flat end of the brass spacer should be mounted against the aluminum leg assembly. Be sure that the #2 screws are facing towards the outside of the leg for easy access to and adjustment of the #2 – 5/16” screws when the entire leg assembly is completed (figure 27b).

Figure 27

Figure 27b

• Repeat step 28 for the remaining tie rod couplers.

#4 –Lock Nut

#4 –1/2” Hex Screw

Brass Spacer

#2 -5/16” screws facing the outside of the leg

Page 34: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

34

29. Obtain (6) servo arms as shown in figure 28 from the Hi-Tec 645MG box. Using a 1/8” drill bit, drill out the second hole from the top of the servo arms.

Figure 28

30. Place the servo arm on the vertical lift servo of the servo holder and rotate the servo counterclockwise until the servo stops rotating as shown in figure 29. Remove the servo arm and repeat this step for the remaining (5) vertical lift servos in the assembly.

Figure 29

Drill Here

Page 35: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

35

31. Using (1) #4 – ½” black hex screw, brass spacer and lock nut, install the servo arm to the other end of the tie rod coupler as shown in figure 30. Repeat this step for the remaining (5) servo arms in the kit.

Figure 30

Page 36: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

36

32. Using (1) #8 – 1.25” screw (2) washers, (1) lock nut, (1) ½” nylon spacer, (1) ¼” nylon spacer, install the leg assembly to the servo holder assembly as shown in figure 31. Tighten the #8 lock nut to the point of which there is no play in the leg but not too tight in that it would be difficult for the servo to lift the leg assembly.

Figure 31

1 #8 – 1.25” Screw 5 #8 – ¼” Nylon Spacer 2 #8 – Washer 6 Back Leg 3 Front Leg 7 #8 - Washer 4 #8 – 1/2” Nylon Spacer 8 #8 Lock Nut

1

2

3 4

5

6

7

8

Page 37: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

37

33. Using the servo arm screw for the Hi-Tec 475 HB servo, install the servo horn to the vertical

lift servo in the 11:00 o’clock position as shown in figure 32.

Figure 32

• Repeat steps 32 and 33 for the remaining (5) legs in your kit.

34. Place the deck assembly on top of an empty box or a stack of books to make the remaining

(5) leg installations easier.

Page 38: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

38

Chapter #6 – Installing The Parallax BOE, Connecting the Servo Wires to the PSC’s and Battery Configuration

35. Using (4) #4 – ½” screws, ¼” nylon spacers, washers, lock washers, and nuts, install the Parallax BOE (with the Parallax LCD appmod already installed onto the BOE as per the LCD appmod installation instructions) into the slots of the top deck as indicated in figure 33. Connect the PSC controller cable to the X15 slot of the BOE board.

Figure 33 – BOE Installation

PSC Connector

Page 39: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

39

36. Starting at PSC port 0, connect all of the horizontal leg servos to all of the even numbered PSC ports and connect all of the vertical lift servos to the odd numbered PSC ports of the PSC controller configured for ports 0 - 15. (reference figure 35) Use the 6” servo extension wires were necessary to reach the PSC controller.

Note: To make connecting the servo wires easier to the PSC controllers, remove the (4) #4 – ¼” screws from (2) opposite side supports that were installed temporarily in step 11 on page 19. Once removed, lift the top deck off of the pem spacers of the bottom deck and move the top deck slightly to the left or right to gain easier access to the PSC controllers. Also, you can remove (2) opposite side supports to make it easier to place your hands between decks to install the servo wires.

Figure 35

PSC #1 Ports 0, 1

PSC #1 Ports 2, 3

PSC #1 Ports 4 , 5

PSC #1 Ports 6, 7

PSC #1 Ports 8, 9

PSC #1 Ports10, 11

Page 40: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

40

37. Starting with the first leg that was connected to the 1st PSC controller ports 0 and 1, using 12” extension wires and moving in a clockwise direction, connect the foot servos to the 2nd PSC controller starting with port 16. Reference figure 35b.

Figure 35b

PSC #2 Port 16

PSC #2 Port 17

PSC #2 Port 18

PSC #2 Port 19

PSC #2 Port 20

PSC #2 Port 21

Page 41: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

41

38. Using (2) tie wraps, secure each of the (6) foot servo wires to the back leg as shown in figure 36. Ensure that you can rotate the foot freely through it’s entire rotation before securing the tie wrap.

Figure 36

Tie Wrap

Page 42: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

42

39. Using tie wraps, secure the (3) servo wires of each of the (6) legs to the (2) slots of the lower

deck as shown in figure 37. Ensure that the leg can move freely 90 degrees in either direction from straight out before the servo wires are secured with the tie wrap.

Figure 37

40. If the top deck was removed from the bottom deck to secure the servo wires to the PSC

controllers, place the top deck back onto the lower deck ensuring the pem spacers are seated in all (6) of the servo holders pem spacer openings before securing the decks together using (2) #4 – ¼” screws for each of (6) deck braces.

Page 43: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

43

Chapter #8 - Programming Nomad The “Nomad_Walking_ Demo.bsp” serves 2 purposes:

1. To programmatically “home” all leg joints to their proper physical position before the walking sequences are initiated.

2. Allows the user to control the walking sequences of Nomad with either the Parallax LCD

Appmod or through R/C control using a standard aircraft radio and receiver combination.

• Be sure to visit our web site (www.crustcrawler.com) to ensure you have the latest version of this code as well as to obtain any additional code that we have developed for the Nomad HDATS kit.

• Be sure to run the “Nomad_RC_Test.bsp” before using an R/C unit with the

“Nomad_Walking_Demo.bsp” program.

• Ensure that you read and understand the comments in the code below completely before downloading the code and attempting to operate your Nomad HDATS kit.

Pre-Programming Checklist

• Before downloading and running the “Nomad_walking_Demo.bsp program, ensure that you double check the following:

All servo wires are connected to the right ports on the PSC controllers.

None of the servo wires kink or cause interference within the full range of leg

motion

The PC controllers are daisy chained correctly and are connected to the BOE as per the PSC users guide

The PSC controllers have power and they are turned on

You have a separate power supply providing power to the PSC’s and this supply is

NOT sharing power with the BOE.

The BOE has power of it’s own and is turned on

The Parallax LCD App-Mod is properly plugged into the BOE and the brightness knob is adjusted so that characters are visible on the LCD screen. (Note: characters will only appear once the program is downloaded)

Page 44: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

44

“Homing” the Legs

1. Download the Nomad_Walking_Demo.bsp

2. Ensure that after running “Nomad_Walking_Demo.bsp” that the vertical lift servos, servo arms are pointed straight up in the 12:00o-clock position and the foot servos are pointed straight down. Failure to do so will result in Nomad walking incorrectly. Reference figures 38 and 39. If adjustment of the servos is necessary, simply remove the servo horn screw and rotate the servo horn clockwise or counterclockwise as necessary.

3. Once the legs have been properly adjusted, use the LCDAppmod interface to choose Nomads

walking speed and direction. Read the comments section of the code to understand the LCD-Appmod interface controls.

Figure 38

Page 45: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

45

Figure 39

Page 46: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

46

Tuning and Walking Program – “Nomad_Walking_Demo.bsp” '----[Nomad_Walking_Demo.bsp]----------------------------------------- ' {$STAMP BS2p} ' {$PBASIC 2.5} ' ' File....... Nomad_Walking_Demo.bsp ' Purpose.... Nomad RC and/or LCD AppMod control. ' Author..... CustCrawler Inc. (Mike Gebhard) ' E-mail..... [email protected] ' Started.... 10 February 2005 ' Updated.... ' ' Hardware ' (1) Nomad HDATS Robotic Kit ' (1) Parallax Board of Education ' (1) Parallax BS2p Module ' (1) Parallax Servo Controller (PSC) ' (1) Parallax LCD AppMod ' (1) Radio controller Tx/Rx System (optional) ' '------------------------------------------------ 'Getting Started '------------------------------------------------ ' 1. Physically Tune the Nomad ' 2. Run the RC_Test.bs2 program (optional - RC unit sold separatly) ' 3. Run the Nomad Demo program ' '------------------------------------------------ ' First Time Use '------------------------------------------------ ' Anytime the Nomad Demo program is run for the first time, reset, or powered up ' the Nomad will lower and center its leg joints. ' ' Use the LCD AppMod to: ' 1. Select Speed ' 2. Select Direction ' 3. Run selection (button D) ' ' If you are using a radio controller. ' ' 1. Select a speed with using button B on the LCD AppMod ' 2. Power the Transmitter and receiver ' 3. Press button D (run) on the LCD AppMod ' 4. Move the Transmitter stick ' ' Please read the radio control section below ' for receiver to BOE connection instructions. ' '------------------------------------------------ ' Parallax LCD AppMod Control '------------------------------------------------ ' LCD AppMod Buttons ' A ...... Stop/Enter selection mode ' B ...... Select Speed (0-14) ' C ...... Select direction (0-11) ' D ...... Run (enter selection) ' ' BUTTON A ' Press and hold button A until the robot stops. The LCD will the ' show current speed and direction settings. ' ' ---------- ' |spd Dir| ' |0 00 | ' ---------- ' A B C D '

Page 47: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

47

' Button B ' Press button B to change speeds from 0 to 3 ' 0 ...... Fastest (default) ' 1 ...... Fast ' 2 ...... Medium ' 3 ...... Slow ' ' Button C ' Button C controls direction from 0 to 11 where 0 is 12 O’clock. If you followed ' the assembly guide 12 O’clock is the leg connected to PSC 1 channels 0, 1, and 16. ' ' Button D ' Press button D to accept/run the selected speed and direction settings. ' ' LCD AppMod display ' ' The LCD displays the current speed and direction settings in selection mode. ' ---------- ' |spd Dir| ' |0 00 | ' ---------- ' ' The LCD shows the current gait setting on line 2 and "Walking" on line 1 while ' the robot is walking. ' ---------- ' |LCD Mode| ' |0 00 | ' ---------- ' ' The LCD shows the current gait setting on line 2 and "RC Mode" on line 1 while ' the robot is walking under RC control. ' ---------- ' |RC Mode | ' |0 00 | ' ---------- '------------------------------------------------ ' Radio Control '------------------------------------------------ ' The Nomad is RC ready. Simply Plug your RC receiver into the BS2p and ' away you go. The instructions below are for connecting a ' Tower Hobbies 6 channel radio control system to the BOE. Your ' receiver channels might differ. Please refer to your receiver's ' instruction manual. ' ' We suggest running the Nomad_RC_Test.bs2 program before running the ' Nomad in radio control mode. The Nomad_RC_Test.bs2 program verifies ' that the receiver is connected correctly to the BOE. ' http://www.crustcrawler.com/products/nomad.php?id=3 ' CONNECTIONS ' You will need 4 wires to connect the receiver ' to the BOE's X5 servo port (see your BOE Rev B documentation). ' Soldering 8 High Density Female RS232 Sockets to the ends ' of four 20 gage wires works great. ' ' Connect the receiver's: ' 1. Throttle signal line (ch3)to X5 Pin 12 (outside pin) on the BOE. ' 2. Throttle ground (ch3)to X5 Pin 12 (inside pin) on the BOE ' 3. Rudder signal line (ch4) to X5 Pin 13 (outside pin) ' 4. Rudder ground (ch4) to X5 Pin 13 (inside pin) on the BOE ' '========================================================================= ' BOE X5 and X4 servo ports '========================================================================= ' X5 X4 ' |--------|--------| |------| ' Ground | c c | x x | | 5V |---- ' N/C | x x | x x | | Reg |---- ' Signal | c c | x x | | |---- ' |--------|--------| |------| ' 12 13 14 15

Page 48: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

48

' ' The Demo program is designed to detect the presence of an Rx ' on Pins 14 and 15. Once detected simply move the Tx stick and ' the Nomad should respond. If not check your connections. '---- [Programming Notes] ------------------------------------------------ ' ' '-----[ PSC I/O Definitions ]--------------------------------------------- PSC PIN 15 ' PSC module baud CON 1021 ' 2400 baud '-----[ RC I/O Definitions ]---------------------------------------------- StickXPin PIN 13 ' Left/Right(X) joystick Rx Ch4 StickYPin PIN 12 ' Up/Down(Y) joystick Rx Ch3 EEPROM_Block CON 108 ' EEPROM Block size ' -----[ LCD I/O Definitions ]-------------------------------------------- E PIN 1 ' LCD Enable (1 = enabled) RW PIN 2 ' Read/Write RS PIN 3 ' Reg Select (1 = char) LcdDirs VAR DIRB ' dirs for I/O redirection LcdBusOut VAR OUTB LcdBusIn VAR INB LcdCls CON $01 ' clear the LCD LcdHome CON $02 ' move cursor home LcdCrsrL CON $10 ' move cursor left LcdCrsrR CON $14 ' move cursor right LcdDispL CON $18 ' shift chars left LcdDispR CON $1C ' shift chars right LcdDDRam CON $80 ' Display Data RAM control LcdCGRam CON $40 ' Character Generator RAM LcdLine1 CON $80 ' DDRAM address of line 1 LcdLine2 CON $C0 ' DDRAM address of line 2 LcdScrollTm CON 250 ' LCD scroll timing (ms) '-----[ Leg Constants ]--------------------------------------------------- Raise CON 600 Lower CON 300 Center CON 750 '-----[ Speed settings ] ------------------------------------------------- TopSpeed CON $A ' Starting Ramp speed IncrSpeed CON TopSpeed-$2 ' Leg Lift speed speeds CON $10 ' Number of speeds settings '-----[ Walking Variables ]----------------------------------------------- stickXPos VAR Word ' Left/Right (X) joystick posn stickYPos VAR Word ' Up/Down(Y) joystick position ptrEEPROM VAR Word ' Gait select char VAR Byte ' character sent to LCD scan VAR Byte ' loop counter servoPosition VAR Byte(6) ' Servo Position servoAddr VAR Byte ' Servo addresses ramp VAR Byte ' Ramp used in SEROUT pointer VAR Byte ' pointer to scatchpad gaitCode VAR Byte temp VAR Byte direction VAR gaitCode.LOWNIB speed VAR gaitCode.HIGHNIB counter VAR Nib ' Count 0 to 5 idx VAR Nib ' loop counter buttons VAR Nib btnA VAR buttons.BIT0 ' left-most button btnB VAR buttons.BIT1 btnC VAR buttons.BIT2 btnD VAR buttons.BIT3 ' right-most '---- [EEPROM Data] ------------------------------------------------------

Page 49: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

49

Msg1 DATA "Crust",0 Msg2 DATA " Crawler",0 Msg3 DATA "Robotics",0 Msg4 DATA "Presents" Msg5 DATA "The",0 Msg6 DATA " NOMAD ",0 Nav DATA "Spd Dir",0 Msg7 DATA "LCD Mode",0 Msg8 DATA "RC Mode ",0 '---- [EEPROM Data] ------------------------------------------------------ D1 DATA Word Center, Word Lower, Word Center, ' Start Stroke A Word Center+50, Word Lower, Word Center-50, Word Center-70, Word Lower, Word Center-50, Word Center, Word Raise, Word Center-80, ' Mid Reset B Word Center-70, Word Raise, Word Center+10, Word Center+50, Word Raise, Word Center+10, Word Center, Word Lower, Word Center-50, ' End Stroke A Word Center-70, Word Lower, Word Center+10, Word Center+50, Word Lower, Word Center+10, Word Center, Word Lower, Word Center-50, ' Start Stroke B Word Center-70, Word Lower, Word Center+10, Word Center+50, Word Lower, Word Center+10, Word Center, Word Raise, Word Center, ' Mid Reset A Word Center+50, Word Raise, Word Center+50, Word Center-70, Word Raise, Word Center-50, Word Center, Word Lower, Word Center, ' End Stroke B Word Center, Word Lower, Word Center-20, Word Center, Word Lower, Word Center-20, $FF D2 DATA Word Center, Word Lower, Word Center, ' Start Stroke A Word Center+50, Word Lower, Word Center-10, Word Center, Word Lower, Word Center-10, Word Center-50, Word Raise, Word Center, ' Mid Reset B Word Center-50, Word Raise, Word Center, Word Center, Word Raise, Word Center-10, Word Center-50, Word Lower, Word Center-50, ' End Stroke A Word Center+25, Word Lower, Word Center+40, Word Center+50, Word Lower, Word Center+40, Word Center-50, Word Lower, Word Center, ' Start Stroke B Word Center-50, Word Lower, Word Center+50, Word Center, Word Lower, Word Center-10, Word Center, Word Raise, Word Center, ' Mid Reset A Word Center+50, Word Raise, Word Center-10, Word Center, Word Raise, Word Center-10, Word Center, Word Lower, Word Center+50, ' End Stroke B Word Center, Word Lower, Word Center, Word Center+50, Word Lower, Word Center+40, $FF ' Horizontal Vertical Ankle Tune DATA Word 750, Word 300, Word 750, Word 750, Word 300, Word 750, Word 750, Word 300, Word 750, Word 750, Word 300, Word 750, Word 750, Word 300, Word 750, Word 750, Word 300, Word 750, $FF PUT $0, $0,$4,$8,$6,$A,$2 ' Horizontal leg addresses PUT $6, $2,$6,$A,$8,$0,$4 ' in scratchpad ram PUT $C, $4,$8,$0,$A,$2,$6 PUT $12,$6,$A,$2,$0,$4,$8 PUT $18,$8,$0,$4,$2,$6,$A PUT $1E,$A,$2,$6,$4,$8,$0

Page 50: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

50

Initialize: GOSUB Initialize_LCD ' Init LCD GOSUB CrustCrawler_Logo ' Write CC Logo char = LcdCls ' Clear Screen GOSUB Write_LCD_Command GOSUB LCD_Write_Nav ' Write navigation string gaitCode = $80 ' Init gaitCode counter = 0 ' Init counter GOSUB LCD_Write_Speed ' Write Speed GOSUB LCD_Write_Direction ' Write Direction ramp = $C ' Init ramp ptrEEPROM = Tune ' Center and lower legs GOTO Walking_Engine ' Position legs Parse_GaitCode: ' Get speed and direction counter = 0 ' from gaitCode IF (direction//2) = 0 THEN ptrEEPROM = D1 ELSE ptrEEPROM = D2 ENDIF pointer = (direction/2)*6 ' pointer to scratch pad ram ramp = speed + TopSpeed ' Set ramp speed 'DEBUG HEX ?gaitCode, CR, HEX ?pointer, CR, HEX ?ramp Walking_Engine: READ ptrEEPROM, servoPosition(0), servoPosition(1), servoPosition(2), servoPosition(3), servoPosition(4), servoPosition(5) DO WHILE (servoPosition(0) <> $FF) ' loop while not $FF GET counter+pointer, servoAddr ' get horizontal address GOSUB Write_PSC ' write to psc counter = (counter+1)//6 ' incr counter LOOP '-----[ Decisions ]------------------------------------------------------- Check_First_Run: ' First run IF (ptrEEPROM - 36) = Tune THEN GOTO Select_Speed_Direction ENDIF Check_ButtonA_Press: ' Check for button a press GOSUB LCD_Get_Buttons IF btnA = 1 THEN GOTO Select_Speed_Direction ENDIF Check_RC_Power: ' Check for Rx signal GOSUB Get_Stick IF stickXPos = 0 THEN 'GOTO Check_RC_Power ' Un-comment for RC only mode GOSUB LCD_Write_Walking ' Write "Walking" on LCD GOTO Parse_GaitCode ELSE GOTO Get_gaitCode_LowNib ' Convert Rx data to gaitCode ENDIF END '------------------------------------------------------------------------- Write_PSC: SEROUT PSC,Baud,["!SC",servoAddr, ramp, servoPosition(0), servoPosition(1), CR] ramp = ramp - TopSpeed servoAddr = (servoAddr+1) SEROUT PSC,Baud,["!SC",servoAddr, ramp, servoPosition(2), servoPosition(3), CR] ramp = ramp + TopSpeed servoAddr = ((servoAddr-1)/2)+16

Page 51: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

51

SEROUT PSC,Baud,["!SC",servoAddr, ramp, servoPosition(4), servoPosition(5), CR] ptrEEPROM = ptrEEPROM + 6 READ ptrEEPROM, servoPosition(0), servoPosition(1), servoPosition(2), servoPosition(3), servoPosition(4), servoPosition(5) RETURN '-----[ LCD Subroutines ]------------------------------------------------- Select_Speed_Direction: ' Select speed and direction GOSUB LCD_Write_Nav DO WHILE btnD = 0 ' Do while D not pressed GOSUB LCD_Get_Buttons IF btnB = 1 THEN ' Speed setting speed = (speed+1)//speeds GOSUB LCD_Write_Speed ' Write speed to LCD ENDIF IF btnC = 1 THEN ' Direction setting direction = (direction+1)//12 GOSUB LCD_Write_Direction ' Write direction to LCD ENDIF LOOP GOSUB LCD_Write_Walking 'Write "Walking" GOTO Parse_GaitCode LCD_Get_Buttons: LcdDirs = %0000 ' make LCD bus inputs buttons = %1111 ' assume all pressed FOR scan = 1 TO 10 buttons = buttons & LcdBusIn ' make sure button held PAUSE 7 ' debounce 10 x 5 ms NEXT LcdDirs = %1111 ' return bus to outputs RETURN LCD_Put_String: DO READ ptrEEPROM, char ' Read data at EEPROM address IF (char = 0) THEN EXIT ' 0 = End of EEPROM String GOSUB Write_LCD_Char ' Write character to LCD ptrEEPROM = ptrEEPROM + 1 ' Increment EEPROM pointer LOOP RETURN Write_LCD_Command: ' Low RS = LCD directive like LCDCMD E, char RETURN Write_LCD_Char: ' HIGH RS = Write a character LCDOUT E, 0, [char] RETURN LCD_Write_Speed: char = LcdLine2+0 ' Write speed to LCD GOSUB Write_LCD_Command temp = speed/10 ' Convert to ASCII char = temp+48 GOSUB Write_LCD_Char char = LcdLine2+1 GOSUB Write_LCD_Command temp = speed//10 char = temp+48 GOSUB Write_LCD_Char RETURN LCD_Write_Direction: ' Write Direction to LCD char = LcdLine2+5 GOSUB Write_LCD_Command temp = direction/10 ' Convert to ASCII

Page 52: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

52

char = temp+48 GOSUB Write_LCD_Char char = LcdLine2+6 GOSUB Write_LCD_Command temp = direction//10 char = temp+48 GOSUB Write_LCD_Char RETURN LCD_Write_Nav: char = LcdLine1+0 GOSUB Write_LCD_Command ptrEEPROM = Nav ' Point to Nav GOSUB LCD_Put_String ' Write string RETURN LCD_Write_Walking: char = LcdLine1+0 GOSUB Write_LCD_Command ptrEEPROM = Msg7 ' Point to message 7 GOSUB LCD_Put_String ' Write string RETURN LCD_Write_RC_Mode: char = LcdLine1+0 GOSUB Write_LCD_Command ptrEEPROM = Msg8 ' Point to message 8 GOSUB LCD_Put_String ' Write string RETURN CrustCrawler_Logo: ' Dispaly CC logo ptrEEPROM = Msg1 ' Point to message 1 GOSUB LCD_Put_String ' Write string char = LcdLine2+0 ' Go to Line 2 GOSUB Write_LCD_Command ' Write command ptrEEPROM = Msg2 ' Point to message 2 GOSUB LCD_Put_String ' Write string PAUSE 2000 ' wait 2 secs 'char = LcdCls ' Clear Screen 'GOSUB Write_LCD_Command 'ptrEEPROM = Msg3 ' Point to message 3 'GOSUB LCD_Put_String ' Write string 'char = LcdLine2+0 ' Go to Line 2 'GOSUB Write_LCD_Command ' Write command 'ptrEEPROM = Msg4 ' Point to message 4 'GOSUB LCD_Put_String ' Write string 'PAUSE 2000 char = LcdCls GOSUB Write_LCD_Command ptrEEPROM = Msg5 ' Point to message 5 GOSUB LCD_Put_String ' Write string char = LcdLine2+0 ' Go to Line 2 GOSUB Write_LCD_Command ' Write command ptrEEPROM = Msg6 ' Point to message 6 GOSUB LCD_Put_String ' Write string PAUSE 2000 RETURN Initialize_LCD: LCDCMD E, %00110000 : PAUSE 5 ' 8-bit mode LCDCMD E, %00110000 : PAUSE 0 LCDCMD E, %00110000 : PAUSE 0 LCDCMD E, %00100000 : PAUSE 0 ' 4-bit mode LCDCMD E, %00101000 : PAUSE 0 ' 2-line mode

Page 53: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

53

LCDCMD E, %00001100 : PAUSE 0 ' no crsr, no blink LCDCMD E, %00000110 ' inc crsr, no disp shift char = LcdCls ' Clear screen GOSUB Write_LCD_Command RETURN '-----[ RC ]-------------------------------------------------------------- Get_gaitCode_LowNib: GOSUB LCD_Write_RC_Mode ' Write "RC Mode" to LCD GOSUB Get_Stick ' Convert stick positions to SELECT stickYpos ' gaitCode CASE < 1700 SELECT stickXPos CASE > 2200 gaitCode.LOWNIB = $1 CASE < 1800 gaitCode.LOWNIB = $B CASE ELSE gaitCode.LOWNIB = $0 ENDSELECT CASE < 1950 SELECT stickXPos CASE > 2200 gaitCode.LOWNIB = $2 CASE < 1800 gaitCode.LOWNIB = $A CASE ELSE gaitCode.LOWNIB = $F ENDSELECT CASE < 2200 SELECT stickXPos CASE > 2200 gaitCode.LOWNIB = $3 CASE < 1800 gaitCode.LOWNIB = $9 CASE ELSE gaitCode.LOWNIB = $F ENDSELECT CASE < 2450 SELECT stickXPos CASE > 2200 gaitCode.LOWNIB = $4 CASE < 1800 gaitCode.LOWNIB = $8 CASE ELSE gaitCode.LOWNIB = $F ENDSELECT CASE < 2700 SELECT stickXPos CASE > 2450 gaitCode.LOWNIB = $5 CASE < 1950 gaitCode.LOWNIB = $7 CASE ELSE gaitCode.LOWNIB = $6 ENDSELECT CASE ELSE gaitCode.LOWNIB = $F ENDSELECT IF gaitCode.LOWNIB = $F THEN ' Neutral GOTO Get_gaitCode_LowNib ENDIF GOSUB LCD_Write_Direction ' Write direction to LCD GOTO Parse_GaitCode Get_Stick: PULSIN StickXPin, 1, stickXPos ' Read joystick positions PULSIN StickYPin, 1, stickYPos ' from transmitter P13, P12 RETURN

Page 54: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

54

R/C Test Program – Nomad_RC_Test.bsp The “Nomad_RC_Test.bsp” is useful to ensure that you have all of the proper connections of your R/C equipment to the Parallax Board of Education (BOE) installed on the Nomad HDATS kit. '----[Nomad_RC_Test.bsp]----------------------------------------- ' {$STAMP BS2p} ' {$PBASIC 2.5} ' ' File....... Nomad_RC_Test.bsp ' Purpose.... Test Radio Controller connections ' Author..... CrustCrawler Inc. (Mike Gebhard) ' E-mail..... [email protected] ' Started.... 10 February 2005 ' Updated.... ' ' Hardware: ' (1) Parallax Basic Stamp P Module ' (1) Parallax BOE ' (1) Tower Hobbies 6 channel FM Radio Control System or equivalent. ' ' Use this code to troubleshoot connecting a Radio Control unit ' to a Parallax BOE/Basic Stamp. It accepts readings from a radio ' control receiver and converts the reading to a byte value (gaitCode). ' This program also detects if the transmitter is turn on or off ' and is designed to be used with all 3DOF walking code. ' '========================================================================= ' Getting Started '========================================================================= ' CONNECTIONS ' You will need 4 wires to connect the receiver ' to the BOE's X5 servo port (see your BOE Rev B documentation). ' Soldering 8 High Density Female RS232 Sockets to the ends ' of four 20 gage wires works great. ' ' Connect the receiver's: ' 1. Throttle signal line (ch3)to X5 Pin 12 (outside pin) on the BOE. ' 2. Throttle ground (ch3)to X5 Pin 12 (inside pin) on the BOE ' 3. Rudder signal line (ch4) to X5 Pin 13 (outside pin) ' 4. Rudder ground (ch4) to X5 Pin 13 (inside pin) on the BOE ' '========================================================================= ' BOE X5 and X4 servo ports '========================================================================= ' X5 X4 ' |--------|--------| |------| ' Ground | c c | x x | | 5V |---- ' N/C | x x | x x | | Reg |---- ' Signal | c c | x x | | |---- ' |--------|--------| |------| ' 12 13 14 15 ' '========================================================================= ' Program Operation Overview '========================================================================= ' The Get_Stick routine uses the PULSIN command ' to measures the pulse width on pin 12(Y)StickYPin ' and pin 13(X)StickXPin. This data is stored in ' the stickYPos and stickXPos variables respectively. ' ' StickXPos Values ' Left Right ' 1465 --> 2610 '

Page 55: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

55

' StickYPos Values ' Top 1580 ' | ' | ' Down 2525 ' ' StickXPos and StickXPos variables are converted to a gaitCode. ' The results are displayed on the DEBUG screen where a gaitCode of ' 0 is 12 O'clock. A gaitCode of F is neutral or stop. ' '========================================================================= ' Debug Output vs. Stick Position '========================================================================= ' ' |-----|-----|-----|-----|-----| ' | B | 0 | 0 | 0 | 1 | ' |-----|-----|-----|-----|-----| ' | A | F | F | F | 2 | ' |-----|-----|-----|-----|-----| ' | 9 | F | F | F | 3 | ' |-----|-----|-----|-----|-----| ' | 8 | F | F | F | 4 | ' |-----|-----|-----|-----|-----| ' | 7 | 6 | 6 | 6 | 5 | ' |-----|-----|-----|-----|-----| '------------------------------------------------------------------------- ' -----[ I/O Definitions ]------------------------------------------------ StickXPin PIN 13 ' Left/Right(X) joystick Rx Ch4 StickYPin PIN 12 ' Up/Down(Y) joystick Rx Ch3 '---- [ Variables ] ------------------------------------------------------ stickXPos VAR Word ' Left/Right (X) joystick posn stickYPos VAR Word ' Up/Down(Y) joystick position gaitCode VAR Byte ' Mode selected displayCode VAR Bit DEBUG "==== RC Test ====",CR '---- [Read stick] ------------------------------------------------------- Get_Stick: PULSIN StickXPin, 1, stickXPos ' Read joystick positions PULSIN StickYPin, 1, stickYPos ' from transmitter P13, P12 '---- [Troubleshoot] ----------------------------------------------------- ' Un-comment the lines below to display ' raw PULSIN values on pins 12 and 13 'DEBUG CLS, "Raw PULSIN values", CR, ?stickYPos, ?stickXPos 'PAUSE 1000 'GOTO Get_Stick '------------------------------------------------------------------------- gaitCode = $00 RC_Signal_Check: ' Check for signal IF stickXPos = 0 THEN DEBUG CRSRXY, 0, 1, "RC Off ",CR stickYPos = 0 displayCode = 0 ELSE DEBUG CRSRXY, 0, 1, "RC On ",CR displayCode = 1 ENDIF Get_gaitCode_LowNib: SELECT stickYpos ' Convert to gaitCode CASE < 1700 SELECT stickXPos CASE > 2200

Page 56: NomadHDATS Construction Guide - CrustCrawlerChapter #4: Assembling the Lower Deck 8. Using (8) #4 – ½” screws, 1/4” nylon spacers, washers, lock washers and nuts, install the

56

gaitCode.LOWNIB = $1 CASE < 1800 gaitCode.LOWNIB = $B CASE ELSE gaitCode.LOWNIB = $0 ENDSELECT CASE < 1950 SELECT stickXPos CASE > 2200 gaitCode.LOWNIB = $2 CASE < 1800 gaitCode.LOWNIB = $A CASE ELSE gaitCode.LOWNIB = $F ENDSELECT CASE < 2200 SELECT stickXPos CASE > 2200 gaitCode.LOWNIB = $3 CASE < 1800 gaitCode.LOWNIB = $9 CASE ELSE gaitCode.LOWNIB = $F ENDSELECT CASE < 2450 SELECT stickXPos CASE > 2200 gaitCode.LOWNIB = $4 CASE < 1800 gaitCode.LOWNIB = $8 CASE ELSE gaitCode.LOWNIB = $F ENDSELECT CASE < 2700 SELECT stickXPos CASE > 2450 gaitCode.LOWNIB = $5 CASE < 1950 gaitCode.LOWNIB = $7 CASE ELSE gaitCode.LOWNIB = $6 ENDSELECT CASE ELSE gaitCode.LOWNIB = $F ENDSELECT Display_gaitCode: ' Display results IF displayCode = 0 THEN DEBUG CRSRXY, 0, 2, CLREOL, "**" ELSE DEBUG CRSRXY, 0, 2, CLREOL, HEX gaitCode ENDIF GOTO Get_Stick ' loop forever