You are here

Firmware 5.00

29 posts / 0 new
Last post
benjamin
Offline
Last seen: 10 hours 48 min ago
Joined: 2016-12-26 15:20
Posts: 369
Firmware 5.00

I'm currently working on firmware version 5 for the VESC, and the major new feature is dual motor support. This means that the focbox unity should work with this release, as well as other dual motor controllers that will come in the future. In some upcoming projects I'm going to work more closely with Jeffrey who made the unity, so the other controllers he makes should be based on the main VESC code base soon. Jeff and me collaborating should be good news for the community, and I look really look forward to seeing what we can do.

Here is a test build of VESC Tool with the new experimental firmware for Linux, Android and Windows:

http://home.vedder.se/tmp2/vesc_tool_test_2020-04-10.zip

It would be great if you can help me test this carefully on your setups. Please be very careful, as I haven't done much testing myself yet. Use RPM limits, wear protection and take your time.

I would appreciate feedback on:

  • Dual setups with the focbox unity
  • Singe setups (as a lot of the code is restructured)
  • Setups with CAN-bus, including both unitys and single controllers if possible (3+ motors)
  • Observer gain calculation and working parameters
    • Use calculated value from old firmware vs new firmware
    • Vary the input voltage and see if the observer tracks well

How does dual motor support work?

Essentially, the second motor pretends to be another VESC on the CAN-bus with the CAN-ID + 1. This means that you treat it just as a regular combinations of two VESCs on CAN. The unity will thus also get two CAN-IDs on the CAN-bus, so it should integrate well with other projects that used can.

Each motor has a unique motor configuration, and the only dependence between them is that they must have the same switching frequency as the timers must run in sync. So when the switching frequency is changed on one, the other one will be set to the same value. At the moment around 27 kHz is the highest supported switching frequency, which is not enforced, so don't set it higher than that as you might need an SWD programmer to recover. There is only one app configuration, and it runs on motor 1. Motor 1 will always see CAN status messages from motor 2, so activating multiple VESCs over CAN should run both motors for the apps. Traction control in apps also works this way.

VESC Code

If you are into coding and the VESC code, please also look into the code in the dev branch:

https://github.com/vedderb/bldc/tree/dev_fw_5_00

I will make more frequent updates to the dev branch than I used to do to master, so you can hopefully follow what is happening easier. There is a dev branch for VESC Tool too, but there are barely any changes as the firmware is backwards compatible.

vadicus
Offline
Last seen: 4 hours 27 min ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 103

Thank you, Mr. Vedder. Very interesting. Is this an extension of the existing functionality when you can connect multiple controllers via CAN and have them run in sync or it is something completely new?

I am particularly intrigued by a motor acting as a controller. 

Pimousse
Offline
Last seen: 1 day 1 hour ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 95

This is really a new era in the VESC Project !

Thank you for involving more and more people. This is quite exciting !

benjamin
Offline
Last seen: 10 hours 48 min ago
Joined: 2016-12-26 15:20
Posts: 369

This is really a new era in the VESC Project !



Thank you for involving more and more people. This is quite exciting !

Thanks! I hope that some volunteers will help out with the testing, it has been a big burden for me with that many setups around.

 

I just uploaded a new version. It has some fixes for the unity, but more importantly improved parameter detection and observer gain scaling. If someone had problems with high erpm motors or large motors on the 75/300, it is worth trying this build. Just be careful.

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12

Hi all, how do I connect this to my Unity to upgrade FW to 5.0? I've got it installed to Windows 10, and downloaded and installed the STM Virtual drivers too, but nothing seems to work. Please help!

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12

FWIW after trying the FW update again this morning, it works now, only difference is my laptop is plugged into its charger.

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12

Uploaded FW 5.0 to my Unity, running HFI on default settings works a charm mostly. Worthwhile to note that I had to connect to two different VESC ID's manually to set up HFI on each motor.

