VESC - Flipsky 75100 V2 with Bafang Display and T15/T17 BB-Torque Sensor

stancecoke

100 kW
Joined
Aug 2, 2017
Messages
1,964
The Flipsky 75100 is available at a very reasonable price and in a pedelec-compatible housing. However, the VESC is hardly suitable for e-bikes due to the lack of display and torque sensor support. This has challenged my tinkering instinct ;)
Luna Cycle has already implemented the Bafang protocol for its BBSHD controller, so I “only” had to port it to the Flipsky hardware.
For the torque sensor I put the PAS signal on the servo input and the torque signal on ADC2.
The VESC tool still works for setting up the motor, but the app setting must not be done with the VESC tool at the moment, as it does not (yet) know the new functions.
Currently it only runs on the test bench, the torque sensor signals are emulated by a blackpill board.
Next I have to install the controller in my tinker bike and do a real test ride :cool:
Commits · stancecoke/VESC_BLDC

Flipsky%20wiring.PNG

A little teaser on Youtube:

regards
stancecoke
 
Last edited:
But the uart is used for reverse
We could use one of the unused wires on UART2 for reverse, if needed. Or attach the display on UART2
There will be many individual wishes that only can get fulfilled with individually compiled hex files. 🤷‍♂️
It would be great, if all could be set up by the VESC Tool, but for me it's much more difficult to compile a new Windows .exe file for the tool, than to compile a hex file for the hardware :LOL:

regards
stancecoke
 
Last edited:
For me it is not for a flipsky, it is for 3shul cl1400. I am looking for a display, but havent really found what I am looking for.
I want to be able to get lap times, battery info, change profiles and things like that from the display. Preferably with buttons on the handlebar but the display mounted elsewhere :) Oh, it needs to be waterproof too..
Problem is I dont know where to start when it comes to programming, so a solution like this is probably out of reach.
 
For me it is not for a flipsky, it is for 3shul cl1400. I am looking for a display, but havent really found what I am looking for.
I want to be able to get lap times, battery info, change profiles and things like that from the display. Preferably with buttons on the handlebar but the display mounted elsewhere :) Oh, it needs to be waterproof too..
Problem is I dont know where to start when it comes to programming, so a solution like this is probably out of reach.
I found a display very close to want you want. Has lap times, bms connectivity, different modes, center mounted but has a hand control's on the left side as well, I believe at least water resistant. Even has different display modes to change info shown. Problem is its fardriver protocol though, and I've got no clue where to source just the display. I learned about it because it comes with VTB ventus one emoto, or their controller for surron bikes, if you want to look more into it. I'm not smart enough to figure out how to get it to play nicely with VESC but I wish someone could. I asked EBMX (vesc surron controller company) and they said they actually considered using that display but passed it up. I really hope they would reconsider as its by far the best display I've seen for any ebike. Probably will try to get ebmx to reconsider supporting it for their controller. 1728530950541.png
 
Next I have to install the controller in my tinker bike and do a real test ride
So, successfully done, offset and gain still had to be set appropriately, then it worked. :cool:
I added the current hex file to the repo, compiling always scares off many potential users...
I switched back to known defines, to make the VESC Tool able to set up the app again.
You have to use this settings:

index.php

index.php

index.php



regards
stancecoke
 
Last edited:
Do you plan to add support for an external speed sensor?
Hm, there is support for an external speed sensor already, as Luna uses the VESC for a middrive motor. But the function that reads the external sensor is not ported to the flipsky hardware yet. Luna uses Pin PC9 for the sensor. The Flipsky 75100 has not routed out the PC9 pin. We would have to use the Rx pin (PC11) from the UART2 connector on the Flipsky hardware. :)


Will follow your progress on this.
There will be no further development from my side, perhaps we can optimize something by a specific request of a user.

regards
stancecoke
 
Last edited:
is not ported to the flipsky hardware yet
I've just added the necessary functions from the Luna BBSHD and set the speedsensor pin to RX2, but I have not tested it in hardware yet and have not uploaded the hex file to github. But it compiles without errors.

