Why is there no on/off switch integrated in a VESC

I have also never noticed a voltage drop when I was using car esc and left my lipos plugged in

That’s likely the case for many designs, although I’m sure that ESC manufacturers advise against leaving batteries plugged in for a reason.

Wow I found this thread just now through Google, what timing. I was thinking about how wasteful it is to have a set of FETs in the BMS that have to handle the full current, since the VESC can do current limiting, all we need the BMS for is to check the voltage of each cell, and do balancing when you’re charging.

So I was wondering if we could use a very low current BMS, not run any current through it, and just connect the BMS output to an input on the VESC to put the VESC in sleep mode. Looks like Benjamin has thought about a sleep mode, VESC 4 would take some significant modifications because the battery voltage measurement divider draws 1mA and cannot currently be disconnected, and was talking about putting it on the VESC 6, but I don’t see a sleep mode connector on it.

Anyway, all you people wanting an antispark circuit built into the VESC know that antispark connectors exist now right? With a precharge resistor connected to the tip of the contact? They’re pretty great.

1 Like

The ESC6 we produce include spark switch and XT90 connector maybe you will interested. Below is the model picture of esc6 and can shipping out with waterproof aluminum case next Friday.



ESC6? VESC6? Please tell me the dimensions of that aluminum case.

The dimensions is 100mm*92mm

I feel like this is the only helpful post in this thread that actually addresses my initial point. Thanks for the link - seems like Vedder was indeed thinking the same what I was thinking. Sad to hear that it can’t be added easily to a Focbox or other 4.12 versions.

1 Like

With regards to your actual question (I also understood it as an AS question first as well).

If the hardware is meant to support real “sleep mode” functionality with the Bus rail powered, then some special measures need to be taken to limit the “sleep mode” quiescent currents, if the desired current draw is meant to be in the microamp range.

Actual “sleep mode” could either be done via software or hardware, with “sleep mode” disabling and turning off, as much of the other circuitry as possible, but keeping the MCU powered and in a low-power mode. Hardware solution would be to for example to be able to hookup a switch to the DRV8301’s “EN_BUCK” pin, which by pulling it low shuts off of the buck converter and by letting it float re-enables it. This might be un-ideal, as it would hard reset the MCU with possible erroneous operation.

“Why is there no on/off switch integrated in a VESC” Wasn’t deemed necessary or other solution were found to be better/simpler.


Thank you! The switch seems to be better connected by a cable than it is fixed to the case. Everyone wants to install the switch in the enclosure.

I’ll just quote Benjamin Vedder.

Putting the STM in sleep mode and disabling everything that can be disabled can probably bring the consumption down to below 200 µA for almost everything, the only problem is that the input voltage measurement divider will still draw a bit over 1 mA at 50V input (the blue LED will also consume a bit, but it is not needed). Shutting the buck converter down with the enable pin will turn the 200 µA to something like 2 µA, but the 1 mA still remains. To deal with that it would be necessary to switch off the voltage divider, which requires two small FETs and a few resistors (just using a FET on the low side does not help since the clamping doide in the stm will still sink the current). Adding the two FETs and an input for a power switch could be worth it though, if triggering the switch from software is possible.

Personally I don’t see any issues with a hard shutdown of the MCU. Break out the voltage regulator enable pin and tie it to your power switch and/or BMS output signal. The power LED runs on the 3.3V rail, so that’ll turn off too.

I did some digging and found a couple options for the voltage divider. This circuit only adds one FET instead of two, but you need to set the voltage divider so that the analog input is low enough that the gate gets above the gate threshold voltage, severely limiting your possible analog input range and resolution. image

The other option is to use really huge resistor values, so the current draw is acceptable for long term storage, and then use a capacitor to store that voltage to allow it to be read by the ADC. To get under 1uA at 50V means 50 MOhm total for the voltage divider. The good thing is that the VESC already has a capacitor here, meaning we can just swap the resistors and capacitor for much larger ones and be good to go. Got to make sure the sample rate on this isn’t too high though. https://jeelabs.org/2013/05/16/measuring-the-battery-without-draining-it/

This actually seems like a doable path now, if not something one could recommend widely because of the delicate soldering required.

1 Like

love it - keep the ideas coming. this thread might be good for something after all :tada: You think this could be retrofitted to existing VESCs somehow?

Guys, even if the consumption in sleep mode is about 1mA it means it would take more than a year to empty a 10Ah pack! If you let your discharged battery in sleep mode ( let’s say between 5% and 10% remaining capacity) we are dealing with an order of time of about a month, and I recall that leaving batteries fully discharged for extensive periods of time is not recommended, it should be stored at 60% ( aka about 8 months of sleep mode) Don’t know about you but I personally check/charge my board every three days… Let’s implement this feature!

1 Like

For extended periods of time I would mechanically disconnect the battery anyway. this is for situations where you ride your board every day on your commute - you’d then have to charge it every couple days so 1mA would not be noticeable.

I’m with you:

Let’s implement this feature!

1 Like

