Our resident expert on all things
robotic is merely an email away.
roboto@servomagazine.com
Tap into the sum of allhumanknowledge and get your questions answered here!
From software algorithms to material selection, Mr. Roboto strives to meet you
where you are — and what more would you expect from a complex service droid?
by
Dennis Clark
I’ve received a ton of questions in the last month or so
and I want to try an experiment to get you folks going on
your projects. Since there is only so much time in the day,
I’m going to try to find some of your answers with “off the
shelf” solutions if at all possible. We’ll see how this works,
but let me know if you prefer more DIY solutions for the
future. With that in mind, let’s get started!
Q. I am looking for a simple circuit to drive a hobby servo and want to be able to set endpoints on either side of center for the servo to
stop at.
I am going to use this to move a lens barrel (focus) on
a TV camera lens, so it will have a gear on it. The barrel has
mechanical stops so I need to be able to set endpoints with
this servo. Thanks for your help as I have searched and
searched, and found stuff thats close, but no cigar.
— Erik, Waterbury, CT
A. Erik, I’ve worked on this for a bit and it all depends on what you want to spend. I’m sensing that you’d like something that you
either can build easily or can
assemble from a product that you
can buy. I have not found
anything that you can use that
will allow you to set endpoints
using a simple analog pot and
another pot for the servo
position. Creating your own
firmware solution that allows you
to read three pots can be done,
but getting the resolution that I
think you will need will be
challenging.
There are two parts of this
that could use solving: one is how
to control the hobby servo; and
the other is how to move the
gear on the lens. Let’s look at the servo controller first. To
get your own DIY project going, I would suggest that you
get a serial servo controller — one that will allow you to set
endpoints and control the movement speed of your servo.
It used to be that such controllers would be very spendy
indeed — not so any more! Take a look at the Pololu Serial
Servo Controller ROB-08897 at www.sparkfun.com. This
little guy (see Figure 1) is inexpensive (under $18 US) and
can be interfaced using a simple serial protocol. But what
will it talk to? How about the easy to use and easy to buy
(read inexpensive) Arduino? SparkFun sells a variety of
Arduino boards, but you can shop around and find your
own favorite form-factor and price range. Arduino’s are
often found for less than $20. A SparkFun Arduino board is
shown in Figure 2. The SparkFun website has some
comments attached to this product that points you to
source code examples for programming this board. You can
work from these examples and add potentiometers to the
board to set your position and set hard stop limits for your
servo. Program your Arduino, wire your pots to the board,
and mount the whole thing into a project box.
Figure 1. Serial servo board.
Figure 2. Example Arduino board.
SERVO 06.2010 13