Also, when trying to configure HFI when clinking on the Brake icon to test settings the motor only made a momentary "tick" sound, instead of the continuous "whine" on Jeff's video until you click Stop. Hence I couldn't get a graph to fine tune HFI.

During operation I kept my throttle input moderate, but got up to normal max speed which is 40km/h around 90% duty cycle. Once while braking at around 10km/h HFI kicked in for a split second, which didn't happen again.

Notably the new FW / HFI / FOC motor settings may be chewing through battery a little quicker, although hard to quantify without metr Pro stats.

My setup is Unity on an MTB with Trampa trucks and 165mm pneumatics, being driven through dual e-toxx 1:4 Mini GDs by Turnigy SK3 6374 192kV motors at 8S with two Turnigy 4S 6Ah Graphene LiPos wired in series.

benjamin
Offline
Last seen: 10 hours 48 min ago
Joined: 2016-12-26 15:20
Posts: 369

Good to hear that it works, and that even HFI works on the unity. To be honest, I haven't tested HFI at all on the unity until now. I gave the plot a quick try, and for me it seems to work. Keep in mind that you must unplug the remote when making that test, otherwise it will switch off the motor just after you press the button in VESC Tool.

I just uploaded a new build, with the following changes:

  • Performance optimization
  • Disable lzo on old unity firmwares
  • Stormcore support
  • Chibios 3.0.5
  • Hopefully even better observer gain calculation

If someone want to give this a try with a motor that has been difficult before, it would be great to get some feedback on that. I know that some people had problems on larger motors with the 75/300, and this is quite likely to help.

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12

Awesome! Is the new FW the same link as the 1st post in this thread?

Also, when you say unplug the remote, do you mean unplug the Rx, or just switch the remote off? I have a Hoyt Puck, so PPM remote.

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12

Never mind the download link, I see the one above changed to last night's date.

district9prawn
Offline
Last seen: 2 weeks 1 hour ago
Joined: 2018-04-26 12:18
Posts: 69

I've been running a 3kg outrunner with the a200s. On previous firmwares, when coasting at low speed, applying a bit of throttle will result in regen. Playing around with observer gain and observer gain at min duty mostly fixed this.

I haven't experienced this issue on this new firmware with the observer gain changes.

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12

After flashing latest FW, I followed your instructions unplugging the Rx to get a custom HFI setup.

The HFI works perfectly, but outright performance on dual 6374s sucks. A budget hub board would outrun me.

2ADDC5F3-E78C-4D74-B6D6-E21DE15876B0.jpeg

248FF86E-44EA-4553-B253-0D01B791DA97.jpeg

4282153F-806C-4D78-8296-312112EC0A9E.jpeg

2BBA322D-AC65-4850-80BB-0E90784211F2.jpeg

9401D0F3-96D5-4821-9CDD-9C04DA82C458.jpeg

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12

Figured it out, friggen Hoyt Puck was in mode 1, applying expo to the PPM output.

Pimousse
Offline
Last seen: 1 day 1 hour ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 95

Hi Ben,

In order to involve more people into testing, I created a thread on esk8.news : https://forum.esk8.news/t/vesc-fw-5-0-beta-testers-wanted/23342?u=pimousse

Some people start to try the FW 5.00 and report back.

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12

Fixed two cold solder joints in my phase lead connectors which sorted out the random micro braking events, but still getting some cogging during HFI pull offs. Settings are 12V, 4V and 6V for HFI.

Would changing that to 20V, 4V and 10V help at all or am I just too careful, not piling on the throttle enough during pull off?

ma-j-sterelektron
Offline
Last seen: 2 weeks 13 hours ago
Joined: 2017-09-05 09:27
Posts: 13

Finally the testing branch! Very nice! I will test it as soon as I finish my 4WD mountainboard(4 vescs based on HW6, CAN bus, AS5047)

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12
Wisp
Offline
Last seen: 1 week 1 day ago
VESC Free
Joined: 2018-12-24 16:52
Posts: 2

Hey, I initially tried the fw5.0 for Unity as linked in your original post but for some reason the vesc over can couldn't calibrate te motor (but full brake was working). After that I installed the fw again from the following bin: https://github.com/vedderb/bldc/tree/dev_fw_5_00/build_all/UNITY but now the vesc-tool does not recognize the fw so I can't connect to it anymore. Any Idea how I can fix this again? Kinda stuck now.

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12

I had the same problem this morning mate, flashed 5.0 FW from the 29th on my Unity but it wouldn't detect the second motor, reverted to the 5.0 FW from the 22nd, redid detection and PPM calibration and everything is fine again.

So the problem is with the latest 5.0 FW. Try this one from the 22nd instead: https://drive.google.com/file/d/1wMx5QOoYuS7rr5tV61_UHO2jXG3QXwYm/view?usp=sharing

NuRxG
Offline
Last seen: 6 hours 16 min ago
Joined: 2018-09-05 09:53
Posts: 5

The latest tool seems to be missing a bunch of pages for motor and app config.

Wisp
Offline
Last seen: 1 week 1 day ago
VESC Free
Joined: 2018-12-24 16:52
Posts: 2

Unbricked it.

Now when I try to install fw5.0 I get the following message just before finishing installing:

2020-04-01 16:30:45: Status: Serial port error: The I/O operation has been aborted because of either a thread exit or an application request.

I have to restart the Unity to connect it with vesc tool again and I see that no fw update occurred

b264
b264's picture
Offline
Last seen: 5 days 11 hours ago
VESC Free
Joined: 2018-01-14 01:32
Posts: 5

Are we going to have one branch for bugfixes and polishing (like an RC "release candidate" branch) and then another branch for new features (like a dev branch)?

 

I am wondering, because adding big new features to a branch resets much of the testing and polishing that needs to be done to get the code accepted into master.

 

So if, for example, 5.0.0 includes dual motor support, then if a new feature should ship in 5.1.0 then that is typically another branch while 5.0.0 is being tested.  Adding new features to a branch while folks are testing it could become counter-productive.

benjamin
Offline
Last seen: 10 hours 48 min ago
Joined: 2016-12-26 15:20
Posts: 369

The previous update had a bug for the unity that is fixed now. Also, the reason that some pages are missing is that only the pages for the currently selected motor type and app are shown now; I was hoping this makes things less confusing, but maybe it that is not the case.

Are we going to have one branch for bugfixes and polishing (like an RC "release candidate" branch) and then another branch for new features (like a dev branch)?

There is only going to be one dev branch in addition to the master branch for now, and the testing will be done as in this thread in the dev branch. In my experience small changes can cause as many problems as big changes, so any change at all needs sufficient testing. The plan is to do the testing like this, and when that is done merge it back to master.

There have been many changes since I started this thread, but that is because the dual motor support is a radical change that affects almost every single part of the firmware significantly (I have been up late working on it every evening for a month now, really looking forwards to getting it done). As this becomes more stable, there will be fewer and fewer changes, and in the end I will just leave this thread open for a week or so without changing anything so that the last iteration has proper testing by me and volunteers before merging back into master and making it the next stable release.

NuRxG
Offline
Last seen: 6 hours 16 min ago
Joined: 2018-09-05 09:53
Posts: 5

One of the balance users found a slight issue with one of my recent additions. I added a holding current feature where it turns on the current brake when you are not riding, for skateboard style vehicles where you sort of do the jump start mount this is very helpful to keep the wheel steady during mounting, especially on hills. However it seems to be disabling the power button, my guess is that the power button only works when there is no power being output. I thought of a few possible solutions, perhaps having the power button can feed info into apps and let them stop them selves (or maybe even use it as a button), or perhaps allow shutoffs at 0/low erpm even if breaks are being applied. I dont have any hardware with a power switch so I'm mostly guessing here.



