-
Notifications
You must be signed in to change notification settings - Fork 29
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
Gen2.1.20 : ClassyWalk: Motor does not spin, can't detect SELF_HOLD, BUTTON, and hall order #90
Comments
Please post the full autodetect log. You should also to run the normal autodetect procedure with "0". Then i think the first pin to detect is the voltage adc VBATT. And anyway, if the HOLD detection does not work, then simply keep the onOff button bridged and skip this detection stage. The hall dectection normaly needs the VBATT, because the pwm ratio must be adjusted for 26V or 36V... |
I can not read the log ouput on your hall video. |
hall detect work normally 3 pin found but no order is valid |
Thanks for the help with this! I'm running Yes, all three hall pins are detected. I failed to paste the logs properly because the buffer is weird in the Aurdino IDE. Creating an entire log has proved problematic, If I run the whole detect routine using, 0 the board just dies when I unbridge the power button. If I detect VBATT (PA4) prior to detecting the hall sensors, hall order detection still fails. The three HALL pins are detected, Every combination of HALL_A, HALL_B and HALL_C have been tested with every combination of the detected hall pins, PA1, PC13 and PC14. None of them make the motor turn forwards and backwards using REMOTE_DUMMY. |
Yes, he could already proceed with a RemoteDummy firmware and simply test the 6 hall permutation with six different firmwares.
|
I only have two color leds to play with unfortunately. There is only green and red (no orange). But they do light up when I manual rotate the wheel when using |
you should use putty as the default serial terminal if you are using windows |
If i remember correctly, my HOLD detection has two stages. First it tries to detect the power fail quickly enough to keep code running. If this fails it will use the autodetect.ino to save the last pin tested and recover that information after repowering. As your board seem to turn off immediately, setting all possible pins to INPUT_PULLUP does not seem to activate the HOLD button. I think you should try to detect as many other pins as possible, so when everything else runs, you have less to try-and-error with the HOLD/BUTTON pins. Yes, if you have detected UP or DOWN, you can manualy define the orange pins as such a one. If the led blinking does confirm that you have found the correct three hall pins, than i think that one of the six possible permutations must do. Because my hall pin detection stage does make the motor spin. So the the activations of the six mosfet seem to work as they are supposed to. My autodetect log output does support the Arduino serial terminal. |
yes this is what i do when i develop on the spin06 board where there is only 2 led driver on master |
I tried using red, green and up and I think this indicates that I have correctly detected the hall pins. I have tried all the possible different orders and nothing worked but I can try again. output1.mp4 |
in fact i probably know why it doesnt work |
Am I OK to flash the board using the power from the ST-LINK? I can't seem to flash the board when it's powered from the PSU. |
@I-hate-2FA The serial is running on a mac currently. I can try putty on Windows. Thanks |
this is gen2, you should always use the stlink to power the board when flashing, gen1 dev dont know what they are doing |
|
I do not think that he needs to change "invert lowside"
As my hall detection stage is already able to make the motors spin. |
No need for putty. He obviously can send comands to autodetect.bin and receive the log output :-) |
Success!! It seems really smooth :) @ I-hate-2FA hinted at how voltage problems and output2.mp4Thanks so much for the help. So the remaining issues I have are:
|
|
The slave usualy gets 5V or 12V via the Master-Slave cable which makes it wake up. |
Your defines you be named |
Is there any lower bound to the voltage I can use. Can I try 12V? I guess it will be slow if it works? |
Concerning the HOLD button.. I guess i would add to main.c
with all the pins removed that you already know to have a different function. Then before the while(1) loop add something like
And then release the onoff button when the dummy starts spinning. |
The button input pin might no longer work if the battery voltage is too low. |
15v |
Thanks, using this method I discovered that hold is PB12 |
So it does need output and digitalWrite(PB12,1) to activate the HOLD transistor ? |
Now in RemoteAutodetect.c on line 365 you could change
to
Then you might be able to release the onOff button after you have choosen the BUTTON detect stage and that way discover the button input |
Maybe better add this code also(!) to line 631, then you can already release the onOff button when the menu appears. |
it is better to connect the button pin directly to your external micro controller and disable self hold, so you can control power to the board on demand(assume the mcu is powered externally) |
You could also set the RemoteDummy speed to 0 and try three possible pins as the hall inputs. @I-hate-2FA , what transistor/optocoupler do you suggest to emulate the onOff button ? @hoverboardhavoc , it would be nice if you are able to find all pins and then made a pull request with your defines....h |
you do not need one, just connect the button connector directly to esp gpio, the transistor is built in the hoverboard, if they have common gnd itll work |
?? the 2pin button (onOff) socket has 36V on one pin ? |
connect gpio to the one that dont have 36v, 36v one is not needed |
yes that might work. But if the other pin is connected to ESP32, it will kill the ESP. |
i already tried it irl it worked on my board |
Having made this change, the autoconfig just seems to go into a loop when doing
|
and itll only make sense if you power the esp externally yes |
Also, just out of curiosity, why was the autodetect not able to do the |
because pinmode output in autodetect is not allowed |
As you can see this OUTPUT + digitalWrite was the way i did it - before @I-hate-2FA convinced me that this might create a short cut on some boards. So i switched to the INPUT_PULLUP method. Yes, you can add |
If i remember correctly this button detect stage also has two parts, one with onoff bridged and one with releasing it. So the code can detect the difference and find the pin. |
I figured out the last piece of the puzzel for the master board,
I'll send a PR in the coming days |
Ok, I've forked the wrong repo! This was a little mind bending. This issue is on one repo, but the code is elsewhere. Maybe it could all be put in the same place? |
no because then you will not be able to download the code in browser |
all big project issue tracker and wiki have seperate repo like esphome |
Yes, This home repo had become to big in size. The GD32 code repo is easy to download. |
Thanks for the pull request. I improved your missing orange led code in bldc.c :
|
Yes, the second uart port (usually PB6 and PB7 ) would be good to have master-slave communication. What empty uart header are you reffering to ? |
The slave board has a red 4 pin header mounted. That might be three additional led outputs. |
it is 2024 we should always use the same uartbus protocol |
|
but i see three little smd transistors above this 4pin header, that is why we think it is another led driver port. Try to trace the PB6 and PB7 of the mcu. I guess at least one of those will lead to the bluetooth module. |
there is 3 pin connector near antenna its highly likely |
This board from Classy Walk hoverboard and has a GD32F130, FORTIOR FD6287T GA1015 and a NCE01P13K 1PKL2. It's marked with OLSZ 0L20190703-V4.1
Master
Slave
Config
The hall order was not detected by autoconfig (see below). Every combination of HALL_A, HALL_B and HALL_C have been tested with every combination of the detected hall pins, PA1, PC13 and PC14. None of them make the motor turn forwards and backwards using
REMOTE_DUMMY
.Hold detection
output.mp4
Hold detection freezes after the
release OnOff button
stage. When the power button is released, the board just turns off.Hall / Hall order detection
output1.mp4
The hall detection works but the hall order detection does not detect the order.
Slave board
The slave board flashes but does not appear to turn on. There is obviously no switch to bridge.
Questions
Flashing
The master board can't be flashed when being powered via the bench power supply but can be flashed when powered via the 3.3V line on the ST-LINK flasher. I read elsewhere that this is bad and the ST-LINK does sometimes behave strangely. (Maybe too much current is being drawn?) Any idea why it does not flash while being powered by the bench power supply and are there any workarounds? Maybe it would be better to have an external 3.3V power supply rather than using the 25.9V bench power supply?
Version number
Any idea how this board would fit into the existing version number scheme? It says 0L20190703-V4.1 on it.
The text was updated successfully, but these errors were encountered: