Braking Help - FSESC 4.12 50A and Backfire Hub Motor controlled by Arduino

I am building a small power wheelchair for a child using two Flipsky VESC to control Backfire Longboard Hub Motors.

I am using the development branch of the RollingGecko/VescUartControl library to control the VESCs via an Arduino Mega. The two VESCs are each connected to a hardware serial port and using UART communications.

Whether I apply braking via SUART.setBrakeCurrent(40) via the Arduino or using the anchor icon in VESCTool I only feel a little resistance to rotation of the wheels.

I would like to be able to hold the device in place on a slope. I am new to using VESCs and would appreciate any advice.

Here are a few pictures of the device so far. Steering and maneuverability are excellent. I just need to figure out braking. Then I will add the floor, seat, rear bumper and tail lights.


Awesome work you are doing! I’ve wanted to try this concept out for a while for a cheaper mobility chair alternative.

Unfortunately braking on slopes is a well known issue with our controllers using magnets to hold position.

Have you tried playing with the settings for forward and reverse control so that you can “reverse” just enough to keep the operator still?

Side question, how are you handling the steering?


I am using a Wii Nunchuck using differential steering code that I have hacked together.

I am setting wheel motor speed by RPM and currently have max RPM limited to 3,000.

Here is a video of it driving around. I did a poor job driving while distracted by the phone. At the beginning of the video it is locked which is indicated by the right and left status LEDs being red. Holding down both buttons on the nunchuck for two seconds unlocks the vehicle and switches the status LEDs to a battery indicator. Currently it is in need of a charge.

I may starting adjusting amperage supplied to the motors in code on the Arduino to approximate braking. I was hoping that the VESC would take care of that but I am just getting started with VESCs.


That’s awesome man.

Thank you. I plan to publish plans, parts lists and code when I finish.

After this build I plan to use a larger frame and 8.5" to 10" wheels for the next version. This one is for mostly or only indoor usage.

1 Like

Right. Code… Not my jam. Lol. I have an electric wheelchair that has huge hub motors. Been wanting to make something with it.

So you are saying that changing these settings highlighted below has no impact on braking performance when using Arduino as the control input?

What do you have them set at?


What about this, what is it set at?


Also, did you try playing with smart reverse?


I have Motor Current Max at 30.00 A Motor Current Max Brake at -30.00A and Battery Current Max Regen at -30.00 A.

IB was 3.00 A. I tried values us to 30.00 A and did not feel a difference testing with the “Full Brake” anchor in VESCTool.

This is the amperage when I click the “Full Brake” anchor and rotate the wheel. This is similar whether IB is 3 or 30.

I had not realized that the (!) icons beside IB and HB turned those on. HB > 10 is exactly what I need. Now I need to figure out how to activate that from the Arduino.

Thanks for getting me moving in the right direction.

1 Like

Looks like COMM_SET_HANDBRAKE is what I need.

	int32_t ind = 0;
	mc_interface_set_handbrake(buffer_get_float32(data, 1e3, &ind));
} break;

Instead of calling

	int32_t ind = 0;
	mc_interface_set_brake_current((float)buffer_get_int32(data, &ind) / 1000.0);
} break;

I have not yet resolved the braking issue but wanted to share updated build pictures. It transported a person for first time last night. Rolling resistance was a challenge on carpet. I have ordered 8.5" hoverboard wheels and will try them on the back.


So dope man. I want one

How are you getting the hubs to attach to the aluminum extrusion?

I have switched to larger wheels to better handle driving on carpet. The ESkate wheels were mounted below a single extrusion using a 3D printed solid plastic block, two bolts and two t-nuts to secure the shaft coming out of the wheel hubs.

For these larger wheels I mounted on top of the extrusion to maintain the ride height. These are from a hover board and I was able to obtain the original metal clamping piece. I doubled up the extrusions with a spacer between and printed a solid block to complete the mount.

1 Like

Looks great! Did you tap the extrusion or just use t nuts?

I used t-nuts and two 4mm screws with the ESkate wheels.

I tapped the extrusions for 6mm screws with the hoverboard mount.

The 4mm screws and t-nuts held well with the ESkate wheels. Initially I was printing the mounts with 40% infill. I broke a few mounts before printing at 100% infill.