PHOTO 1. This linear actuator is a superior alternative to
a hobby servo and a push wire for most robotic linear
Dennis Ritchie was rolling out the C programming language at about the same time I was
graduating from high school. My very first C encounter occurred in the mid 1980s by way of a 5150
IBM PC. A few years later, the first serious PIC C project I embarked upon was supported by the CCS
C compiler. The CCS C compiler is totally oriented towards the PIC microcontroller. A multitude of
PIC-friendly built-in functions makes life easy for the PIC C programmer as canned library routines can
be called at will to perform tasks related to RS-232, I2C, and GPIO (General Purpose Input Output),
just to name a few. Although the CCS C compiler has lots of code in a can, that doesn’t mean you
can’t use it to reach out and take control of your program and the resources provided by your target
PIC. You can still write your own functions that get down to the PIC register and bit level with the
CCS C compiler. If the need arises, the CCS compiler will also allow you to mix in a bit of assembler
with your C.
Driving a Firgelli L12 Linear Actuator with CCS PIC C
Let’s do some real work with some real C source instead of wading through a textbook
introduction to the CCS C compiler. This particular project we are about to code involves extending
and retracting the business end of the Firgelli linear actuator shown in Photo 1. The L12 Firgelli
actuator we’ll be working with is designed to push and pull loads along the full length of its stroke.
Our particular actuator has a gear reduction ratio of 50 which allows it to move relatively quickly.
However, the price for faster actuator movement is paid for with reduced actuator force. Thus, an
L12 with a gear reduction ratio of 210 moves slowly at full speed but produces more than twice the
force of a quick-moving linear actuator geared at 50.
An L12 actuator will stop and hold its position when power is removed. A load that exceeds the
actuator’s holding force will drive it backwards. I’ve backdriven many a linear actuator without
inflicting damage on it. Stalling of the actuator is allowed for short periods of time since a few
seconds of stall will not damage it.
Let’s use the model designators you see stamped to our Firgelli linear actuator in Photo 1 to
determine the type of L12 we will be working with. (Looking at the label, the model designator is
interpreted as model number (L12): stroke length in millimeters ( 30); gear reduction ratio ( 50);
voltage ( 12); controller type (S); and custom features (C). So, to reiterate, we can see that our L12
FIGURE 1. This is the mechanical way
to extend and retract the Firgelli linear
actuator. I’m sure you can build a
mechanical device to operate the DPDT
switch. However, the job is easier done
with software and an H-bridge.
68 SERVO 08.2010