The VESC has most things present to achieve boost DC/DC and charging functions. Some controllers on the market feature this. One of the motor phases could be used as an inductor or even an external inductor could be used.
the way that it could work: disconnect a phase leads so you have access to the H-bridge
battery stays connected in the same way as if it were a motor controller.
on the the phase leads input your power supply(Ud) with caps (Cd) in parallel and inductor (L) in series. (referenced to BAT-)
Uo is the battery.
T1 is the bottom switch T2 is top switch
Voting for this feature. It seems like VESC has ALL it takes to run a DC/DC booster. I would like to add it to my custom 150v controller. Ideally, without having to disconnect anything to get into charge mode. Just plug in the DC source.
Now, the "easy" part: Implement it in the software. It would makes sense to add it as an "app" module similar to ADC or IMU modules.
Looking up some examples for the code, it does look pretty simple. Some example from here https://www.electronoobs.com/eng_circuitos_tut10_1.php:
/*
* This is an example code for a BOOST converter circuit made with arduino + feedback
* I've used arduino NANO. We have to set the timer of the PWM on pin D3
* The feedback is connected to A1 and we set the desired voltage with a
* potnetiometer connected to A0.
*
*/
int potentiometer = A0; //The input from the potentiometer is A0
int feedback = A1; //The feedback input is A1
int PWM = 3; //Digital pin D3 por PWM signal
int pwm = 0; //Initial value of PWM width
void setup() {
pinMode(potentiometer, INPUT);
pinMode(feedback, INPUT);
pinMode(PWM, OUTPUT);
TCCR2B = TCCR2B & B11111000 | B00000001; // pin 3 and 11 PWM frequency of 31372.55 Hz
}
void loop() {
float voltage = analogRead(potentiometer); //We read the value of the potentiometer, which is the desired value
float output = analogRead(feedback); //We read the feedback, which is the real value
//If the desired value is HIGHER than the real value, we increase PWM width
if (voltage > output)
{
pwm = pwm+1;
pwm = constrain(pwm, 1, 254);
}
//If the desired value is LOWER than the real value, we decreaase PWM width
if (voltage < output)
{
pwm = pwm-1;
pwm = constrain(pwm, 1, 254);
}
analogWrite(PWM,pwm); //Finally, we create the PWM signal
}
NextGen FOC High voltage 144v/32s, 30kw (https://vesc-project.com/node/1477)
Would be a cool feature to have a DC/DC supply app, so you can just set what voltage/current you want. VESC already operates as a big buck converter and you can use it to run constant current through high power LEDs, or provide a high current constant voltage power supply. The control loop is quite slow and pwm speed doesn't make it great for anything fast though.
+1. It would be pretty cool to be able to charge with one of those pocket-sized 100W GaN chargers or your buddy's MacBook charger. They max out at 20V @ 5A, so being able to boost back up to battery voltage is key.
Hi guys, is there already someone working on it or should I start modifying the firmware (and maybe the board) from scratch?
Maybe ya'll have seen this: https://github.com/vedderb/vesc_tool/issues/141
vedderb himself: https://github.com/vedderb/vesc_tool/issues/141#issuecomment-854424882
I suppose you could set up two profiles in the phone app, one for charging, and one for motation.