How to get active parking brake

So why would you need the motor to lock up if you already have an active parking brake?

The vesc is perfectly capable of fully locking the wheels if you give it a position target rather than using current control.

In terms of making this usable during riding my first port of call would probably be to try use the new scripting stuff in vesc.

It should be posible to implement something that says if speed is less than 1mph and throttle is held at full break position then get current position and set that as the pid position target. This would just fully lock the wheels when your stopped and pull full break. It should run happily alongside the standard current no reverse control mode.

Stretch goal, you may even be able to make this toggle with a double break tap if your good enough with the scripting.

9 Likes

Well, I thought there wasn’t any documentation, but I found some!

bldc/README.md at master · vedderb/bldc (github.com)

I was watching Benjamin (an active contributor) on youtube while scripting and he pressed the “help” button in the scripting area and it had a link to documentation! I’ve pressed that button myself several times before and it’s different for me, but I copied the link from the video and here we are.

With this, I’m pretty confident I can set up some good f***ing braking! I have to wait until Sunday to code (not home atm), but this documentation looks very thorough. The documentation is better than that of some programming languages :joy:

I’ve got about 4 ideas on how I could implement it. I’ll start with what’s easier to code and see what works best!

I’ll share code if I get something working.

3 Likes

I’m not trustworthy enough to edit my own posts ;(

I’ll have to see what PID braking can do without code. Might be useful for my other projects.

Though with the power of programming, can probably code something that works better for me.

Well, I got it working… Sort of.

Getting the motor to have amazing braking is as simple as:

(loopwhile t
   (set-handbrake 40)
   (set-handbrake-rel 1.0)
   (set-rpm 0)
)```

And you'd add some conditionals so this only happens at a certain RPM or AD1 frequency. There's a lot of data available.

However, it's noisy and tends to make a click noise. Here's the journey:

VESC Tool that I had installed would not support CAN for whatever reason, and that made it so I couldn't see a LISP tab in DEV TOOLS. I then downloaded the beta version which did let me use LISP - but I needed to update the firmware to be able to use it. The motor simply isn't working very smoothly with this new firmware. Don't get me started on how much I hate QML and LISP.

This is a common issue I've had when first starting with VESC Tool, where running the motor during detection is very smooth and nice, but then after that it becomes shaky, only rotating at higher currents, and even then the motor will be much noisier.

I still can't use BLDC mode, it just can never detect properly. VESC Tool still has a long way to go, but pretty amazing for being free. I'll update once I get everything running smooth.
7 Likes

By the power of not having the ability to edit :slight_smile: …:

And you’d add some conditionals so this only happens at a certain RPM or AD1 frequency. There’s a lot of data available.

However, it’s noisy and tends to make a click noise. Here’s the journey:

VESC Tool that I had installed would not support CAN for whatever reason, and that made it so I couldn’t see a LISP tab in DEV TOOLS. I then downloaded the beta version which did let me use LISP - but I needed to update the firmware to be able to use it. The motor simply isn’t working very smoothly with this new firmware. Don’t get me started on how much I hate QML and LISP.

This is a common issue I’ve had when first starting with VESC Tool, where running the motor during detection is very smooth and nice, but then after that it becomes shaky, only rotating at higher currents, and even then the motor will be much noisier.

I still can’t use BLDC mode, it just can never detect properly. VESC Tool still has a long way to go, but pretty amazing for being free. I’ll update once I get everything running smooth.

4 Likes

Coming along!

What motor are you using, what battery, and what did you select in the motor wizard?

Going back to the original firmware with the current VESC Tool, mCommands.setHandbrake(40) in QML gives a very very smooth brake!

The braking power feels a bit more powerful than what I got on DC mode. The downside is I’m using QML, which I hated more than LISP and was why I was trying to get LISP working.

I’m using the 63100 190KV with a 12S battery.

I’ve gone through the motor configuration a hundred times, switched phase wires, changed manual values, etc… The firmware that the beta version uses simply isn’t playing nice with the motor ;(

2 Likes

Which esc?

That motor should detect easily, but a lot has changed with the beta. A few things you can try:

Use the 750g and 2000g outrunner setting in the wizard

Before running detection change these without testing defaults:

  • Up the switching frequency under foc → advanced. 30khz should be fine.
  • Turn off phase filters
  • change the observer to the regular one
  • manually enter the detection results under FOC from the old firmware into the new firmware

Here is an 8/24 build of beta 6.0 that might work better. I run this on a 12s 6374 230kv board, and I’m pretty sure I spun the 63100 190kv up on the bench testing new features with this version.

I have the same motor, I can give it a try tonight and see how it works.

2 Likes

Well, it’s confirmed, HandBrake does exactly what DC mode does. When it’s active, only two of the three motor wires get hot, and the braking feels very similar.

I have the Flipsky 75100 ESC. Honestly, I end up just resetting the firmware until it eventually works smoothly. Regular VESC Tools is giving me some issues now too.

I’m downloading the version you sent me, looks promising! I’ll update you. Appreciate the link a lot! By the time I got the dev version he had just updated it.

Ohhhh that explains a lot, especially if the firmware is showing as the 75_300_R2.

Definitely disable phase filters.

Also see this thread. The beta firmware there matches the tool I posted.

BLDC detection is easy. Follow the tips in the ? on the detection page. There is no wizard for this.

1 Like

Broooooooo

Bro

No way ;( Flipsky, why has thou hurt me so?

I’m checking out all this info. I was a little iffy with this ESC, which is why I’m putting it in my skateboard and not my other project where I’m looking for a quality ESC.

I’ve changed those values a million times with no success. It’ll spin just fine and give me nothing.

It might be because of this firmware nonsense, I’ll definitely try again after updating it.

1 Like

Isn’t this expected? Only two of the three phases are driven at any one time while the other is used to sense bemf voltage to track position. So a motor that isn’t rotating would be using the same two phases.

2 Likes

Didn’t know that. New to everything :pleading_face:

I noticed a few things. I didn’t ignore input when running the code, so the input and code conflicted causing weird noises. Turning ADC off does the trick, I’ll incorporate it into the code soon.

That beta version you had is much more stable than the last one. The newest one crashes when I even try to look at live data!

I’m not sure how big a difference the new firmware did, but the motor is running smoothly again :slight_smile: BLDC mode still doesn’t work, even after following the steps you put Peter :((

However, I now can use LISP with a nicely running motor! So the real coding begins… once I wake up.

Bed time, I stayed up a lot, I didn’t even notice the time. I also trust Flipsky less now :(( But they do have good customer service and unbeatable prices.

THANKS GUYS FOR THE HELP!

3 Likes

His name’s Brian

1 Like

Peter is also good.

6 Likes

Hold on, so he’s the talking dog? I thought he was a family guy.

3 Likes

More like an Atomic Dog:

1 Like

These wires worry me. 12AWG wires can get pretty toasty carrying so many amps for the braking. For the skateboard, I could add a fan in the encloser with some breathing holes, but it won’t be quiet as easy to get cooling in my other projects.

Anyway, I can read the AD channels right off LISP and set conditionals for how the motor should act. This is what I envisioned when I first got started, exciting!

The ESC hardware is fine and LISP runs smoothly enough. Though, beware of printing to the console in infinite loops :joy: It takes up the entire run-time of the program when you go into Dev Tools and causes VESC Tool to crash. Only option was to reinstall the firmware.

The skateboard materials are crawling their way over from china.

Side Story: I need to drill into some tough thick aluminum and hand tools weren’t doing the job. An adapter should be here to tomorrow to see how good this motor functions as a CNC machine :joy:

1 Like