Motor ALWAYS spins to maximum RPM

I’m running my motor with the FSESC75100 ESC hooked up to a microcontroller. Everything was working fine until I tried to get braking to work.

At first, I could increase the motor speed by increasing/decreasing PWM (PPM). I had the control set to current within VESC. I wanted braking, so I setup input again from the beginning… and now any input signal to the VESC will accelerate the motor to the max ERPM defined in the motor → General → RPM settings.

Increasing the signal makes it accelerate faster (has more oomph behind it). But even the lowest signal will build up speed to the maximum RPM. I can still get different motor speeds by changing the input to PID Speed Control, but I need regenerative braking and it had different speed levels with current control before.

I’ve combed through all the settings, but I don’t understand them all. Anyone have any suggestions?

Thanks

1 Like

At no load it is normal that the motor will keep spinning up to max speed in any of the current control modes. When riding the board (load applied) it will settle at a given speed according to how much throttle you give it. Just like a car would :slight_smile:

7 Likes

Usually if you are using vesc for an application outside of skateboarding where you need to accurately maintain a specific rpm then you would use duty cycle control mode instead of current control. But don’t use it for skateboards (its scary)

6 Likes

I tried Duty Cycle, I don’t remember what the outcome of that was though. I’ll try it again in the morning.

Issue is that current control didn’t do that before, so I’m not sure what changed. I also still don’t have any ability to break. I had 100amps available for breaking, up to 5000 watts, and have made sure any braking setting I could find was toggled and given a good value.

If I can get the braking to function at least, that would be a step in the right direction.

Do you have a brake current for both the motor and battery? And do you have the esc calibrated to the PWM range you can generate?

Yes, I setup the input and applied it for the PWM range my code produces. I set a brake current limit for the motor at 100a and for the battery at 100A current max and -60A regen.

I remember braking working at one time. I don’t know what changed. But I will test again later and update.

Motor always spinning up to the maximum speed is completely normal unloaded behavior.

Have you tried to ride it?

2 Likes

Professional like always :mechanical_arm:

I see, I suppose that would mean having speed control with Control Type set to current was the anomaly and not the other way around.

When I set the motor type to BLDC, the motor shakes instead of moving and makes unpleasant sounds.

What’s even weirder is that when I set the motor to DC it doesn’t do anything - or so I thought. Apparently, when set to DC it only brakes! I’m happy that to get any braking at all considering I couldn’t before.

Every step up in PWM it adds about 10amps to the braking power - and that is powerful. Can’t even force it to move with my hand after about 70-80 amps.

However, is it not possible to get such braking on FOC mode where the motor can actually move?

1 Like

I don’t have the materials for the board yet, I figured I should get the motor setup first. I’m working on two projects, one of which is the skateboard, but both require a motor so figuring this out is important.

It’s possible that my issues could be resolved by writing some code, but I thought I’d be able to setup the motor properly without having to. Oh well, wouldn’t hurt to learn.

To use BLDC mode, you need to do a motor detection. There is no wizard for BLDC detection, you need to do it manually. Read the ?

2 Likes

Don’t use DC mode unless the motor has brushes and only 2 wires instead of 3

3 Likes

Reading the ? didn’t clarify anything. I just ran motor detection twice, and BLDC mode doesn’t work. I’m not sure if that mode would solve the issues anyway.

I understand DC mode shouldn’t be used, but how else can I have that kind of braking? I want the motor to default to brakes when not given a signal to move.

I think I figured something important. When going from moving quickly to reverse, it seems to be implementing some sort of very very weak braking that I didn’t notice. It then stops that braking when going back to the default PWM.

However, it only uses about 1amp. It was so weak that up until now I thought it wasn’t braking at all. But it must be braking as it doesn’t go into reverse. This weak brake wouldn’t stop it from rolling if I was trying to come to a stop on a skateboard.

If anyone has an idea on what setting could be the issue, that would help.

I’m going to try using ADC input which my microcontroller is capable of. This mode also has current with reverse and braking. Maybe it’ll work :frowning:

From where?

To do the BLDC detection, you need to be in the Motor Settings > BLDC > General > Detect BLDC Parameters area. Don’t use the wizard, that only works for FOC, I think.

For normal sized esk8 motors, try 12A, 150erpm, 0.15 duty. If not working try raising the erpm and reading the ?

To use FOC mode, you can use the wizard (or do it manually).

2 Likes

You can also play with the throttle maps and curves…
I only have experience with ADC, so won’t comment on PWM, but you get to setup the voltage you receive from your remote, and map that to whatever. With the right center value, you can have brakes engaged when the remote is idle. Curves are an extra thing, essentially to sharpen or mellow up your response.
Of course you need to pick the right mode of the ADC input to have brakes and/or reverse, according to your setup.
It definitely works, and shouldn’t take too much time.

What worries me is that it seems like you’re discovering VESC on the back of a 5KW setup…

For eskate we use BLDC (brushless dc) motors, which are fundamentally different from traditional DC motors (brushed dc.) This is normal behavior. The DC mode is not intended to work with the motors we use.

1 Like

Couldn’t post due to the post limit on new members. Very annoying.

Seems like BLDC detection fails no matter what input I use. When I turn the duty cycle up, it’s able to spin the motor, but it’ll say it got bad detection data.

I’ll go with alexnz’s experience and try out ADC - it may be exactly what I’m looking for. Ordered a cable I needed to set it up with the VESC and then I’ll try it out. It actually looks very promising from what I’m seeing on VESC Tool.

LMAO, I am indeed. I’ve worked with DC motors that didn’t even need an ESC in the past. I’d just hook them right up to power and control them with a microcontroller. So this is definitely a new beast.

The skateboard and other project require the kind of control a VESC offers - and getting a weak motor/esc/battery just to learn (which I considered) would alone set me back a couple hundred. Better spent going towards the actual setup I’ll be using.

I haven’t destroyed everything so that’s a plus. I hear dual motor is much better for riding, but adding another 5KW motor would be extremely overkill.

I’m also thinking of having a pressure pad or other on-board way of controlling the board. Having a whole hand taken up by a controller isn’t ideal for me. Being able to just control the board by standing on it is something I’ve been working around in my head.

This will be something I experiment with before actually putting into a board. If I can get it to feel natural, it’ll be a huge step up from a controller in your hand, and a pressure pad naturally creates an analog signal for ADC, so the final setup wouldn’t even need a micro controller since you can adjust curves and such from the software.

Just a thought - but we’ll get there when we get there.

There’s a reason why no one does it.

Not sure what else you plan on doing while riding your electric skateboard.

1 Like

Their reasons aren’t good enough for me :skull:. If I can make it safe and natural for me, then it’ll be how I make the final board. If you fall off the board or anything, no pressure and the board will stop on it’s own.

More pressure on front foot = more speed, less pressure = less speed. With curves adjusted in software, I don’t see a real issue.

A company wouldn’t be able to accomplish this when everyone who rides their board have different weights. They’d need a whole interface for each buyer to input their weight so the software can adjust and that would probably be buggy.

But if tailored specifically for me, I can’t imagine it being an issue. Though I’ll find out when I start testing.