Skip to content

Instantly share code, notes, and snippets.

@timmaxw
Created May 12, 2024 03:43
Show Gist options
  • Save timmaxw/11b01f5703a1bc9f470ff810f17f3498 to your computer and use it in GitHub Desktop.
Save timmaxw/11b01f5703a1bc9f470ff810f17f3498 to your computer and use it in GitHub Desktop.
How to Emulate DPC-11 programmer using clone FTDI adapter and Arduino Nano

How to Emulate DPC-11 programmer using clone FTDI adapter and Arduino Nano

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:

  1. Connect the servo to an external power source. I used 5V supplied by an ESC.
  2. Connect D2 to PWM pin of servo
  3. Jumper D2 to D3 with a 1K ohm resistor
  4. Connect D4 to the RX pin of the FTDI adapter
  5. Connect D5 to the TX pin of the FTDI adapter
  6. Connect Ground on the power supply of the servo, to the arduino, and to the FTDI adapter.
  7. Connect the 5V ouput from the FTDI adapter to the VIN pin on the arduino.

Here is my setup:

image

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:

  1. Download the zip file.
  2. Unzip the file.
  3. Open the folder, install the servo adjustment program: DPC-11_Setup.msi
  4. Choose the "install for everyone" option as part of the installation steps.
  5. 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
  6. Once that's done, go to your PC's desktop. Right click on the shortcut DPC-11, click Open File Location
  7. 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
  8. Choose "Copy and Replace" option when prompted.
  9. 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:

image

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:

image

Click Connect. If all is well, it will connect, and you can make all changes as if you had a DPC-11 programmer!

image

User manual for full details on how to use the programmer can be found here:

411_DPC11_ManualV3.pdf

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment