Artbots The Testing Begins

The ArtBots begins to take shape. I started the project by tackling the bot that will be the most complex, the hexapod.

I made a the basic form of the bot using some wood screws and tape to begin testing the movement, software and circuit.

Servo Motor Test from Oscar G. Torres on Vimeo.

I was originally going to attempt to use an Arduino Micro controller to do all the controlling of the servos (video above.) But I slowly realized that to control the timing of all the servos at different time intervals will be a big pain in the butt since the “delay()” function messes with the Arduino code enough to get really buggy.

To hopefully save a headache I bought some servo controllers made by Pololu And so far with the help from Xiaoyang (Alex) Feng and the info posted online about the controller, I got the results I was looking for.

The Pololu Code I used to make the servos move can be found on the Pololu forums The one things that they did not include which is a little confusing, is how to set up the servo controllers if you plan to daisy chain them to control more than 8 servo motors.

To start you should set up your Arduino (above) and a breadboard with the Pololu servo controller (below.)

A couple of things to note:
1. Two different power sources are needed for the servo controllers. One for the controller’s micro controller and the other to power the servo motors. Both power sources should have a common ground.
2. When you set the controller’s number setting, you need to do one at a time.

This is the code I used to program my second controller to know its servos are numbered 8-15 and not 0-7 as they are programmed by default.

The parameter that sets the servo numbers is the fourth “soft.Serial” line of code “softSerial.print(0×01,BYTE);” This variable can be either 0×00 (hexadecimal) to set the controller to use number 0-7 for the servos, 0×01 to set the controller to use number 8-15 for the servos, 0×02 for numbers 16-23, etc…

Once you upload this code you must wait for the servo controller to get reprogrammed. You will know the servo controller’s settings where changed by the blinky lights on the controller.

Pololu Servo Controller Settings from Oscar G. Torres on Vimeo.

Once the code has been uploaded and the settings where changes, you MUST delete or comment out, the three lines that set up the servo numbers since you only need to do that step once.

the lines you need to delete or comment out are the following:

Once you comment out the code above, re-load the code onto the Arduino.
When the code is finished uploading nothing will happen, because you need to re-start the Pololu servo controller for the settings to kick in. You can simply unplug the Arduino and the plug it back in to refresh everything. The servos should now move a few degrees back and fourth. Don’t forget to power the servos separately and to have a common ground.

Servo Controller Test from Oscar G. Torres on Vimeo.

I daisy chained three servo controllers together so that I can control 20 servo motors. This is my first test, one serve per servo controller. So far so good.

Testing Servo Controller with Three Servos from Oscar G. Torres on Vimeo.

One Response to “Artbots The Testing Begins”

  1. [...] servos will be needed for my artBot. [...]