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

If you look at the generic VESC schematic in Benjamins repo, you will find pins PB11 and PC7 for UART Rx, both are 5V tolerant.

Flipsky is using PB11 also.

View attachment 384916
View attachment 384917
View attachment 384918

thanks for that info; I gather FT means 5V tolerant, which makes sense as my board still seems to function;
I have a question about the Tx to Rx paths:
Schematic-6.png shows
RX is PB10
TX is PB111771971592076.png

on VESC_BLDC\hwconf\flipsky_official\flipsky_v6\hw_flipsky_60_core.h
HW_UART_TX_PIN is B10
HW_UART_RX_PIN is B11

They are crossed, which is correct, right?

I have ekd01 RX going to TX on the flipsky

but you are showing 5 as being TxD going to TX?


1771973891932.png

on the EKD01 the manual shows Rx and GND on the same side which you also show (but mirrored) but then you have Rx going to Rx?
(manual that came with the EKD01)
1771973977356.png

but then there is this Varstrom EKD 01 HMI for BAFANG TONGSHENG VARSTROM Conversion Kits which shows GND being on the TxD side, like yours if your pin 3 which is connected to Rx is actually Tx
1771974575170.png
anyhow, something is interfering with the messaging when the emulator gets connected or I configure the input in VESC tool.
until I do that there is no err30. And the rest of the hardware seems to work; motor spins and detects and spins up on app setting of "no app" with the duty, current or erpm sweeps.
On configuration of the input from the emulator, it shows expected oscillations of 2.5 v to 0.5 volts but the PAS signals do not seem to be getting to Hall1 and 2.
 
but you are showing 5 as being TxD going to TX?
This is the controller connector view. Don't worry, if the display works, it is connected correctly.

the PAS signals do not seem to be getting to Hall1 and 2.
Can you show a wiring diagram, what have you connected where? Have you tried to swap PAS1 and PAS2 to test the right rotation direction?
 
This is the controller connector view. Don't worry, if the display works, it is connected correctly.


Can you show a wiring diagram, what have you connected where? Have you tried to swap PAS1 and PAS2 to test the right rotation direction?
After confirming with a bunch of prints on the serial console that I have tx and rx wired correctly,
I connected a throttle and confirmed everything is working. (although not sure why the mph range is from 0 to 19 mph, I guess that's the next thing to look at). Watt doesn't register except on surges because it's just spinning under no load. 1772334420443.png
I have
pa8 torque to adc2
pa9 to to hall1
pa10 to hall2.
I have tried swapping them. Also using a level converter to 3.3, although that may not be necessary.
The whole system is very finicky in that any extra debugging may start generating err30 and the throttle didn't work until after several restarts and reconfigurations.
I really do need to test with the thun sensor in the emulator to isolate whether my hardware sensor works.
 
pa9 to to hall1
pa10 to hall2.
What do you think PA9 and PA10 belong to on the connectors? I can't find any usage of them in the Flipsky hardware config...


For a Flipsky V6 MK5 I find this pinout:
1772360246980.png
The only usable pins for the PAS1 and PAS2 signals are the motor hall inputs with this hardware. But then you have to run the motor sensorless. And I don't know, if the VESC code will throw any kind of error, if there is an unplausible motor hall signal even if the commutation is set to sensorless.

So you can try to use PC6 and PC7 for the PAS signals and set the motor control to sensorless in the VESC tool.

pa8 torque to adc2
ADC2 is on PA6 if you look at the hardware config file.
 
Last edited:
What do you think PA9 and PA10 belong to on the connectors? I can't find any usage of them in the Flipsky hardware config...


For a Flipsky V6 MK5 I find this pinout:
View attachment 385172
The only usable pins for the PAS1 and PAS2 signals are the motor hall inputs with this hardware. But then you have to run the motor sensorless. And I don't know, if the VESC code will throw any kind of error, if there is an unplausible motor hall signal even if the commutation is set to sensorless.

So you can try to use PC6 and PC7 for the PAS signals and set the motor control to sensorless in the VESC tool.


ADC2 is on PA6 if you look at the hardware config file.
sorry, was talking emulator to board with
emul pa8 torque to adc2
emul pa9 to to hall1
emul pa10 to hall2.
On flipsky, as you say adc2, hall1 and hall2 are PA6, PC6 and PC7
I am running motor sensorless
fault in VESC tool is always "none"
now it is working because I had to change pas level from 0

1772390034003.png
 
What do you think PA9 and PA10 belong to on the connectors? I can't find any usage of them in the Flipsky hardware config...


For a Flipsky V6 MK5 I find this pinout:
View attachment 385172
The only usable pins for the PAS1 and PAS2 signals are the motor hall inputs with this hardware. But then you have to run the motor sensorless. And I don't know, if the VESC code will throw any kind of error, if there is an unplausible motor hall signal even if the commutation is set to sensorless.

So you can try to use PC6 and PC7 for the PAS signals and set the motor control to sensorless in the VESC tool.


ADC2 is on PA6 if you look at the hardware config file.
Hello! Could you create a firmware update for the CAN display? I happen to have an MK5 controller.
 
I've tried your firmware with my sw102 but i can't manage to make it work because i get error 30. Has someone had the same issue and can help?

I've also got a flipsky 75_100_V2
 
I
I've tried your firmware with my sw102 but i can't manage to make it work because i get error 30. Has someone had the same issue and can help?

I've also got a flipsky 75_100_V2
I had the same problem, I tried diffrent vesc controller (75100, 75200, 6.7, mkesc) and diffrent sw102 always was error30
 
always was error30
Difficult to debug, as it works for me 🤷‍♂️

@qwerkus reported, that his hardware had an issue.

had to get a logic analyzer to be sure, and I found out what the problem was in case you are still interested: the series resistors on my spintend rx and tx line proved faulty, which made uart erratic. So nothing to do with your code :)
 
Last edited:
Back
Top