Open dexterbot80 opened 8 months ago
As i said, STM cube mostly does not work with gen2.x boards.
Install Keil IDE.
As i said, STM cube mostly does not work with gen2.x boards.
Install Keil IDE. I installed already- i need to open SRC files like this ? My eyes flassing like hoverboard leds :)
![]()
Open the Keil project file. I think it is https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/blob/main/HoverBoardGigaDevice/Hoverboard.uvprojx
Then F7 Then F8
Open the Keil project file. I think it is https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/blob/main/HoverBoardGigaDevice/Hoverboard.uvprojx
Then F7 Then F8
![]()
Electrical consumption encrease at 0.13Ah and battery yelow led is on :)
Looking good, to guess. Make sure your layout 14 is set in config.h
Now trace the three hall pins with a diode tester.
If possible, flash the slave board. Then you can also select remoteUart and check the Esp32 serial connection to that left four pin header. Only connect tx rx and gnd. Also check that you have 3.3v on the MCU. You can measure that at the flash header...
Looking good, to guess. Make sure your layout 14 is set in config.h
Now trace the three hall pins with a diode tester.
If possible, flash the slave board. Then you can also select remoteUart and check the Esp32 serial connection to that left four pin header. Only connect tx rx and gnd. Also check that you have 3.3v on the MCU. You can measure that at the flash header...
I need to douwnload your updated project and uncomment layout 2_14 here ?
Of course you need my latest changes :-(
define LAYOUT 14
Of course you need my latest changes :-( okkkk, now the battery led flashes when i rotate the wheel in all 3 colors
All three led show up ? And always two Led overlap ? Then my guess for the hall pins was correct :-)
But then the motor should do something.
RemoteDummy selected in config.h ?
All three led show up ? And always two Led overlap ? Then my guess for the hall pins was correct :-)
But then the motor should do something.
RemoteDummy selected in config.h ?
The video made may Show only Red and Green Led. Sure you attached the led module with three led. Ah yes only the slave board has all three transistors for three led on board.
So continue with the slave board = no buzzer.
I still wonder why no motor movement at all...
We may need to verify the 6 MOSFET output pins.
The wheel
We may need to verify the 6 MOSFET output pins.
Now the wheel does not oppose the resistance like when I uploaded the previous firmware But the led lights up in all three colors when I rotate, Green, Orange and Yellow And yet compared to the other side that does not have the correct firmware loaded, it oppose little resistance
Slave board ?
Slave board ? This is the slave board Yes - Just on the slave board i have RX TX connector for remote
You could check with your oscilloscope if there is some pwm on the three motor phase cables. Which layout did the motor give some constant load while turning by hand ?
Please remove the orange 3.3V line from flash header to flash dongle.
Please remove the orange 3.3V line from flash header to flash dongle.
You could check with your oscilloscope if there is some pwm on the three motor phase cables. Which layout did the motor give some constant load while turning by hand ?
Please remove the orange 3.3V line from flash header to flash dongle.
ok, i have ths configuration now
Of you see pwm on any of the three phases to gnd then the six MOSFET poms should be correct. If you also see pwm between two phases, the motor must move...
No 3.3v on flash header please
Of you see pwm on any of the three phases to gnd then the six MOSFET poms should be correct. If you also see pwm between two phases, the motor must move...
No 3.3v on flash header please
I uploaded Layout 10 and motor moves for 2 seconds
Study the differences to defines_2-10.h
Deactivate the two analog inputs. The two pins probably are wrong and the wrong readings disables the motors from spinning. So add // here
// ADC defines
//#define VBATT PA4 // todo
//#define CURRENT_DC PA6 // todo
Deactivate the two analog inputs. The two pins probably are wrong and the wrong readings disables the motors from spinning. So add // here
// ADC defines //#define VBATT PA4 // todo //#define CURRENT_DC PA6 // todo
In layout 14 ?
Of course with 14 compiling
Of course with 14 compiling
If i comment this 2 lines i receive an error when i try to flash
When F7 succeeds, the code is not the problem. I need to drive the next 30 minutes to find a nice place for the night.
When F7 succeeds, the code is not the problem. I need to drive the next 30 minutes to find a nice place for the night.
When F7 succeeds, the code is not the problem. I need to drive the next 30 minutes to find a nice place for the night.
This move is with Layout 10 code compiled But with the layout 10 just the Green led flashes when i rotate by hand
When F7 succeeds, the code is not the problem. I need to drive the next 30 minutes to find a nice place for the night. Target not created.
![]()
Copy the two adc pin definitions from defines_2-10.h
Sorry, I go to sleep.
You can still try remote_uart and get the Esp32 serial working ..
Copy the two adc pin definitions from defines_2-10.h
Sorry, I go to sleep.
You can still try remote_uart and get the Esp32 serial working .. Good night @RoboDurden , I discovered some settings that make the engine move more :) Also, my boards are equipped with the GD32F130C6 microcontroller and GD323230 was defined in the code. I also discovered here that the battery was defined as 36V - I changed the code lines for 24V (I have a 24V battery)
![]()
Now the motor seriously vibrates when I load Layout 14
The target must be GD32F130C8 for the C6 variation as well. C6 only has 32 kB but code compiles as well.
Battery cells are defined to be 6 which is even less then 24 V
In this line, the code execution is put on hold until the onoff button is released: https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/blob/98d683380cdbe42aa894859dd9e262247d8eeb7d/HoverBoardGigaDevice/Src/main.c#L333
Disabling it here might help you: https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/blob/98d683380cdbe42aa894859dd9e262247d8eeb7d/HoverBoardGigaDevice/Inc/config.h#L48
Motor heavily vibrating is good. But only with the gd32f130 target selected.
Then you simply have to test all six possible pin permutations of
// Hall sensor defines
#define HALL_A PA0 // robo just guessing !
#define HALL_B PA1 // robo just guessing !
#define HALL_C PC14 // robo just guessing !
Acb,bac,cab,cba,bca One of them should get you smooth rotation.
Don't mess with wrong layouts and wrong target !
You should also check that the led colors are correct:
#define LED_GREEN PA15 // robo from photo
#define LED_ORANGE PB3 // robo from photo
#define LED_RED PB4 // robo from photo
Set this to
#define LED_GREEN PA15 // robo from photo
#define LED_ORANGE TODO_PIN // robo from photo
#define LED_RED TODO_PIN // robo from photo
and check if indeed the green led is still blinking.if red is blinking then set led_red to be pa15, etc. Do that for all three known led pins.
Post your final pin definitions for the three led and the three hall pins here so I can update the defines_2-14.h file.
Hello @RoboDurden // Hall sensor defines LAYOUT 14
iN THIS CONNECTOR I HAVE FRONT LEDS - ONE LED ON MASTER BOARD AND ONE ON THE SLAVE BOARD ALTHOUGH THERE ARE 3 PINS IN THE CONNECTOR THE LED CONNECTED HERE ONLY HAVE TWO WIRES THE PIN IN THE MIDDLE OF THE CONNECTOR IS IN THE AIR
Now I will try to see how to identify the 3 phases
Pb11 ? Then you should have seen only two Led blinking
Pb11 ? Then you should have seen only two Led blinking
Pb11 ? Then you should have seen only two Led blinking It's true, when I turned the battery LED by hand, it lit up in three colors
Considering that the PC13 pin reaches the middle of the connector where I have the LEDs that light up in front - which pin do I define for #define MOSFET_OUT ????
If you are not sure of a pin then set it to TodoPin
If you are not sure of a pin then set it to TodoPin
I was 90% sure that this is what you will say and I set PF4 I'm making a video so you can see what happens Something is still not right
I have to learn how to identify the pins of the 6 mosfets and the #define MOSFET_OUT pin
THIS IS WORKING BUT THE SOUND IS NOT VERRY WELL
I am not sure if that #define MOSFET_OUT PF4 is the correct one
I don't see anything happening in your video
MOSFET_OUT is just a tiny onboard led
Get the three colors right. And the three hall cables until vibrating turns into smooth spinning.
Check my 2.0 MOSFET tracing jpg.
Check my 2.0 MOSFET tracing jpg.
I don't know if it's ok, the consumption without load is somewhere around 3.5A Here I have no idea if it's good - the mosfets get pretty hot
Might different values be needed considering that I have 24V motors?
It should only be 0.7A. Check phase to phase with oscilloscope. Have you tried all six hall permutations ? 24V is okay . I currently drive my solar car with 24v
It should only be 0.7A. Check phase to phase with oscilloscope. Have you tried all six hall permutations ? 24V is okay . I currently drive my solar car with 24v
Maybe this #define DEAD_TIME 60 is not right but I don't know how to measure it
No layout so far needed such a timing adjustment . Check master board.
No layout so far needed such a timing adjustment . Check master board.
I agree with you, but I don't think it's ok to heat up the motor and mosfets without load. So I think something needs to be finished here
I do not like to repeat myself . Especially when I'm driving in my Solar car and it is frozen cold
No layout so far needed such a timing adjustment . Check master board.
I have now uploaded the firmware to the master board and you can hear how it sounds. Maybe I'm doing something wrong here, but I don't know what - I have another hoverboard exactly like this one and with the original firmware, you can barely hear it when it was working. I will keep trying until I get the hang of it :) Thank you @RoboDurden
Awful noise. Have you tested all six hall permutations ????????????
Have you verified that all three phase to phase oscilloscope readings look alike ????
Maybe the hall sensor positions inside the motor are non standard and indeed another timing is needed for these bldc motors. But we have already tested dozens of different hoverboard motors.
I will need to rewrite the ADC pin code to disable curreentDc ADC. Wrong readings might kill the timing.
You can also try all six phase cable permutations! Should be the same as swapping the hall cables. But with non standard hall sensor positions, this might be good to test.
Now recharging 1 kWh for the 55 km trip today at a free E-Bike charging station.
Hello, First of all I want to congratulate you on this project. Very useful for bringing broken hoverboards back to life.... I have two pieces of this model and would like to be able to actuate them simultaneously from an RC remote control to create a 4-motor RC platform. Have you seen this model before? Can someone guide me? Thank you
![SLAVE](https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/assets/47325794/24697d6d-4806-4d01-8550-ebe7a04bb584)