Live Stream Receiver icon Live Stream Receiver — Play live web video and audio streams inside ARC from Chrome/Firefox, streaming directly to ARC camera control; network configuration may be needed. Try it →
Asked
1 Participant
Wheel encoder on OpenCM 9.04

Wheel Encoder On Opencm 9.04

I’m running ARC on Windows with a Robotis OpenCM 9.04-C over USB. The board is acting as my EZ-B interface to drive two DYNAMIXEL XL-320s in wheel mode. I’ve added single-channel Hall encoders (open-collector, pulled up to 3.3v) on each wheel and I’m trying to use the Wheel Encoder Counter robot skill so I can feed pose to NMS. The skill’s page references Arduino UNO firmware, but I’d really like to keep everything on the OpenCM if possible.

I ported the UNO sketch to OpenCM (Arduino IDE with OpenCM core), using attachInterrupt on two digital pins. Counts look correct in Serial Monitor. To test with the Wheel Encoder Counter skill, I pointed it at the OpenCM’s COM port and tried a few baud rates (9600/115200). With my current output format:

SerialUSB.print("L:"); SerialUSB.print(leftCount);
SerialUSB.print(",R:"); SerialUSB.println(rightCount);

the skill’s debug shows intermittent "timeout reading encoder values" and sometimes "invalid data frame". I also tried only responding when polled (listening for a single character like 'G' then printing counts), but I’m clearly not matching the protocol the skill expects.

A few concrete questions:

  • What exact serial protocol does Wheel Encoder Counter expect (baud, request/response or streaming, delimiters, and field order)? A short example of a valid line would be great.
  • Does the skill require the UNO firmware’s specific command set, or is it simply reading formatted text each poll interval?
  • Can Wheel Encoder Counter share the same COM port that ARC uses to talk to the OpenCM for servos, or does it need a dedicated serial device?

If keeping it on one MCU is unrealistic, I can add a tiny Arduino just for encoders, but before I do that, is there a documented protocol I can implement on the OpenCM to satisfy the Wheel Encoder Counter skill?



Related Hardware (view all EZB hardware)
Opencm 9.04 by Robotis
OpenCM 9.04 with Synthiam ARCx drives Dynamixel servos in a web browser for animations, scripts, AI and hardware I/O
USB
Servos 200
Camera
Audio
UART ✕
I2C
ADC ✕
Digital ✕

Related Robot Skills (view all robot skills)
EZB Connection by Synthiam
Connects EZ-B I/O controllers to ARC via COM or IP (5 connections). Supports init scripts, battery monitoring, TCP/EZ-Script server and serial/I2C.
Arduino UNO wheel encoder: reads left/right ticks, provides counts, configurable ticks, wheel & pivot sizes, optional pose telemetry to ARC NMS.

ARC Pro

Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.

Author Avatar
PRO
Canada
Twitter YouTube GitHub
#1  

Yes - the key issue is that Wheel Encoder Counter is not a generic "read any text" serial parser. It expects the specific command/response behavior used by its supported firmware, which is why your L:...,R:... output and "listen for G then print" approach are timing out or framing badly.

Short answer

  • It does not read streaming text like a serial monitor log.
  • It expects a request/response protocol matching the skill’s firmware.
  • It generally needs its own firmware-side communication path dedicated to encoder data.
  • It should not share the same COM/UART path ARC is using to drive the OpenCM as an EZB if that same port is already occupied for robot control.

What the skill is expecting

The Wheel Encoder Counter skill was built around the firmware documented here:

From that implementation, the skill expects to send a command and receive a structured reply, not parse arbitrary text output. The exact byte-level framing is tied to the firmware used by the skill, so a simple serial line like this is not sufficient:

L:123,R:456

Why your current approach fails

Your current output is human-readable and asynchronous:

SerialUSB.print("L:");
SerialUSB.print(leftCount);
SerialUSB.print(",R:");
SerialUSB.println(rightCount);

But the skill is likely doing something like:

  1. send a poll/request
  2. wait for a response within a timeout
  3. parse a specific frame layout
  4. optionally reset or reuse the values

If the response doesn’t match the expected structure exactly, ARC reports:

  • timeout reading encoder values
  • invalid data frame

Can it share the same COM port as OpenCM servo control?

Usually, no.
If ARC is using the OpenCM 9.04-C over USB as the EZB interface for DYNAMIXEL control, that USB serial connection is already in use for the board’s primary role.

So if you try to also use that same link for wheel encoder polling, you’re mixing:

  • EZB firmware traffic for DYNAMIXEL control
  • encoder poll/response traffic for the wheel counter skill

That is typically not supported on the same serial channel unless the firmware was specifically designed to multiplex both features.

Best options

Option 1: Use a separate small MCU just for encoders

This is the simplest and most reliable path.

  • Arduino Nano / Uno / Pro Mini
  • OpenCM handles DYNAMIXEL
  • second MCU handles encoder counting
  • Wheel Encoder Counter talks to the second MCU

This is exactly the use case the skill was designed for.

Option 2: Extend the OpenCM firmware and create a custom ARC robot skill

If you want to keep everything on the OpenCM, the better ARC-native approach is:

  • keep your OpenCM firmware custom
  • expose encoder counts in a protocol you define
  • create a custom robot skill in ARC that reads those values

That gives you full control and avoids forcing your OpenCM firmware into the UNO-specific Wheel Encoder Counter protocol.

Create a robot skill overview here:

Practical recommendation

If your goal is NMS pose updates, I’d recommend one of these:

  1. Fastest path: add a tiny Arduino dedicated to encoders and use the existing Wheel Encoder Counter skill
  2. Cleanest long-term path: make a custom OpenCM-compatible ARC skill for encoder + pose data

About the protocol

I don’t want to guess the exact frame format and baud assumptions here, because the Wheel Encoder Counter skill is tied to its firmware implementation, and using the wrong packet structure will keep causing the same timeout/framing behavior.

If you want, I can help you do either of these next:

  • Option A: build the OpenCM encoder firmware into a custom ARC JavaScript/Python skill
  • Option B: wire up a tiny Arduino encoder bridge and show you how to connect it to the existing Wheel Encoder Counter skill

If you paste your current OpenCM serial code and tell me whether you prefer custom skill or separate Arduino bridge, I’ll help you map out the exact next steps.

Also, if you’re scripting this behavior in ARC, the ARC AI Assistant can be handy for rewriting the code directly in the editor:
https://synthiam.com/Products/AI-Assistant

I am a customer support AI and still learning. Please verify important answers in our support documentation. For advanced AI features, use the AI Script Agent built into ARC.