Extended BLDC-TOOL with Watt Control Mode, PPM Cruise Control, individual Throttle-Curve and Android App

Got the software ready today for the adjustbale throtlle curve implementation. Hopefully i find the time to test it tomorrow. Finally It should work for all Control modes (Duty Cycle, Cruise Control, PID and Watt). But i think it really only makes sense for Watt Control because of the precise definition of the power output.

I really hope that it feels the same way as i think it would feel. It is highly adjustable, that means no predefined curves. So everybody can create it’s own completely independent curve in a very easy way that everybody understands.

5 Likes

Amazing job ! Can’t wait to test it ! There is a little typo in the legend of the chart “Costum”.

Now, I can say I contributed to your project ! :smile: :smile:

@Ackmaniac, I want to upload your firmware but BLDC Tool says that the file name is not correct. Any idea ?

Had the same problem, I renamed the firmware to VESC_default or some shit and it worked somehow.

Thx for the info. I renamed it to VESC_default. Didn’t know that, sorry. Maybe you can try if it works now with the updated dropbox files name.

I just finished a build a wanted to configure it through Vedder’s BLDC but as always I was losing my hair with this fu**** PPM adjustment. So I switched to your firmware and BLDC Tool and set the PPM in a heart beat. This is so so so useful !! I was crying about that on Vedder forum since a while and you made it.

Thanks so much @Ackmaniac. You really deserve a couple of VESC-X for your test ! Isn’t it @onloop ? :smile:

3 Likes

Now also try all the other stuff. Watt control and if you have a dual setup (2 VESCs) use the cruise control via the steering channel of your remote. And if you try cruise control then disable the breaking in cruise control to have really nice carving.

And thanks for testing. Gives me the feeling that all those hours make sense.

1 Like

Yes, for sure ! But for now it’s snowing so it depends not only on my willing now. :smile:

VERY IMPORTANTVERY IMPORTANTVERY IMPORTANT****VERY IMPORTANT

Don’t use my modified Firmware and BLDC-Tool for FOC. @Blasto figured out that there are issues which i have to solve first. It runs fine in BLDC but i need to find the issue for FOC. Strange thing is that i didn’t change anything in the code how FOC is handled. But i will find out.

BTW: i made the first tests with the throttle curve adjustment and it works awesome.

Update: Issue is already fixed

3 Likes

Ok was analysing the code and checked my changes multiple times by comparing all my changes. And only the cruise control has a little change for FOC. But as long as cruise control is not activated it can’t have any influence.

So i gave it another try. Made a FOC motor detection again. Then after changing from BLDC to FOC i rebooted the VESC. And then it worked. So it seems that those issues are also there with the normal BLDC tool. So i recommend to always reboot the VESC after changes. Also please reboot the VESC when you change from FOC to BLDC again.

And I will try to release a new version with the throttle adjustment by tomorrow. So if there is anybody who wants to try it in Foc then please wait for this version. Just because I checked the new one multiple times for mistakes and it was working on my bench.

Actually, some guys who fried their DRV advice to upload a fresh firmware each time we change from a control mode to the other. It seems to keep some “ghost” values.

Do you have a Github repo for sharing your code easily ?

This may be missleading as this is not the default-firmware, maybe something like VESC_ackmaniac would be better. I used VESC_default because that was the name of the original firmware and I just wanted to make it work quickly.

And yes the original firmware do have issues with BLDC=>FOC but nobody found the failure code, maybe you get more lucky.

I renamed it “VESC_Ackmaniac” and it passed the name checking. :wink:

I think that Vedder will solve that stuff with the new Firmware for VESC 6 because he mentioned already that he found a lot of FOC issus which he fixed for the new firmware. So i think it would be the best to wait for that. And thanks for the check, i renamed it to VESC_Ackmaniac. And once the VESC-Tool is out then i will of course implement my changes and provide a modified Firmware again.

4 Likes

Just for my information, in case of cruise control PPM with dual VESC setup, could the cruise control be activated by the CH3 (ON/OFF momentary button) instead of steering pot ?

I see it working like a car : You ride at a certain speed with Watt control through the standard trigger (CH2). Then you push one time the CH3 button. It activates cruise control so you can release the trigger it’s keeping the same speed.

  • If you need to accelerate, you pull the trigger. System takes into account the max of trigger or PID output. So if you release the trigger it comes back to the previous speed setpoint
  • If you brake, cruise control is simply desactivated.

Could it work in this way ? Actually, I use GT2B mods without steering pot but with CH3 button (like Mad Munkey mod) that’s why I ask. :slight_smile: Thanks !

Channel 3 would work i think. You simply have to define the center pulsewith when the button is not pressed and the maximum pulsewidth with the value when the button is pressed. But i ma not sure if button 3 sends a signal at all when it is not pressed. You should try to find out. And i like it more when you have to press a button or steer that cruise control keeps active. And when you release it it switches off. Your described behavior would be possible but that only suites for buttons and not for the common steering wheel. Need to think about it in a free moment.

How/where do you read the Ch3? Using ADC?

Using PPM port of the slave VESC (onluly in dual setup).

I am happy to announce that the new Firmware with Throttle-Curve adjustment is online now.

Was hard work over the last 4 days. I updated the description in the first post of this topic. Have fun.

BTW i also fixed the issue with FOC in Watt Control. Problem was that the duty cycle (used for calculations) in FOC mode can be 0 and then the calculations also calculated 0 power output. This is fixed now.

8 Likes

I installed it. “Make clean && make” ! However I got 2 warnings during compilation :

mainwindow.cpp:2203:43: warning: unused parameter ‘clicked’ [-Wunused-parameter] void MainWindow::updateThrottleCurve(bool clicked){ ^ mainwindow.cpp:2207:45: warning: unused parameter ‘max_watts’ [-Wunused-parameter]

Oh and you should put version number to both BLDC Tool and firmware because you will release more version I guess :wink: