bldc icon indicating copy to clipboard operation
bldc copied to clipboard

New feature: control psu flatpack2 over CAN bus with vesc

Open livello opened this issue 2 years ago • 3 comments

There is an electric bike with a 750 Wh battery. I use flatpack 2 48V for charging. I charge on the way several times every 40-60 kilometers. 35A is too much charging current for everyday use. screenshot_2022-04-17_20_20_40

It is required to control voltage and current, send commands via the CAN bus. It seems to me that the easiest way would be to use the engine power limit value as the charger power target.

There are a lot of such power supplies at a flea market at a price of 50 dollars.

The control protocol for flatpack is known. Here are a few projects that I would like to draw on. https://github.com/the6p4c/Flatpack2 https://github.com/tomvanklinken/Flatpack2

Tell me how best to implement such an improvement so that it can be included in the upstream.

livello avatar Apr 17 '22 17:04 livello

Something that this brings up, in seperation from the specific protocol used. Is support for chargers in general. Now that the bms is integrated, having a charger page with charging current and max voltage would probably be reasonable. You could use profiles as well to quickly select what type of charging you want to do. (fast to 80%. Slow to 100%, etc)

Teslafly avatar Apr 17 '22 21:04 Teslafly

@Teslafly thank you! I did it in haste. The next step I plan to add is the charge control application and register the calback in the comm_can.c

https://user-images.githubusercontent.com/15374538/165636411-6e7b3e47-a9cd-43a7-812b-f316f111e7be.mp4

https://user-images.githubusercontent.com/15374538/165636433-a31408fe-5a37-47e2-a20a-3f6124c87c0c.mp4

https://user-images.githubusercontent.com/15374538/165636472-84a9ae6f-7cf4-432e-b7a6-07b6087feb74.mp4

https://github.com/livello/bldc/tree/dev_fw_5_03

livello avatar Apr 27 '22 21:04 livello

This sounds like something that can be done with lispbm and/or with QML scripting.

Very interesting charger! I just ordered one.

vedderb avatar May 13 '22 09:05 vedderb