Because I've just implemented the potentiometer to control VESC HW4.12 via the ADC input, I've never noticed that even with the potentiometer at zero, there are still current consumption.
Is there any way to shut-off or put the VESC in stand-by mode with a simple switch (not a power switch of course)?!
Here it is Duty Cycle controlled, but I will surely use Current Control as soon as I will have finished my mechanical assembly.
It seems to be smooth when I've done some simple experiments, loading the motor by hand.
Have a Nice Day.
Thierry
I've discovered that the Stop Button in VESC Tool do exactly what we need.
So is it possible to use an input ADC2 or UART TX for example to shut-off the VESC?!
Because I've just seen that several persons ask that feature before, I give the link to the request feature in the old forum http://vedder.se/forums/viewtopic.php?t=224
Of course, if it is already implemented, it would be kind to tell us why to use it.
Have a Nice Day.
Thierry
Setting the current to 0 turns of the PWM switching but its not a standby since the MCU still runs the control loop on the ADC values.
mc_interface_set_current(0.0);
You can do this in a custom app or change some code in the ADC app.
Eric
Yes I think I will do that, or use a Switch in UART TX like Benjamin did in it's application example, old website.
Have a Nice Day.
Thierry
The sleep mode from the vedder forums is different, it is about shutting everything down in software and hardware to get a low enough standby current to leave it connected to batteries for a long time when not in use.
The duty cycle mode is open loop voltage control, and if 0 duty cycle and this 0 voltage is requested this will short the phases and is the intended behavior. Current control will switch off the output completely. What is your application? In duty cycle mode when the phases are shorted by the FETs the current draw should not be much higher than the standby current.
Thank you for your answer Benjamin.
I will use current mode because I wanna have a torque control of the motor.
But my question was here to simply have an "On the fly" On/Off switch on the bike handlebar.
I wanna have a very low consumption e-bike to make 200km tours with a single 360Wh batttery.
Have a Nice Day.
Thierry
So that is about 10 hours of biking, on 1300kJ. The controller consumes very little power. I think you can leave it on without any trouble. I never turn mine off when I park for say an hour at home. I bike 70km on 1600kJ.
I just measured the current draw on my vesc-based design on my bike. About 20mA. So during 10 hours, you'd spend about 200mAh on "keeping the thing on". Or about 2% of the 10Ah capacity of your battery. IMHO, not worth worrying . about.
Keep in mind that this 2% "saving" is "completely best-case". So this assumes you reduce the current draw by 100% when turning the vesc into standby during 100% of the time.... So realistically if you turn the VESC into a 10mA standby mode, during half the time you'd be able to save 0.5% of your battery capacity. I'd rather spend my time/money on say a 20% larger battery. (12S :-) )
Yes you are right about 10 hours of biking.
I wanna use the motor only for uphill help, limited to about 100W of assistance.
And yes I've thought to let the VESC "On", and it's possible without too much loss.
I measure about 25mA, so close to your 20mA.
But here at university we always wanna have maximum efficiency and lowest possible losses :-)
The 20% will be a 79W 36V battery in my backpack in case of failure of the main battery.
Have a Nice Day.
Thierry
I definitely need sleep / standby for my application of driving a blower motor in a car https://www.youtube.com/watch?v=6tcKN11p0Pc . I have the Flipsky mini VESC 4.20 (using firmware 5.1) and the idle current draw is 255 mA @ 12V ! That will make the make the car unstartable in 5 days. I searched through these forums and the esk8 ones and the most common answer is to use an external switch which is inefficient. I need an electrical switch that doesn't add any resistance.
Someone suggested using the en_buck pin to switch everything. But I couldn't locate that pin in any of the HW 4.8 schematics on Benjamin's github. I am very familiar with STM32 and tried forcing the nRst pin low. This dropped the power draw to 44 mA. The power use under reset is still quite high according to this @ ~9.5mA. Stop mode only uses ~0.5 mA. But before I try to those lower power states, I'd like to understand where the other 44 mA - 9.5mA (3.3V / 12V) = 41.4 mA are going?
1. LEDs ? There is 1 blue and 1 green, so maybe 20mA @ 3.3V or 5.5 mA @ 12V. Can these be turned off without custom firmware?
2. DRV8302 ? According to the datasheet, EN_GATE has an internal pull down resistor, so that means when the STM32 is under reset, the STM32 pins are in a high impedance state so the DRV8302 will have EN_GATE pulled low, meaning negligible power.
So I have 35.9 mA @ 12V unaccounted for.
255 mA @ 12V seems too high when motor is idle. You must have 3Watts released somewhere, so you should feel the temperature rise of some components, unless some power goes to the motor.
Did you try to configure to "no App" ? A nice way to cut idle power is to remove pcb track (by drilling some vias) between DRV high voltage pins and battery+. Then use a switch to provide this high voltage to the DRV. The capacitors and Fets are always powered but require only a few a microamps at most. This mod was relatively easy on the original 4.12 vesc pcb, but not so easy on flipsky miniVesc and FESC4.12 unfortunately.
16 micro Amps standby should do the trick for you. The VESC 6 MKIV has exactly the feature you are looking for. If can also be set to fall asleep after a time X.
https://trampaboards.com/vesc-6-mkiv-in-cnc-t6-silicone-sealed-aluminium...
No ! the idle current was not that terrible 255mA I claimed. It was a measurement error because I used the 10A range on my multimeter, which is inaccurate (-255 mA actually) due to some kind of burn in? When I measure on the mA scale, the idle power is only 44.9 mA @ 12V.
I did some experiments to break down the power budget:
The 6.2 mA from putting the STM32 to sleep is about right. According to the DRV8302 datasheet, the idle power is ~5 mA
The remaining is probably going to the 5V regulator. What doesn't make sense is calling DISABLE_GATE() to turn off the DRV8302 enable pin, didn't make a difference.
I'm pretty familiar with STM32, so I experimented with different clock speeds (original is 168 MHz, the fastest possible). The lowest I could go was 96 MHz, but that was triggering watchdog time outs, so I ended up using 120 MHz. I don't understand why it needs to be so fast. That's 4800 CPU cycles for each 25 KHz switching period. Many other ESCs use ~10 MHz 8bit microcontrollers.
So now, 34 mA idle is good enough for me. Ther earlier, cheapo ESC drew 58 mA.
According to my measurements, the DRV idle power is a lot less than the microcontroller, so you should switch the STM32, though it might not be possible, or impractical.
That won't fit in the blower motor enclosure unfortunately
Here're my changes to set the clock to 120 MHz
It is logical to shut-off DRV83xx. This could be done via a switch from pin55 and GND. When pin55 is GND level, it is off. This will provide a few hundreds uAmpers current comsumption.
It is recomended to insert a series 1N4148 diod, anode is at pin55, and cathode is at the switch,
A 15nF cap. is inserted with GND and pin 56. This will provide soft start, it is better protection for the IC itself.