Suppose you want to program a Hitec D-series digital servo, but you don't have Hitec's DPC-11 dongle. This guide describes how to use an FTDI serial adapter and an Arduino in place of Hitec's DPC-11 dongle, so you can use Hitec's GUI without having the physical DPC-11 dongle.
Motivation: This lets you reprogram the endpoints of your servo to be whatever you want. The range of motion can be increased to 180 degrees. Fail safe positions can be set, overload protection settings, dead band, speed, and more..
Let's get started.
Flash your arduino with the following code (just about any arduino will work):
void setup() {
// Set D2 and D5 as inputs
DDRD &= ~((1 << DDD2) | (1 << DDD5));
// Set D3 and D4 as outputs
DDRD |= (1 << DDD3) | (1 << DDD4);
}
void loop() {
// Read the state of D2 and invert it, then write to D4
if (PIND & (1 << PIND2)) {
// D2 is HIGH, set D4 LOW
PORTD &= ~(1 << PORTD4);
} else {
// D2 is LOW, set D4 HIGH
PORTD |= (1 << PORTD4);
}
// Read the state of D5 and invert it, then write to D3
if (PIND & (1 << PIND5)) {
// D5 is HIGH, set D3 LOW
PORTD &= ~(1 << PORTD3);
} else {
// D5 is LOW, set D3 HIGH
PORTD |= (1 << PORTD3);
}
}
Using a breadboard, make the following connections:
- Connect the servo to an external power source. I used 5V supplied by an ESC.
- Connect D2 to PWM pin of servo
- Jumper D2 to D3 with a 1K ohm resistor
- Connect D4 to the RX pin of the FTDI adapter
- Connect D5 to the TX pin of the FTDI adapter
- Connect Ground on the power supply of the servo, to the arduino, and to the FTDI adapter.
- Connect the 5V ouput from the FTDI adapter to the VIN pin on the arduino.
Here is my setup:
Now that's the hardware all done. Let's look at software:
You'll need to follow the installation instructions for the DPC-11 software here: https://hitecrcd.com/products/servos/programmers/dpc-11/product
But! Use the older version of the software: https://hitecrcd.com/uploads/DPC-11_Setup_20180214_V2.9.1.zip The newer one makes requests that the adapter layer doesn't know to translate.
Key steps of the installation is:
- Download the zip file.
- Unzip the file.
- Open the folder, install the servo adjustment program: DPC-11_Setup.msi
- Choose the "install for everyone" option as part of the installation steps.
- Then go into the
HITECRCD_DPC-11 Driver Installer
folder which is in the zip file you just downloaded, and install the driver:HITECRCD_DPC-11 Driver Installer.exe
- Once that's done, go to your PC's desktop. Right click on the shortcut DPC-11, click
Open File Location
- Unzip this file SiUSBXp.zip and copy the
SiUSBXp.dll
into the folder that you just opened. For me this was here:C:\Program Files (x86)\Hitecrcd\DPC-11
- Choose "Copy and Replace" option when prompted.
- Power up your servo, connect the FTDI adapter to your PC, launch the DPC-11 program from the desktop shortcut, and it should show up as connected:
Click on the series of servo you have, for me I have a D645MW servo, so I click the D-series.
Next screen you get is this:
Click Connect
. If all is well, it will connect, and you can make all changes as if you had a DPC-11 programmer!
User manual for full details on how to use the programmer can be found here:
Source files for the DLL are here, it is what makes the FTDI adapter be recognized as the DPC-11 programmer: src.zip
Credit for the original idea goes to user rtv over at the eevblog forums: https://www.eevblog.com/forum/mechanical-engineering/programming-hitec-d485-rc-servo-settings/. This guide was written by TTN-, with light editing by timmaxw. More discussion and context here.