You are here

VESC Firmware

Regenerative Braking

Submitted by silvatma on Wed, 2021-05-26 00:38

Hello guys, 

I couldn't find on the files which compose the VESC Firmware, the lines responsible for the regenerative braking. Neither the lines of code responsible for the MOSFET Switching. 

I'm trying to improve my understanding of how to command the VESC to Switch the MOSFETS at will. Any help to this regard is welcome!

Sign of ADC current readings - ia & ib

Submitted by RaiNFall on Mon, 2021-05-17 08:21

Hello everyone,

I've been working lately on a simple implementation of the FOC functionality (learning purposes) using a VESC 4.12 and a Hoverboard BLDC motor.

Problem: ADC values read are always positive (uint32_t) while the phase currents (ia, ib) can have both signs. How can I tell which sign a current has? I tried to refer to the VESC open-source firmware and found inside mcpwm_foc.c something like this:

Torque6 firmware trouble

Romanceismygift's picture
Submitted by Romanceismygift on Sun, 2021-05-09 22:07

Hello, I apologize in advance I'm completely new to all this, it's my first DIY electric skateboard build. So I bought torque6 vescs and running torqueboards direct drive. I'm using the vesc tool app on my phone and I ran the wizard but I keep getting firmware not up to date messages so i uploaded the new firmware but for some reason it is not loading new firmware, when i try to pair the vesc i just get a message firmware needs to be updated. Am i missing a step here? Thank you in advance I'm trying to learn

VESC not reporting ah charged or wh charged

Submitted by trevorjones on Sun, 2021-05-02 06:59

I am trying to collect some data from my VESC and for some reason it is always reporting that ah charged and wh charged are 0, despite the fact that I am able to use regen braking and both the motor and battery current are negative while I am doing so. Does anyone know why this might be the case? I am using firmware version 5.2, hardware version 4.12, and VESC tool version 3.00.

How to add offset Current on 4.10 FW

Submitted by hideo040401 on Mon, 2021-04-19 19:22

Hi, i just fixing some custom vesc that using 4.10 firmware, i little bit struggle on the current sensor calculation, when 0 amp, it has voltage output from sensor = 1.668V. where i should add the offset voltage (1.668 - 1.65 = 0.018V) on the firmware? i am looking on the hw_410.h code and mcpwm.h and still cant find it, Thank you

Why such an old ChibiOS?

Submitted by jackherer on Fri, 2021-04-16 17:03

I'm a very cutting edge kinda guy when it comes to software. I see we a e now on ChibiOS 20.3.3 bit vesc is still using 3.0.5!! That version is now 5 years old, and with 17 major versions released in that time, I reckon it might be an idea to upgrade the ChibiOS version. 

 

I'm only a basic C programmer though (I'm a python guy, meaning to learn C for the past ten years 🤣) 

Query regarding removing code that is not needed for my project

Submitted by jackherer on Thu, 2021-04-15 21:41

I am wanting to remove all the code from the VESC firmware that I will never need. So I will never use any kind of servo, and so I don't need all the encoder code then??

I will only be using hall sensors or sensorless.

As I'm going through the code and removing everything related to servos and encoders I came across the mc_interface_get_pid_pos_now function in mc_interface.c:

What are the meaning of some of the MCCONF values...

Submitted by jackherer on Thu, 2021-04-15 17:25

When looking at the firmware code in order to develop a custom firmware version, I have found most of the code to be self expanatory. 

But there are a few defines that are bugging me.

So firstly what is MCCONF_L_IN_CURRENT_MAX in mcconf? I am not sure if its for the max current from regen braking back to the battery or if its max current from the battery into the controller. 

 

Pages

Subscribe to RSS - VESC Firmware