*edit* i should add the braking feature is toggleable so for now it can be turned off if using a power switch.

Jfriesen
Offline
Last seen: 5 hours 59 min ago
VESC Free
Joined: 2017-10-24 22:49
Posts: 4

Yes, the push to start feature feeds a bit of current to the enable pin of the logic voltage regulator from one of the phases, so I'm pretty sure the hardware will prevent shutdown if the motor is driven. Could have the power off sequence over-ride the motor drive but that seems a bit scary in some scenarios. 

Jeff

shaman
Offline
Last seen: 2 days 19 hours ago
VESC Free
Joined: 2018-12-09 15:59
Posts: 42

I've been testing my Little FOCer (84V controller) and Cheap FOCer 2 (low-cost VESC 6 variant) on the bench with this new FW. Bench test setup is 2 20uH 30mOhm 150kV outrunners coupled at the shaft. One is acting as a variable load and the other is driven normally. I'm still gathering data at the moment. I'll also be putting this in my ebike after bench testing. It's single motor, low-kV, has 46 poles, and will use a 20S battery. 

NuRxG
Offline
Last seen: 6 hours 16 min ago
Joined: 2018-09-05 09:53
Posts: 5
Starting hall sensor analysis...

Found 6 different states. This seems correct.

Hall diff 1: 53.0 degrees
Hall diff 2: 1.0 degrees
Hall diff 3: 4.0 degrees
Hall diff 4: 3.0 degrees
Hall diff 5: 2.0 degrees
Hall diff 6: 61.0 degrees
Maximum deviation: 60.00 degrees. The hall sensors are significantly misaligned. This has to be fixed for proper operation.

Done. Go to the Realtime Data > Experiment page to see the plot.

Starting hall sensor analysis...

Found 6 different states. This seems correct.

Hall diff 1: 51.0 degrees
Hall diff 2: 1.0 degrees
Hall diff 3: 4.0 degrees
Hall diff 4: 1.0 degrees
Hall diff 5: 7.0 degrees
Hall diff 6: 58.0 degrees
Maximum deviation: 57.00 degrees. The hall sensors are significantly misaligned. This has to be fixed for proper operation.

Done. Go to the Realtime Data > Experiment page to see the plot.

Starting hall sensor analysis...

Found 6 different states. This seems correct.

Hall diff 1: 50.0 degrees
Hall diff 2: 1.0 degrees
Hall diff 3: 5.0 degrees
Hall diff 4: 2.0 degrees
Hall diff 5: 3.0 degrees
Hall diff 6: 1.0 degrees
Maximum deviation: 49.00 degrees. The hall sensors are significantly misaligned. This has to be fixed for proper operation.

Done. Go to the Realtime Data > Experiment page to see the plot.

Starting hall sensor analysis...

Found 6 different states. This seems correct.

Hall diff 1: 2.0 degrees
Hall diff 2: 64.0 degrees
Hall diff 3: 61.0 degrees
Hall diff 4: 50.0 degrees
Hall diff 5: 63.0 degrees
Hall diff 6: 61.0 degrees
Maximum deviation: 62.00 degrees. The hall sensors are significantly misaligned. This has to be fixed for proper operation.

Done. Go to the Realtime Data > Experiment page to see the plot.

I ran hall analyze a bunch of times at 10 amps on my EUC hub motor, and got pretty different results each time.

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12

Installed latest FW dated 2020-04-04 last night and set it up. Had a fair amount more cogging on HFI this morning with the same voltage settings.

It was basically not much help and the slightest incline would see my motor just rocking back and forth.

The last good experience I've had with HFI was based on the FW labeled 2020-03-22-v2 that I had installed until last night.

malJohann
Offline
Last seen: 9 hours 10 min ago
Joined: 2020-03-21 12:47
Posts: 12

Just noticed, I can't connect to the second VESC ID on Unity, whether CAN is green or not, it either gives an error, or just connects to the first VESC ID.

It detected both motors just fine last night though.