RCC0004 User Guide

From Phidgets Support


Getting Started

Welcome to the RCC0004 user guide! In order to get started, make sure you have the following hardware on hand:


Next, you will need to connect the pieces:

RCC0004 0 Connecting The Hardware.jpg
  1. Connect the RC servo motors to the Phidget.
  2. Plug in a power supply using the barrel connector.
  3. Alternatively, you can connect a power supply into the terminal block. Be sure to observe correct polarity.
  4. Connect the Phidget to your computer using the USB cable.


Now that you have everything together, let's start using the RCC0004!

Using the RCC0004

Phidget Control Panel

In order to demonstrate the functionality of the RCC0004, the Phidget Control Panel running on a Windows machine will be used.


The Phidget Control Panel is available for use on both macOS and Windows machines.

Windows

To open the Phidget Control Panel on Windows, find the Ph.jpg icon in the taskbar. If it is not there, open up the start menu and search for Phidget Control Panel

Windows PhidgetTaskbar.PNG

macOS

To open the Phidget Control Panel on macOS, open Finder and navigate to the Phidget Control Panel in the Applications list. Double click on the Ph.jpg icon to bring up the Phidget Control Panel.


For more information, take a look at the getting started guide for your operating system:


Linux users can follow the getting started with Linux guide and continue reading here for more information about the RCC0004.

First Look

After plugging the RCC0004 into your computer and opening the Phidget Control Panel, you will see something like this:

RCC0004 Panel.jpg


The Phidget Control Panel will list all connected Phidgets and associated objects, as well as the following information:

  • Serial number: allows you to differentiate between similar Phidgets.
  • Channel: allows you to differentiate between similar objects on a Phidget.
  • Version number: corresponds to the firmware version your Phidget is running. If your Phidget is listed in red, your firmware is out of date. Update the firmware by double-clicking the entry.


The Phidget Control Panel can also be used to test your device. Double-clicking on an object will open an example.

RC Servo

Double-click on the RCServo object, labelled Servo Motor Controller, in order to run the example:

RCC0004 Servo Example.jpg


General information about the selected object will be displayed at the top of the window. You can also experiment with the following functionality:

  • Motor calibration options are provided. You can change the minimum and maximum pulse widths for your RC servo motor in the appropriate boxes. You can also change which position these pulse widths map to.
  • The SpeedRampingState checkbox lets the RCC0004 know whether or not to take the Acceleration and Velocity values into account when moving the RC servo motor.
  • Use the Position slider to change the target position and move the RC servo motor.


Finding The Addressing Information

Before you can access the device in your own code, and from our examples, you'll need to take note of the addressing parameters for your Phidget. These will indicate how the Phidget is physically connected to your application. For simplicity, these parameters can be found by clicking the button at the top of the Control Panel example for that Phidget.

The locate Phidget button is found in the device information box

In the Addressing Information window, the section above the line displays information you will need to connect to your Phidget from any application. In particular, note the Channel Class field as this will be the API you will need to use with your Phidget, and the type of example you should use to get started with it. The section below the line provides information about the network the Phidget is connected on if it is attached remotely. Keep track of these parameters moving forward, as you will need them once you start running our examples or your own code.

All the information you need to address your Phidget

Using Your Own Program

You are now ready to start writing your own code for the device. The best way to do that is to start from our Code Samples.

Select your programming language of choice from the drop-down list to get an example for your device. You can use the options provided to further customize the example to best suit your needs.

Code Sample Choose Language.png


Once you have your example, you will need to follow the instructions on the page for your programming language to get it running. To find these instructions, select your programming language from the Programming Languages page.

Technical Details

General

An RC servo motor can be instructed to move to a desired position by the controller. Internally, it monitors the current position, and drives the motor as fast as it can until it reaches the desired position. This is a very cheap and simple way to control a motor. It has some limitations though - there is no way for the controller to know the current position and speed of the motor. Applications that want smooth movement suffer from the aggressive acceleration.


The RCC0004 is able to address some of these limitations. Instead of sending the desired position immediately, the RCC0004 sends a series of progressive positions according to acceleration and velocity parameters. In most applications, this dramatically smooths the operation of the servo, and allows reasonably precise control of position, velocity and acceleration. The RCC0004 has a built in switching regulator - this allows it to efficiently operate from a wide voltage range (8-30VDC), and maintain proper power to the servo motors even if the power supply is varying. This built in voltage regulator will not operate if your power supply is undersized.

For more information about servo motors and controllers, check out the Servo Motor and Controller Guide.

Limitations

The RCC0004 does not know the current position of the motor on its own. If your motor is free to move, and is not being driven beyond the physical limitations of the motor, the position returned to your application will be very close to the position of the motor.

Using the RCC0004 with Continuous Rotation Servos

A continuous rotation servo is a servo motor that has had its headgear-stop removed and potentiometer replaced by two matched-value resistors. This has the effect of allowing the motor to rotate freely through a full range of motion, but disables the motor’s ability to control it’s position.

When using the RCC0004 with a servo motor modified in this way, the position control in software becomes the motor’s speed control. Because the two resistors that replace the motor’s potentiometer are matched in value, the motor will always think its shaft is at center position. If the target position in software is set to center, the motor will believe it has achieved the target and will therefore not rotate. The further away from center the target position is set to, the faster the motor will rotate (trying to reach that position, but never doing so). Changing the value above or below center changes the direction of rotation.

Using the RCC0004 with Electronic Speed Controllers (ESCs)

Electronic Speed Controllers are commonly used in RC hobby planes, cars, helicopters. It’s a controller that accepts a PWM input signal, and controls a motor based on that signal. The ESC accepts power from an external source, normally a battery pack.

ESCs can be controlled by the RCC0004, but the vast majority of ESCs on the market will destroy the RCC0004 if they are plugged in without modification. In a hobby RC system, the ESC is responsible for regulating some of the battery current down to ~5V, and supplying it to the radio receiver. An ESC designed to the power the receiver will advertise that it has a Battery Eliminator Circuit (BEC). When you plug an ESC into the RCC0004, the RCC0004 is acting as the radio receiver. The RCC0004 was not designed to be powered by the devices it controls, and the voltage regulator on the RCC0004 will self-destruct if a device tries to power it. If the center pin from the 3-wire servo connector between the RCC0004 and the ESC is disconnected, the BEC on the ESC will not be able to power the RCC0004, and the voltage regulator will not fail.

How the ESC inteprets the PWM signal and controls the motor is a function of the ESC. Higher end ESCs can be configured based on the application.

The hobby RC market has transitioned to Brushless DC Motors (BLDC). As you select an ESC, watch that the battery voltage input matches that of your system, and the type of motor controlled is what you have. Brushed DC and Brushless DC Motors are completely different, and require different controllers.

Wiring layout is critical with ESCs. The currents to the motor and on the ground return can be enormous. If these currents end up travelling back through USB cables, the system will not be stable. Some ESCs are optically isolated (OPTO) - a big advantage that reduces interference.

Synchronization of Multiple Servo Motors

Many applications call for several servo motors operating in unison - for example, operating a CNC table, or a robot arm. Highly precise synchronization of multiple servos using the RCC0004 is not possible, as the sequencing will be affected by the real-time performance of your operating system. Each servo is controlled as a independent unit, so there is no way of arranging for a particular action to happen to all motors at the same time. Typical jitter can be 10-30ms.

Connecting your Servo Motor to the RCC0004

RCC0004 0 Pins.jpg

The pins on the RCC0004 are labelled W R B on the board:

  • W (White or Yellow depending on your servo motor) is the Data Line
  • B (Black) is the Ground
  • R (Red) is 5V


If you need to use a servo motor with a higher power requirement than the RCC0004 can provide, you can cut the red and black wires on the Phidget cable and solder them to the power and ground of an external power supply. If you do this, make sure you disconnect the red wire from the RCC0004, because reverse current from the external power supply could damage the servo controller board.

What to do Next

  • Programming Languages - Find your preferred programming language here and learn how to write your own code with Phidgets!
  • Phidget Programming Basics - Once you have set up Phidgets to work with your programming environment, we recommend you read our page on to learn the fundamentals of programming with Phidgets.