You are here

Issues with VESC 75/300 and VESC-Tool V3.01

1 post / 0 new
hpb66
Offline
Last seen: 1 year 10 months ago
Joined: 2021-05-11 07:27
Posts: 5
Issues with VESC 75/300 and VESC-Tool V3.01

Hi all,

I recently upgraded my Laptop to Win 11 and the VESC-Tool to V3.01 and the firmware of my VESC 75/300 to the latest release. The basic connectivity is given and the setup works in general.

But since then (or at least, I did not have seen the issues before), I am experiencing several issues. Maybe, someone can help:

- I control my VESC via Arduino MEGA using UART. In the past, it was possible, to receive and log RT-data inside VESC-Tool, when commanded via Arduino. Now, the RT function brakes down after several seconds. The RT-screen is frozen then. If I try to reconnect, I receive an error, that the firmware cannot be read. Only a restart of the VESC-tool and a disconnet of the USB-cable solves the issue. However, even then, the reading of RT-data is not possible after some seconds.

- I am reading the Motor RPM every 1000ms using the following code:

 if(millis()-VESC_Daten_Speicher > 1000)
 {
        if (UART.getVescValues())
        {
                  RPM_Motor_VESC = UART.data.rpm/number_of_poles;
         }
        else
        {
            Serial.println("Failed to get data!");
        }

}

I am also sending my command via the following line constantly with every loop:

        UART.setCurrent(VESC_command);

In the setup-section, I declared the following:

   /** Setup UART port for Communication with VESC (Serial 1 on Atmega32u4) */

  Serial1.begin(115200);
 
  while (!Serial1) {;}

  /** Define which ports to use as UART */
  UART.setSerialPort(&Serial1);

 

and in the general section, I defined the following:

 

#include <VescUart.h>

/** Initiate VescUart class */
VescUart UART;

 

The general communication and data exchange works, however, I receive from time to time (between 5 and 10 seconds) the "Failed to get data!" error, which indicates a problem with the serial communication. Now I do not know, if this is caused by the VESC or the Arduino Mega, I am using. I am reading my RPM-values every 1000ms in the void loop(), but sending in the same void loop() section with each loop my command to the VESC using UART.setCurrent(VESC_command).

Could this lead to crashes, while data will be sent and received with only a very short time difference in between?

Or does all this indicates an issue with the latest firmware and the VESC-tool?

I appreciate your ideas!

Hans-Peter