Perhaps I will find the time to test it in hardware this weekend. If it works, I'll update the hex file in the repo.

regards
stancecoke
 
Last edited:
Perhaps I will find the time to test it in hardware this weekend. If it works, I'll update the hex file in the repo.
I've tested it successfully on the test stand now. :cool:
I've updated the hex file @github and added the speedsensor in the wiring diagram.

Flipsky%20wiring.PNG


Of cource you will have to add an external speedsensor even for a direct drive, as the speed source is hardcoded and not switchable in the VESC Tool.

regards
stancecoke

1729873386716.png
 
Last edited:
Hi, that's great! I have a BBSHD and FS75100 and I want to connect them. But is it possible to connect a regular PAS without a torque sensor? Will the brake sensor on the ADC2 work?
 
But is it possible to connect a regular PAS without a torque sensor? Will the brake sensor on the ADC2 work?
The VESC has support for a quadrature PAS already. The break sensor on ADC2 is for linear regen normally, you can't do regen with a mid drive anyway.
Luna has the gear sensor on pin PA7

regards
stancecoke
 
Last edited:
Thanks for the answer! I know I can't use regeneration, I need to use the brake handle as a limit switch to turn off the engine.
 
I need to use the brake handle as a limit switch to turn off the engine
For this you need a digital pin, not an analogue one. The VESC has the option to use "buttons" in the ADC app somehow, but I have never read, how to use them.
https://github.com/vedderb/bldc/blob/5bffbeef0d79b9347ce4372d7c1ab369f539096e/datatypes.h#L649
It seems, the button only triggers the regen by the normal throttle. So not the function, that you want.
Just stopping the motor by pulling the break lever with a simple digital switch is not implemented in the VESC yet. Maybe I'm wrong. I'm not that familiar with the VESC. There is a hardware break function, but I guess that's the safety function, that disables the PWM output in case of an fault.
https://github.com/vedderb/bldc/blo...3c8df05bcebe9349a6/motor/mc_interface.c#L1963
Luna has implemented the gear sensor, it's quite similar, but does not stop the motor permanently.

1730031070609.png
 
Last edited:
I already have one Vesc controller installed and it works with a gear motor. The throttle control is motorcycle type and in order for the engine to turn off, I installed the brake limit switch on the ADC2 as regeneration. Turning off the engine is very important with a motorcycle throttle. On my other bike I have a BBSHD with the same throttle. In general, I had an idea to transfer the Luna firmware to the 75100, I am not a programmer, but as far as I understand, you need to compare the original files and change the 75100 hardware configuration based on the Luna configuration. But I'm afraid to ruin the controller.
 
Last edited:
In general, I had an idea to transfer the Luna firmware to the 75100
As far as I understand the Luna code, it has no digital brake line also. But it is no problem to add that two lines of code to the ADC app.

regards
stancecoke
 
I need to use the brake handle as a limit switch to turn off the engine
I've just added this function on the last free input line, UART2 Tx.
It could be used as a gear sensor input also, but currently it stops the motor only as long as the UART2 Tx line is pulled to GND.

regards
stancecoke

Flipsky%20wiring.PNG
 
Last edited:
sport eco switch
Bafang calls the levels just 1 to 5, not eco, tour, sport, turbo or something like that.
The Bafang protocol is well known, you can use any parameter to define individual functions for them, if you want.
See the manual of a Bafang display

regards
stancecoke
 
Bafang calls the levels just 1 to 5, not eco, tour, sport, turbo or something like that.
The Bafang protocol is well known, you can use any parameter to define individual functions for them, if you want.
See the manual of a Bafang display

regards
stancecoke
like on the controllers like torp and ebmx they use vesc but the bafang display has sport and eco how can i do that?
 
Bafang calls the levels just 1 to 5, not eco, tour, sport, turbo or something like that.
The Bafang protocol is well known, you can use any parameter to define individual functions for them, if you want.
See the manual of a Bafang display

regards
stancecoke
im using it for a mid drive surron motor
 
Back
Top