Canada
Asked
Resolved Resolved by DJ Sures!

System Exception With Wheel Encoder Counter Skill

Could someone help me understand why I am getting this exception with the Wheel Encoder Counter skill?

  1. I uploaded the firmware DJ's UNO Firmware with Wheel Encoder Counter (Feb 8, 2019) on my Arduino UNO from this link: Arduino Uno Firmware by following the steps in this tutorial: Connecting Arduino to ARC.

  2. I connected the wheel encoders to port D2 and D3 on the UNO.

  3. I connected my UNO to the EZ-B via UART, making sure I connected the TX to RX, the RX to TX, and a common GND. I also provided 5V for the UNO.

Despite this, I get the following error:


System.Exception: The connected device does not support the required capability to count Wheel Encoding
   at Wheel_Encoder_Counter.FormMain.readValues() in C:\Documents\SVN\Developer - Controls\In Production\Wheel Encoder Counter\Wheel Encoder Counter\FormMain.cs

Did I miss something? Do you have any idea what I might have done wrong?

Note: I tried the following baud rates in the .INO file: EZ-Genuino_Wheel_Encoder_Uno.ino


#define _BAUD_RATE 57600 // Original
#define _BAUD_RATE 115200
#define _BAUD_RATE 9600


Related Hardware EZ-B v4

ARC Pro

Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

#9  

In the UNO Firmware code, at the very beginning of doEZProtocol() : IsAvail() function returns false.

#10  

OK, it works when I connect my UNO with a USB cable from my computer (COM3 on index 0 and the EZ-B on index 1). But how to make the UNO communicate with the EZ-B via UART (RX/TX)?

#12  

OK, thanks for your answer. That makes sense. I got sidetracked.

In that case, do you (@Athena or someone) have any recommendations other than a wireless usb adapter for using the Wheel Encoder Counter skill without a wired USB connection?

PRO
Canada
#13  

Certainly! If you want to use the Wheel Encoder Counter skill without a wired USB connection, you can consider the following options:

1. Bluetooth Module

You can use a Bluetooth module to create a wireless serial connection between your Arduino UNO and your computer. Here’s how you can set it up:

  1. Bluetooth Module Setup:

    • Connect the Bluetooth module to your Arduino UNO.
    • Ensure the TX of the Bluetooth module is connected to the RX of the Arduino and the RX of the Bluetooth module is connected to the TX of the Arduino.
    • Connect the VCC and GND of the Bluetooth module to the 5V and GND of the Arduino.
  2. Pairing with Computer:

    • Pair the Bluetooth module with your computer.
    • Note the COM port assigned to the Bluetooth module.
  3. Configure ARC:

    • In ARC, add a new connection for the Bluetooth COM port.
    • Ensure the baud rate matches the one set in your Arduino firmware.

2. Wi-Fi Module (ESP8266 or ESP32)

You can use a Wi-Fi module like the ESP8266 or ESP32 to create a wireless connection. This method requires more setup but provides a robust solution.

  1. Wi-Fi Module Setup:

    • Flash the ESP8266 or ESP32 with firmware that allows it to act as a Wi-Fi serial bridge.
    • Connect the ESP module to your Arduino UNO.
  2. Network Configuration:

    • Configure the ESP module to connect to your Wi-Fi network.
    • Note the IP address assigned to the ESP module.
  3. Configure ARC:

    • In ARC, add a new connection using the IP address and port of the ESP module.
    • Ensure the baud rate matches the one set in your Arduino firmware.

3. XBee Modules

XBee modules can be used for wireless serial communication over longer distances.

  1. XBee Module Setup:

    • Connect XBee modules to both your Arduino UNO and your computer using XBee adapters.
    • Configure the XBee modules to communicate with each other.
  2. Configure ARC:

    • In ARC, add a new connection for the COM port assigned to the XBee module connected to your computer.
    • Ensure the baud rate matches the one set in your Arduino firmware.

4. Wireless USB Adapter

As you mentioned, a wireless USB adapter can be used to create a wireless USB connection. This is a straightforward solution but may require specific hardware.

  1. Wireless USB Adapter Setup:

    • Connect the wireless USB adapter to your Arduino UNO.
    • Connect the receiver to your computer.
  2. Configure ARC:

    • In ARC, add a new connection for the COM port assigned to the wireless USB receiver.
    • Ensure the baud rate matches the one set in your Arduino firmware.

Additional Resources

By using one of these wireless communication methods, you can eliminate the need for a wired USB connection while still utilizing the Wheel Encoder Counter skill in ARC. If you have any further questions or need more detailed instructions, feel free to ask!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Synthiam
#14  

Athena's recommendation of the Bluetooth serial adapter would work. The trouble is that the resolution and accuracy required for wheel encoders are important to the pose calculation during navigation. The latency introduced by the wireless communication will affect the positioning and introduce pose estimation errors. Generally, in this case, the computer would be onboard the robot.

#15  

Thanks for the clarification @DJ Sures, I'll think about all that. A repositioning is therefore necessary for me.

PRO
Synthiam
#16  

These more advanced features are pushing robots to have onboard computers these days. For basic servo gaits and such, the remote wireless works fine. It becomes challenging when the latency affects the performance of the function

u could query the wheel encoder manually from a script robot skill. Even if it’s connected to the ezb via the uart. You can try it if you’d like - I can create a script that should work for you to try.