Tag Archives: servo control

Controlling servos with hand motion

Justin Platz and Kurt Clothier from Pubnub illustrates how to control a physical object with the motion of two hands. They used Raspberry Pi and the Leap Motion controller for this purpose.

Controlling servos with hand motion

Controlling servos with hand motion


The two servos mirror the movement of the user’s two individual hands. Attached to the servos are 8×8 RGB LED Matrices, which react to each finger movement on your hand. The Leap Motion communicates directly with the Raspberry Pi via PubNub Data Streams with minimal latency, and the Raspberry Pi then drives the servos.

Leap Motion is a powerful device equipped with two monochromatic IR cameras and three infrared LEDs. In this project, the Leap Motion is just going to capture the pitch and yaw of the user’s hands and publish them to a channel via PubNub. Attributes like pitch, yaw and roll of hands are all pre-built into the Leap Motion SDK.

To recreate realtime mirroring, the Leap Motion publishes messages 20x a second with information about each of your hands and all of your fingers to PubNub. On the other end, our Raspberry Pi is subscribed to the same channel and parses these messages to control the servos and the lights.

3-D printed walking robot

One of the most interesting applications of 3-D printing technology is building customized robot parts. It allows makers to design their own parts on a computer using affordable tools and convert the design into an actual physical product in just a few hours. Randy’s 3-D printed walking robot is a great example of 3-D printing robot parts for rapid prototyping and implementation of your ideas. The robot uses two standard servos for locomotion and are controlled by Arduino. The author also shares his 3-D printer design files and Arduino sketch to the public.

3-D printed robot

3-D printed robot

Making a smart I2C DC motor controller

A full-fledged DC motor controlling application requires a lot of I/O resources and MCU time. This project is about making a dedicated DC motor controllerthat would release the main microcontroller from this duty so that it could do other important tasks more efficiently. The controller uses Atmega168 as a slave I2C device that receives commands from a host MCU through I2C signal lines, and controls two DC motors using the L293D high-current H-driver chip. Separate PWM signals are used for each motor to achieve precise motor steering. The built-in motor steering library routines makes the motor control much easier.

Smart DC motor controller with I2C interface

Lab 21: Servo motor control

A servo motor is a special geared DC motor equipped with an electronic circuit for controlling the direction of rotation, as well as the position, of the motor shaft. Because servo motors allows precise angular positioning of their output shaft, they are used extensively in robotics and radio-controlled cars, airplanes, and boats to control the motion of their various parts. In this lab session, we will first explore what a servo motor consists of and how it works and then illustrate how to interface it with a PIC microcontroller.

Servo motor control using PIC microcontroller

Read more