Now that you have a legged platform and a servo motor controller, you are ready to make your project walk! Before you begin, you'll need some background on servo motors. Servo motors are somewhat similar to DC motors. However, there is an important difference: while DC motors are generally designed to move in a continuous way, rotating 360 degrees at a given speed, servo motors are generally designed to move at angles within a limited set. In other words, in the DC motor world, you generally want your motors to spin at a continuous rotation speed that you control. In the servo world, you want to control the movement of your motor to a specific position. For more information on how servos work, visit http://www.seattlerobotics.org/guide/servos.html or http://www.societyofrobots.com/actuators_servos.shtml.
To make your project walk, you first need to connect the servo motor controller to the servos. There are two connections you need to make: the first is to the servo motors and the second is to the battery holder. In this section, you'll connect your servo controller to your PC or Linux machine to check to see whether or not everything is working. The steps for that are as follows:
The following is an image of the back of the controller; it will show you where to connect your servos:
See the following image indicating how to connect servos to the controller:
Now you can connect the motor controller to your PC or Linux machine to see whether or not you can talk to it. Once the hardware is connected, you can use some of the software provided by Polulu to control the servos. It is easiest to do this using your personal computer or Linux machine. The steps to do so are as follows:
Let's now talk to the motor controller by downloading the Linux code from Pololu at http://www.pololu.com/docs/0J40/3.b. Perhaps the best way to do this is by logging on to Raspberry Pi using vncserver and opening a VNC Viewer window on your PC. To do this, log in to your Raspberry Pi using PuTTY and then type vncserver
at the prompt to make sure vncserver is running. Then, perform the following steps:
maestro_linux_100507.tar.gz
to the Download
directory. You can also use wget to get this software by typing wget
http://www.pololu.com/file/download/maestro-linux-100507.tar.gz?file_id=0J315 in a terminal window.Download
directory, move it to your home directory by typing mv maestro_linux_100507.tar.gz ..
and then you can go back to your home directory.tar –xzfv maestro_linux_011507.tar.gz
. This will create a directory called maestro_linux
. Go to that directory by typing cd maestro_linux
and then type ls
. You should see the output as shown in the following screenshot:The document README.txt
will give you explicit instructions on how to install the software. Unfortunately, you can't run MaestroControlCenter on your Raspberry Pi. Our version of windowing doesn't support the graphics, but you can control your servos using the UscCmd command-line application. First, type ./UscCmd --list
and you should see the following screenshot:
The unit sees your servo controller. If you just type ./UscCmd
, you can see all the commands you could send to your controller. When you run this command, you can see the result as shown in the following screenshot:
Notice that you can send a servo a specific target angle, although if the target angle is not within range, it makes it a bit difficult to know where you are sending your servo. Try typing ./UscCmd --servo 0, 10
. The servo will most likely move to its full angle position. Type ./UscCmd – servo 0, 0
and it will stop the servo from trying to move. In the next section, you'll write some software that will translate your angles to the electronic signals that will move the servos.
If you haven't run the Maestro Controller tool and set the Serial Settings setting to USB Chained, your motor controller may not respond.
3.145.167.176