nxtprograms.com

Fun Projects for your LEGO® MINDSTORMS® NXT!

Home     Projects     Help     Contacts

Claw Car with Game Controller
Building: Expert
Program: Expert

Building Instructions

 

Note: This is an expert-level project.  If you are new to building with the NXT kit, or new to the nxtprograms.com web site, you might want to try some of the easier projects first.

 


1-23

Start by building the Car with Game Controller project (using the Castor Bot).  Click the picture for building instructions.

Building Instructions
 


24

This project needs the NXT brick pointing the opposite way from the Castor Bot project, so in this step you need to remove the NXT brick, turn it around, then re-attach it.  To do this:
  1. Remove the two motor wires, and detach the two sensor wires from the NXT brick.

 
  1. Carefully remove the NXT brick from the chassis of the Castor Bot.  It is attached by two straight white beams and two angled gray beams on the sides, and four pegs on the bottom.  You can either remove the side beams, or carefully pop them out of the NXT brick and bend them slightly outwards to get the NXT out.

  2. Make sure that the all the black pegs end up on the beams of the chassis and none on the NXT brick.  If they stick to the NXT, take them out and put them back on the chassis beams.

 
  1. Re-attach the NXT brick in the opposite direction.  Get the four bottom pegs plugged in first, then attach the four side beams.

  2. Leave the wires unattached for now.


25


26


27

Note: When attaching the second claw to the motor, you will need to rotate the small gray axle slightly until it lines up with the cross hole on the other claw.


28


29


30


31

Important: Make sure both sides of the claw are open all the way before putting the gears on.  This will ensure that the claw will open and close symmetrically.


32

Important: Make sure both sides of the claw are still open all the way before putting on the L-shaped beam.


33


34

Attach the claw to the bottom of the robot as shown below.  There are five black pegs that need to go in.

This is what it should look like from the top when the claw is properly attached.


35


36

Re-attach the two motor wires.  Looking at the NXT brick right-side-up, the left motor should attach to port B on the NXT, and the right wire should attach to port C on the NXT.  You can route the wires under the chassis side beam to keep them out of the way, as shown below.


37

Use the shortest wire to attach the claw motor to port A on the NXT brick.  You can route the wire under the round chassis cross support to keep it off the ground, as shown below.


38

Reattach the two controller wires to the NXT brick, making sure that the light sensor wire goes to port 3 on the NXT and the the touch sensor wire goes to port 4 on the NXT.


Claw Car with Game Controller Programming

Use the program Claw Control for the Claw Car with Game Controller.  This program is based on the Game_Control program that is used for the Car with Game Controller project and then adds a way to open and close the claw using the touch sensor.  The controller must be calibrated before it can be used, so the program starts with a calibration sequence.  See the instructions below for details.

 

Using the Controller for the Claw Car

The remote control for this project is based on the controller used for the Car with Game Controller project.  The control must be calibrated before you can drive with it.  See the instructions for Using the Game Controller to learn how to calibrate the control and drive the robot using it.

The Claw Control program for this project adds a way to open and close the claw using the touch sensor on the control.  But the touch sensor is also used to tell the robot to drive forward, so a little trick is needed to tell the difference between the two:

  • When the touch sensor button is pressed and held down, the robot will drive forward (and the left thumb plate will steer the robot left and right while it is driving).

  • When the touch sensor is pressed briefly and then quickly released ("Clicked"), the claw will open if it is closed or close if it is open.

Because of this trick, there is a slight delay before the robot will drive forward when you press the touch sensor, while the program is waiting to see if you release the button soon enough or not.  This same trick is often used in the graphical user interface of desktop computer programs to tell the difference between a "click" and a "drag" of the mouse.

 

Challenges
  • Practice driving and using the claw with the remote control, then see if you can drive up to a plastic NXT ball, grab it, take it somewhere else, and then let it go.  There is no way to back up with the Claw Control program, so you can just pull back on the controller wires when you need to back up.

  • The claw will grab and hold lots of other things besides balls.  See what other kinds of things you can grab, hold, and drive with.

  • For an advanced programming challenge, see if you can understand enough of the Claw Control program to modify it to control something else that you build.  See the Challenges section at the end of the Car with Game Controller Project for hints on how to get started, because the Claw Control program is based on the Game_Control program.  In addition to the six "BC" Move blocks for the driving, the Claw Control program adds three "A" Move blocks to open and close the claw (one is just to force it open at the beginning of the program). 

Get nxtprograms.com on CD!
Click here for info

Home     Projects     Help     Contacts

 

Copyright © 2007-2011 by Dave Parker.  All rights reserved. 
All project designs, images, and programs are protected by copyright.  Please see the usage policy.