Components and Sensors

This is a brief list of some of the components I have used in my robots.  I hope this may help you find the right components for your projects.  To find out where you can buy these, Check out the Suppliers page.


NEW UPDATE!  Loki (and most of my other robots) currently uses a PIC processor to handle sensors, etc., but, the PIC is not that easy to program in “C”.  I am looking to move to either the “EZ-Robot” or “Arduino”.  I have heard really great things about “EZ Robot” (I have one of their boards on order), so definitely check out their webpage at

IR Sensors

IR sensors are good for indoor use, but don’t perform well outdoors in sunlight. They are shorter range than UltraSonic sensors, but much tighter beam (like a laser), so can accurately tells where objects are.

Sharp GP2D12 IR Distance Measuring Sensor: Infrared sensor that determines range to target between 10cm and 80cm.

Sharp GP2Y0A21YK IR Distance Measuring Sensor: I like this one! Wider-angle infrared distance measuring sensor. Approximately twice the beam width of the Sharp GP2D12. Determines range to target between 10cm and 80cm.

Sharp GP2Y0A02YK IR Distance Measuring Sensor: This is the long-range version of the popular GP2D12 infrared distance measuring sensor. Determines range to target between 20cm and 150cm.  I use this sensor a lot for my primary object avoidance.

Sharp GP2Y0D340K IR Sensor: I call this an “IR Bumper”. Single output reads low when an object is closer than 40cm and high when no object is in range. On some of these, the trigger range can be modified to any value between 10cm and 60cm via a small lever on the sensor.

Ultrasonic sensors

Ultrasonic sensors are great for outdoor use, and can be used indoors. The have longer range, and a wide beam pattern that picks up any object in the beam area. This can be good or bad, depending upon application.

Devantech SRF04 / SRF05 Ultrasonic Range Finder: Easy to use from a few inches to 8 feet or more. SRF4 is a great UltraSonic sensor, but is mostly being replaced by the SRF05, which requires less power and even performs better.  Devantech (AKA Robot-Electronics) makes a bunch of different Ultrasonic Rangers. Check out their web page at The sensors are also available in the US.

MaxBotix EZ Ultrasonic sensors – these are cool single-element sensors that are easy to use, as they have multiple ways to measure the distance; Analog voltage, Serial, or Pulse Width.  Available at multiple suppliers.

Other cool stuff

Devantech CMPS03 Digital Compass: I’ve had good results with this compass, which communicates via I2C, making it easy to interface with. There are newer compasses from Sparkfun and others, that are probably even better now.

Hamamatsu P5587 IR Photoreflector: Great little sensor for Wheel Encoders, etc. High/Low output indicates White/Black. Must be very close (almost touching) the wheel. I glue a stripped wheel to the back of motors and use this to measure speed and distance. See schematics.

PCF8574 I/O Expander: These are great! Provides an 8-bit remote I/O port addressed via the I²C bus. Each I/O pin can source or sink as much as 25mA. As many as 8 of these chips can be simultaneously hooked up to an I²C bus, for a total of 64 I/O lines. I’ve used these as remote I/O up to 24″ from the microprocessor. (there is one in Loki’s head, and in each arm)


I like the Dynamixel AX12+ servos.  They can be digital controlled, daisy chained, and report back on position, temperature, load, etc.  Position feedback in particular is critical for robot arms, so you know when they have arrived where to told them to go.   Also, you can adjust the max load.  For example, I use this to adjust the max pressure the hand have on an object, to prevent the servo from overloading.  I also use a couple of Dynamixel RX64 servos, one in each elbow.  These are really powerful, but also really expensive.  I started with 2 AX12 servos in each elbow, but they weren’t quite strong enough, and they made the elbow stick out too far, so going through doorways was tough.  To control the Dynamixel servos, I use “Robotis USB2Dynamixel Adapter”.  I am sure there are other digital servos out there, and I’d love to hear from anyone that has used them!

 RC Servos:  These are generally analog servos, and useful for lot things.  I have sucessfully used them for camera pan/tilt, etc.  Use a servo controller from any of the suppliers below.


I get my motors from a local surplus shop or from ebay.  I like Pittman motors if you can get them surplus; they are expensive otherwise (I got 4 nice ones from eBay for $99).  If possible, try to get motors with encoders (the best ones are called “quadature encoders”).  Maxon motors are also very good quality (and usually expensive).

Parallax makes a nice motor set called the “Motor Mount and Wheel Kit with Position Controller”.  I have not tried these, but they look really nice!

Motor Encoders:  Encoders mount on the back of the motor or on the wheel, and tell you have far you robot has traveled. Also, they can be used to control the speed of the motor, so it has constant speed regardless of load.  This is most important when moving the robot at slow speed, as the motors can stall.  If you don’t have encoders, you can make them.  Here’s one example.  Also, I’ve had good experience using Hamamatsu P5587 IR Photoreflector listed above (see Loki schematics for how to use this sensor).

Check out the Suppliers page!

One Response to Components and Sensors

  1. Mike Fink says:

    Hi, I love Loki, great work!
    I was just wondering how challenging you think the AX-12+s are to use. I have seen them used with the CM5 control unit on the bioloid robots, but was wondering how hard it is to use the usb adapter and to control them via PC. It also looks like you have a dedicated board mounted in the head and I was wondering if that is just for the lights? Or also used for the servos? I’m sorry if this is explained somewhere else on the site.

Leave a Reply

Your email address will not be published. Required fields are marked *