Changing on time for Mosfets on VESC

Hello,

Has anyone ever messed with the firmware on VESC to change the on times for the Mosfets used in the VESC? Basically I want to decrease the pulse time so I can increase the current or the voltage that can be used on the FET and stay in the safe operation range specified by the datasheet. I’m assuming that the on time for the mosfets has a fixed constant when using the Current hyst. mode, but I haven’t looked into the code enough to know. Does anyone happen to know where that is in the firmware, or a good guide that can help me figure out where stuff is in the firmware?

Thanks,
Jacob Lara

You know there’s a vesc forum? This forum is just fools knowing plugs n buttons.

5 Likes

by fet on time do you mean the duty_cycle?

in current_hyst mode. ( all the current modes, hyst is a just one of the variants with reverse) the control signal (Servo/pwm/ppm | uart) asks for a target current, and the vesc automagically (PID) adjusts duty_cycle to achieve the desired current.

So their on time is changing all the time.

6 Likes

Rude! I can also super glue batteries together. My talents are numerous

5 Likes

I’m a member here so obviously I’m kinda joking. Fact remains this isn’t the technical vesc forum which has people who know a lot more related to vesc

I still like to superglue batteries together

6 Likes

I know you can change the timing on other ESCs like blheli ones but I don’t think you can on VESCs.

It would be a 0-40 range of which 16-32 is reasonable. It changes how long the phases are powered. If it’s for longer the phases are powered from before their magnets are very close so it makes more torque but is less efficient. I think VESCs change timing automatically.

1 Like

I think you are looking for zero vector frequency under FOC->Advanced in vesc tool

2 Likes

Yeah that makes sense. Don’t know what I was thinking. I’ll have to ask the VESC community about how they ensure their control algorithm doesn’t exceed the safe operating range of the mosfets.

1 Like

I think that is used for polling hall effect sensors or something based on what I read on a forum. Didn’t know that setting existed though, so thanks for that.

It has nothing to do with hall sensors. If you download the vesc tool it has an explanation next to every setting

7 Likes

Awesome. This looks promising. I’ll have to mess with this some more. Thanks. Much better than having to tinker with the firmware.

4 Likes

Be careful messing with zero vector frequency if you’re not familiar with it.

In the onewheel community we use zero vector to help when you have a cogging or noisy (lightsabering) motor.
On the onewheel hub motor, your zero vector is somewhere between 19 and 30, Most are 23-24 range.
People have blown controllers by raising the ZVF too high.
I’ve heard of people blowing them at 35 zvf.
Tread lightly in this area, don’t do big number jumps at a time. Small changes, then test.
Also you’ll need to load the motor to actually test it, bench test doesn’t really work that well.

2 Likes

Thanks for letting me know. I never would’ve suspected that to cause things to blow up. I was planning on using an old VESC anyways.

1 Like

+1 for super gluing batteries together. I also like to lay cling film in the enclosure and then seat them into a bed of silicone sealant. Keeps the cells tight and adds compression support for the enclosure at the expense of weight.

2 Likes

You must be new to VESC :grin:

5 Likes

Vesc is like a rooted android phone, you can change anything and destroy your phone if you want.
The mosfets are turning on and off at half of the zero vector frequency so if you put a crazy number the mosfets will overheat from the switching losses

1 Like

Haha. I’ve been using VESC for about 3 years now, but haven’t really played with the settings much after using the wizard. Maybe I’m just lucky my shit hasn’t blown up

not luck:

3 Likes