A customised version of Benjamin Vedder's VESC firmware. See the original at https://github.com/vedderb/bldc/
Important
This is a customised build of the VESC firmware. Some settings from the VESC tool are permanently set here for safety. The value configured through the VESC tool will be ignored. You can check if you are running a custom build by using the VESC terminal, with the command fw_info.
This fork will be synced with the main repo upon request. At present it is a beta version of v6.06.
- The killswitch is hardcoded to the PPM_HIGH mode. In addition, the internal pullups are activated so that inadvertent disconnection of killswitch wiring fails safe and activates the killswitch.
- The option to use the PPM input as a button is allowed by the firmware, but will not function as desired since the killswitch is controlled by the same pin. It is recommended to use rx and tx as buttons instead, or to use LispBM to override the buttons.
- To prevent conflicting use of the PPM pin:
- The PWM and Servo Decoder drivers have been disabled.
- The LispBM commands
set_servoandicu_startare disabled and will return an error. - The PPM and UART_PPM apps are disabled.
- Servo output is disabled.
- Customised
fw_infocommand output to allow identification of modified VESC firmware and active modifications. - Timeout brake current is forced to 0 so that VESC cannot draw any traction current during killswitch.
- The default app configuration is customised. See the commit history for
applications/appconf_default.hfor details.
An open source motor controller firmware.
This is the source code for the VESC DC/BLDC/FOC controller. Read more at https://vesc-project.com/
All of them!
Check the supported boards by typing make
[Firmware]
fw - Build firmware for default target
supported boards are: 100_250 100_250_no_limits 100_500...
There are also many other options that can be changed in conf_general.h.
- Tools:
git,wget, andmake - Additional Linux requirements:
libgl-devandlibxcb-xinerama0 - Helpful Ubuntu commands:
sudo apt install git build-essential libgl-dev libxcb-xinerama0 wget git-gui- Helpful macOS tools:
brew install stlink
brew install openocd- Chocolately: https://chocolatey.org/install
- Git: https://git-scm.com/download/win. Make sure to click any boxes to add Git to your Environment (aka PATH)
Open up a terminal
git clone http://github.com/vedderb/bldc.gitcd bldc- Continue with On all platforms
- Open up a Windows Powershell terminal (Resist the urge to run Powershell as administrator, that will break things)
- Type
choco install make git clone http://github.com/vedderb/bldccd bldc- Continue with On all platforms
git checkout origin/mastermake arm_sdk_installmake<-- Pick out the name of your target device from the supported boards list. For instance, I have a Trampa VESC 100/250, so my target is100_250make 100_250<-- This will build the VESC 100/250 firmware and place it into thebldc/builds/100_250/directory
Linux Optional - Add udev rules to use the stlink v2 programmer without being root
wget vedder.se/Temp/49-stlinkv2.rules
sudo mv 49-stlinkv2.rules /etc/udev/rules.d/
sudo udevadm triggerpython3, andpip
- Python 3: https://www.python.org/downloads/. Make sure to click the box to add Python3 to your Environment.
pip install aqtinstallmake qt_install- Open Qt Creator IDE installed in
tools/Qt/Tools/QtCreator/bin/qtcreator - With Qt Creator, open the vesc firmware Qt Creator project, named vesc.pro. You will find it in
Project/Qt Creator/vesc.pro - The IDE is configured by default to build 100_250 firmware, this can be changed in the bottom of the left panel, there you will find all hardware variants supported by VESC
- Build and flash the bootloader first
- Then
_flashto the target of your choice. So for instance, for the VESC 100/250:
make 100_250_flash- Clone and build the firmware in .bin format as in the above Build instructions
In VESC tool
- Connect to the VESC
- Navigate to the Firmware tab on the left side menu
- Click on Custom file tab
- Click on the folder icon to select the built firmware in .bin format (e.g.
build/100_250/100_250.bin)
[ Warning : DO NOT DISCONNECT POWER/USB to VESC during the upload process, or you will risk bricking your VESC ]
[ Warning : ONLY DISCONNECT your VESC 10s after the upload loading bar completed and "FW Upload DONE" ]
- Press the upload firmware button (downward arrow) on the bottom right to start upload the selected firmware.
- Wait for 10s after the loading bar completed (Warning: unplug sooner will risk bricking your VESC)
- The VESC will disconnect itself after new firmware is uploaded.
you will need to upload a new working firmware to the VESC.
However, to upload a firmware to a bricked VESC, you have to use a SWD Debugger.
Head to the forums to get involved and improve this project. Join the Discord for real-time support and chat
Every firmware release has a tag. They are created as follows:
git tag -a [version] [commit] -m "VESC Firmware Version [version]"
git push --tagsThe software is released under the GNU General Public License version 3.0