And if you have an issue with your ESC and need to de-power fast (e.g. ESC suddenly starting to smell funny, accident etc.) what will you do? You will pull your saftey cutoff loop (a switch already) or deactivate your separate mosfet switch (another switch). Having a massive battery you will need a feature that allows you to separate the battery from the other electronics fast. Even if you have a switch inside the ESC, you still need a separate one, or a loop key for safety reasons. More switches - more complicated - more sources for potential issues. KIS is the way forward. Keep It Simple. The best part in a design is the part you can strip from your design.

I am pretty sure that on a Lou board I’d have the battery disconnected just as fast (if not faster) than I would have removed the loop key. There is a difference between high power eMTBs and commuter boards. I know that as a DIYer I also tend to overbuild and rather use pneumatics etc. but the board that is built that way is not ridden nearly as often as the chinese crap commuter board that is lightweight and stealthy. I need something that is hidden from view and the VESC does not offer that - which is a shame as it could clearly be added without too much hassle. Leave the decision which feature to use then up to the user.

Also to me KIS would be to not have to rely on an additional part (=whatever version of switch) that might fail but have it integrated into the ESC.

Why are we talking about keep-it-simple design in regards to a low-side n-channel mosfet switch like its some space age technology no one fully understands? We already have a fully integrated FOC motor controller to maximize efficiency, this thing in no way is KIS design and its awesome. I’ll take the intelligent designs of bold engineers over the designs of an over-cautious KIS engineer any day. There is literally 6 other low side and 6 other high side mosfet switches in every dual drive eskate board. Statistics will tell you adding one more shouldnt have a big impact on reliability. Trouble is somehow the designs of these guys just havent recieved the same attention as the vesc to maximize reliability. I think a few people have started to get them right now though.

The main reason not to do it with existing vescs is that many people use two and having two parallel switches to drive is a bit strange but would probably work fine. A lot of people had problems with anti-spark switches because the fets are mounted to a tiny pcb with improper thermals. Additionally they may use the switch in a scenario it wasn’t properly designed for. By integrating the power switch onto the motor driver, you know exactly the peak power the switch needs to handle as it is connected right there to the motor driver. You can also sink heat identically to how heat is removed from the other fets . You can just use the same amount of fets you use in the motor driver and know that they will generally see less heat anyways since motor amps>= battery amps. The wiring is also hard to screw up since it is pretty much just connect power to the vesc and plug in your switch.

I do also like the idea of a logic voltage switch. FYI there is an enable switch on the buck regulator of the drv8301 that you could break out to a 2 pin connector to achieve this functionality. Very clean and simple solution and the vesc itself shouldnt kill your battery for at least a few months I’d guess. This solution could get annoying for those with peripheral components connected to battery voltage though as those would need to be independently switched. For instance my battery voltage monitor would be too much passive drain. Perhaps a 2 pole switch controls both a low power battery voltage output on the board and the enable pin on the buck.

1 Like

Wouldn’t a single dpst switch already solve the two vescs in parallel issue?

You’re like the fifth person to suggest the enable pin on the DRV now. I think you could connect the enable pins together between two VESCs without any issues, only thing I’m worried about is noise. The problem is the pin on the DRV are really freaking small to solder to. Hint hint, anyone making VESC 4 derivatives.

I’m less concerned with efficiency or simplicity for simplicity’s sake, and more concerned with cost. Duplicating the high current FETs seems wasteful.

I was thinking about making my own BMS with all the features I wanted, and then I found the like 5 BMS projects on this forum already, and the amount of discussion in those threads is a little overwhelming. I’ll have to do an analysis to see if there are any significant ways to improve over those.

A SPST switch wired to both VESCs would probably also work for the two switches thing. Its just a bit decentralized which makes it a bit weird from a design perspective. But that is just my opinion.

Yeah, it really depends what the cost of your FETs are for the tradeoff. In general it will probably add 1-2 USD to the BOM cost depending. So after markup it does add some non-trivial cost. The thing is that in the event of software/hardware issues it is nice to have an independent circuit from the DRV8301 that cuts power completely… Hard to say if that holds any merit without a lot of hardware failure mode testing. I imagine the fuse should blow during this scenario anyway.

It really is just a systems question and I think many answers here are good answers with trade-offs. My point is just that integrating the power switch onto the VESC as a lowside FET switch offers some interesting advantages, and will definitely draw less parasitic current in the off state; storing your board while your abroad etc. doesn’t require you to open up your board and unplug the battery.

I do agree with the OP that it is strange that a high end motor driver designed for electric skateboards requires you to go out and buy/build a separate power switch that can handle an unknown capacitive load during switching. Saying “just use a loop key” seems to be missing the point. Its a bit complex for a newbie. You should be trying to offer an integrated and simple solution for your customers where possible and this seems like low hanging fruit to me to improve peoples DIY experience.

1 Like

Typical trampa post, nothing constructive or helpful … As you are in business with Vedder and the VESC project, you would be better addressing this potential feature and giving some insight :slight_smile: Also if the ESC starts burning, having a separate switch won’t change the end result, it’s not like you’re faster than any electrical event. For example, even if you short your battery in any way, all the components and soldering would melt and open the short way before you have the time to disconnect. Or simply use a fuse…

1 Like