Vesc Tool

VESC Tool for PC: Download and install VESC Tool 2.05 Apk for PC using Android emulators of your choice. VESC Tool is a Tools App developed by Benjamin Vedder with 1,000+ active installs. Check out our instructions on where the VESC BLDC Tool can be found. How To Download The Latest VESC BLDC Tool. Check out our instructions on where the VESC BLDC Tool can be found. Free Shipping USA orders $200+. Use Coupon Code “FREESHIP” Search. That's the replacement of the BLDC Tool, it's totally new and up to date, it has a new UI, it's easier to use and offers help on almost every screens and buttons. It also allows you to update your VESC to the latest version. We recommend to use the VESC Tool if you can.

  1. Vesc Tools
  2. Vesc Tool For Mac
  3. Vesc Tool Mac
  4. Vesc Tool Bluetooth

Many people have asked me how to communicate with the VESC using UART, but I did not have a good answer since I haven’t written any tutorial about that and the only thing I could refer to was the BLDC Tool code. Now I have created a project for the STM32F4 discovery board that implements UART communication with the VESC where the full interface is implemented. In this post I will try to explain how the code works and how to port it to other platforms.

Start by downloading the code from github: https://github.com/vedderb/bldc_uart_comm_stm32f4_discovery

If you have a stm32f4 discovery board, you can upload the code to it and test it by following the tutorial in my VESC Post for installing the toolchain. After that, just connect both USB ports of the discovery board (one for the built in programmer and one for the serial terminal) and type make upload from the project directory. Don’t forget to connect rx (PB11), tx (PB10) and gnd from the discovery board to tx, rx and gnd on the VESC. The discovery board will show up as a USB-serial port and you can use a serial terminal such as screen or gtkterm to access a simple command line interface on it. Only a few commands are implemented for the command line interface (type help to list them), but a good exercise is to write more commands in the main file using the provided interface. Doing that with the bldc_interface code should be quite straight forward.

The VESC communicates over UART using packets with the following format:

  • One Start byte (value 2 for short packets and 3 for long packets)
  • One or two bytes specifying the packet length
  • The payload of the packet
  • Two bytes with a CRC checksum on the payload
  • One stop byte (value 3)

The higher level of the VESC communication code is the same for the USB, UART and CAN ports, so everything that can be done from BLDC Tool can be done from the other ports as well. Therefore I have abstracted out the higher layer of the communication into separate files so that it can be reused for CAN-bus and USB without modifying the rest of the code later.

The important files in the project, which you can use for your implementation, are the following. They are plain C files and don’t have any hardware dependencies.

bldc_interface.c and bldc_interface.h

These files can assemble the payload for all the commands that the VESC supports. They can also interpret packets from the VESC and extract the data from them. Notice that only the payload is handled in these files, not the start, stop, length and checksum bytes since these are different for the CAN interface.

datatypes.h

The data structures used by the VESC.

buffer.c and buffer.h

Helper functions for for going between C types and byte arrays. These are used by the bldc_interface files.

crc.c and crc.h

For calculating the CRC checksum

packet.c and packet.h

For assembling the packets for the VESC with start, stop, length and checksum bytes. These files also have a state machine where one byte received from the VESC can be added at a time to assemble a packet and check the checksum correctness.

bldc_interface_uart.c and bldc_interface_uart.h

Connects packet and bldc_interface to provide a clean UART interface. This is where the user has to make the connection to the UART interface for the platform of choice.

All of these files rely heavily on function pointers. This might sound complicated at first, but it is actually quite convenient and easy to use. The connection between these files and the UART port is done in the file comm_uart.c, which is the file that you have to implement if you want to port this to a different platform. Also, if you decide to use some other port than UART such as CAN or USB, you only have to re-implement this file and the higher level implementation will work as before.

Making the platform-specific UART connection

This should be rather straight forward. The bldc_interface_uart files have three functions that have to be used:

bldc_interface_uart_init

This is the init function that takes a function pointer to a function that you provide for sending data on the UART. You can use it something like this:

bldc_interface_uart_process_byte

Call this function every time a byte is received on the UART with the received byte. It will run the state machine in the packet assembler and the callbacks in bldc interface will be called when the packets are ready.

bldc_interface_uart_run_timer

Call this function every millisecond to reset the packet state machine after a timeout in case data is lost.

Notice that bldc_interface_uart_process_byte and bldc_interface_uart_run_timer can be omitted it you only plan to send data to the VESC and not read anything.

In this example project this is implemented in comm_uart.c. This implementation is a bit more complicated than necessary because it uses threads to run the data processing to not block the UART while running the callbacks and to not run the callbacks from an interrupt scope, but a much simpler implementation can also be done if you don’t have an RTOS. You could call bldc_interface_uart_process_byte directly from an interrupt handler every time you receive a byte.

After you are done with the hardware specific UART implementation, you can use bldc_interface in your application. To set the current, duty cycle etc. just call the corresponding function from the setters e.g.

You can do everything that BLDC Tool can do, including changing the configuration (you should read the old configuration before updating it though). Notice that you have to call these functions at regular intervals to not trigger the timeout in the VESC that will release the motor if no new commands have been received for longer than the configured time for safety reasons. This can be done either by calling the corresponding setters at regular intervals or by calling the bldc_interface_send_alive function.

Vesc

Reading data

Reading data is done with getter functions and callback function pointers. For example, to get realtime data from the VESC, first set a callback to your function for handling the data using bldc_interface_set_rx_value_func and then request the data with bldc_interface_get_values. It can look something like this:

Have a look at main.c to see some examples of this.

That’s it! I hope this is enough to get started with UART communication to the VESC.



By clicking 'Continue to App' button you accept the Privacy Policy
2.5/5 1

Vesc Tools



VESC Tool 3.00 Shareware


Recommended Applications for Windows

Commercial Backup Software

Free Backup Software

Commercial PDF Creator

Free PDF Creator


About VESC Tool

This is the mobile version of VESC Tool, which can be used to configure VESC-based hardware over BLE. It can also be used to stream live data, update the firmware and many other things.For details, visit...
This is the mobile version of VESC Tool, which can be used to configure VESC-based hardware over BLE. It can also be used to stream live data, update the firmware and many other things.
For details, visit
https://vesc-project.com
For VESC Original hardware, see
http://www.trampaboards.com/vesc--c-1434.html
To connect to a VESC over BLE, a compatible BLE module is required. They can be purchased here:
http://www.trampaboards.com/vesc-connect-nrf-wireless-dongle-p-26767.html
you can also build your own:

Technical Details about VESC Tool


Category
System Utilities
Release Date
2021-01-11
Publisher
Benjamin Vedder

Previous Versions

Here you can find the changelog of VESC Tool since it was posted on our website on 2019-07-10 16:48:15.The latest version is 3.00 and it was updated on 2021-05-27 10:07:08. See below the changes in each version.

Vesc Tool For Mac


Release Date: 2021-01-11
Changes: 3.00 * Focus for this release: External hardware and BMS support. - Added hw type setting. - Added BMS commands* Other updates - Only allow uploading firmware to all VESCs when they have the same hardware version. - Added UDP server and client. - Realtime IMU and balance data. See: https://github.com/vedderb/vesc_tool/pull/91
Release Date: 2020-08-18
Changes: 2.06 * Updated stormcore and unity firmwares. 2.05 * FW 5.01 support: - Fixed bug in PPM app. 2.04 * FW 5.0 support: - Dual motor support, for e.g. unity. - Much better detection - Many other changes, see the firmware changelog for details.* Added NRF pair to VESC Remote page.* Added detect all without CAN button.* Added support for FW test build flag.* Log setup values in desktop VESC Tool too.* Added IMU orientation calibration widget.
Release Date: 2020-04-27
Changes: 2.05 * FW 5.01 support: - Fixed bug in PPM app. 2.04 * FW 5.0 support: - Dual motor support, for e.g. unity. - Much better detection - Many other changes, see the firmware changelog for details.* Added NRF pair to VESC Remote page.* Added detect all without CAN button.* Added support for FW test build flag.* Log setup values in desktop VESC Tool too.* Added IMU orientation calibration widget.
Release Date: 2020-03-06
Changes: 2.03 * App balance updates. See https://github.com/vedderb/bldc/pull/138.* Changed back FOC time constant.* Added test version warning.* Remind user to switch on the location service on android 10 if BLE scan fails.* Updated to Qt 5.12.7 for the android build.* Start linux version without openssl on version mismatch.* FW 4.02 support.

Vesc Tool Mac

Release Date: 2020-01-31
Changes: * FW 4.01 support. 2.01 * Upadted NRF52 firmware to support NRF remotes at the same time as VESC Tool is connected.* Fixed swdprog bootloader paths.* Disconnect port after firmware upload.* Support for FW 4.00, which has HFI support.* Try regular FW chunk write if LZO write fails.* Use 4 ms current controller time constant by default.* Added CAN analyzer page.
Release Date: 2020-01-12
Changes: * Focus for this release: increase backwards compatibility with old firmwares. - Support for FW 3.60 - 3.66. - Keep a record of known issues with old firmwares, and warn if a problematic firmware is in use. - Support for making/restoring backups of motor and app configurations.* Other updates - Added support for VESC 100/250. - Show message when configuration verification fails. - FW 3.66 support: Many FOC improvements, see firmware changelog.
Release Date: 2019-12-29
Changes: 1.29 * Replaced miniLZO with lzokay to resolve crash on Android, and to get a bit better compression ratio. 1.28 * FW 3.65: - Added support for PTC motor thermistors (such as the KTY84). - APP_PPM sleep fix. Should solve CAN issues. 1.27 * Added option to truncate history in experiment plot.* Disable optimization for LZO on android to prevent crash during FW update on 32-bit devices.* Added HW60_MK3 FW.* New wand firmware.* VESC FW 3.64 with important safety fixes.
Release Date: 2019-12-22
Changes: * FW 3.65: - Added support for PTC motor thermistors (such as the KTY84). - APP_PPM sleep fix. Should solve CAN issues. 1.27 * Added option to truncate history in experiment plot.* Disable optimization for LZO on android to prevent crash during FW update on 32-bit devices.* Added HW60_MK3 FW.* New wand firmware.* VESC FW 3.64 with important safety fixes.
Release Date: 2019-12-05
Changes: * Log analysis: - Added ability to filter out outliers from map plot. - Added file browser tab.* Renamed 75/300 bootloader so that it also matches with the R2.* Added FW upload compression support for faster firmware uploads.* Added clear data button to experiment plot.* Added support for TS5700N8501 encoder.* Better observer gain calculation.* Disconnect BLE in destructor.
Release Date: 2019-09-29
Changes: 1.22 * Use foregroud service to keep GNSS alive during logging.* Always use wake lock during logging. 1.20 * Added TCP server to mobile version.* Remember log files location.* Added GNSS data to RT log.* Added setup data to RT log.* Added IMU data to RT log.* Use imperial units in profiles as well when selected.* Allow running in background.* Added wake lock when VESC is connected on Android.* EUC app support.* FW 3.62 support:* New Wand firmware

Related Apps

Vesc Tool Bluetooth

Here you can find apps that are similar with VESC Tool.