Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YST-DXT-J20 Mainboard firmware doesn't drive properly #230

Closed
scagdas opened this issue Oct 13, 2021 · 8 comments
Closed

YST-DXT-J20 Mainboard firmware doesn't drive properly #230

scagdas opened this issue Oct 13, 2021 · 8 comments
Labels
question Further information is requested

Comments

@scagdas
Copy link

scagdas commented Oct 13, 2021

Your System

  • VARIANT: USART
  • CONTROL TYPE: FOC
  • CONTROL MODE: SPD_MODE

I have new generation cards with bluetooth. Board has YST-DXT-J20 tag on it and GD32F103RCT6 as main controller. I have successfully flashed the firmware and connected to mainboard with UART however motors doesn't turn with a given speed. Even with low speeds Motor at the mainboard side turns very fast and other one doesn't turn at all. After going through the previously posted issues I have seen some people managed to fix the issue by swapping phase cables so I have tried all combinations of three cables but it didn't fix the problem for me.

photo1634112102

photo1634112101

Any advice how to find and fix the problem?

@scagdas scagdas added the question Further information is requested label Oct 13, 2021
@Candas1
Copy link
Collaborator

Candas1 commented Oct 13, 2021

This board looks really different, it even has an IMU.
Looks like the board with Artery chip, but with a GD32 instead.
Have you checked this link ?
The firmware won't work out of the box, you need to check how the pin mapping differs.

@developmore
Copy link

I have a standard board with STM32F103RCT6. Compiled for i-BUS. Have the same problem. One wheel spins out of control, the other one barely moving.
Anyone knows how to fix it?

@Candas1
Copy link
Collaborator

Candas1 commented Oct 24, 2021

#224

@scagdas
Copy link
Author

scagdas commented Oct 29, 2021

I have compared the pins of this board with older boards and they are exactly the same at least the ones that drive transistors of the H bridges (PH_HI and LO) and HALL cables but for some reason it doesn't work like previous boards. Is there anything else that might interfere with the motors except these pins so I can compare them with older boards?

@Candas1
Copy link
Collaborator

Candas1 commented Nov 6, 2021

Have you tried voltage mode instead of speed mode?

@Candas1
Copy link
Collaborator

Candas1 commented Nov 15, 2021

Came across this comment:
lucysrausch/hoverboard-firmware-hack#97 (comment)

@villamany
Copy link

villamany commented Dec 17, 2021

Hi, try swapping hall pins definition in "defines.h" file, mine works swapping the V / W hall pins on both motors.

Here is mine:

#define LEFT_HALL_U_PIN GPIO_PIN_5//GPIO_PIN_5
#define LEFT_HALL_V_PIN GPIO_PIN_7//GPIO_PIN_6
#define LEFT_HALL_W_PIN GPIO_PIN_6//GPIO_PIN_7

#define LEFT_HALL_U_PORT GPIOB
#define LEFT_HALL_V_PORT GPIOB
#define LEFT_HALL_W_PORT GPIOB

#define RIGHT_HALL_U_PIN GPIO_PIN_10//GPIO_PIN_10
#define RIGHT_HALL_V_PIN GPIO_PIN_12//GPIO_PIN_11
#define RIGHT_HALL_W_PIN GPIO_PIN_11//GPIO_PIN_12

@Candas1
Copy link
Collaborator

Candas1 commented Jan 3, 2022

Assuming this board is the same as the AT32 board, but only with a GD32 instead, those are the differences that are highlighted and mentioned in the discussion I have shared:

  • ADC current reading has to be swapped between phase A and B on the left side in bldc.c
  • offsets have to be reset after each enable in bldc.c (I don't know what's the reason behind this change)
  • current limiting is not working
  • FOC is not working, you should probably try with sinusoidal instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants