-
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.5 (ex2.4) ([Submission] Another board layout) #3
Comments
Nice. Maybe these three 8 pin chips are like https://www.infineon.com/dgdl/Infineon-IRS2005S-DataSheet-v02_00-EN.pdf?fileId=5546d462533600a4015364c4246229e1 The 8 pin SO-8 seems to be that dual op-amp for adc amplification: https://hmsemi.com/downfile/HM8631_HM8632_HM8634.PDF (simply search the pdf for C32X Should be no big deal for you to adapt a new defines_2-4.h file. This IM X439 CFC chip might be an IMU sensor ? |
Fine. I added some images to https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/tree/main/Schematics_2.4 the mosfet pins are the same as layout 2.0 :-) But you should check. At least the hall inputs and the adc inputs. See https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/blob/main/Schematics_2.4/hoverboard_gen2-4_pins.jpg Of course the self-hold digital ouput and the on/off button are also important. In fact it would be good if you try to verify all //TODO lines of defines_2-4.h :-/ Keep on going :-) |
Good work. The 8 pin SO-8 seems to be that dual op-amp for adc amplification: https://hmsemi.com/downfile/HM8631_HM8632_HM8634.PDF (simply search the pdf for C32X OutA and OutB lead to a SMD resistor. If not you need to probe the nearby and components to learn where the information of OutX is going. Do you have Keil installed or should I compile for you ? In Keil you can search the defines to see where they are used in the code to understand what purpose they i have. I live outdoors again since yesterday. But I should have some minutes to unpack and open my Toughbook .. |
After probing around for a few hours I think I figured it out. I followed all the components but I kept getting further and further away from the MCU eventually stopping elsewhere then I noticed these two stray leads that went directly from the MCU to the Op-Amp and sure enough I think OUT A goes to PA0 and OUT B goes to PA1. These are the only two pins that set the tester off. I'm not 100% confident about this as there doesn't seem to be any resistors when going this route. But this is the only path I could find leading to any pins. I don't have it installed yet, I'll work on that next 👍 |
That is okay if OUT is directly connected to a ADC input Iof the MCU. That little SMD resistor from OUT to -IN is the feedback resistor of the op amp loop that sets the factor of amplification. Sorry when my instructions had been misleading and it took you several hours. Will update the defines_2-4.h today. But if you plan to install Keil anyway you might want to fork my repo, change the file yourself and make a pull request. I think that is what it is called. |
Gotcha that makes sense. It's all good 👍 I learned a lot poking around and researching different circuits. Once I get Keil installed and setup I'll definitely submit a pull request once I get a working file |
I fear you still need to figure out which of the two adc pins is battery voltage and which is current_dc :-/ Still todo: MOSFET_OUT_PIN |
MOSFET_OUT_PINseems to be an ordinary LED output ?
TIMER_BLDC_EMERGENCY_SHUTDOWN_PINIs initialized here but never used somewhere else in code.
SELF_HOLD_PINThis important pin keeps the mosfet open after the on/off button got pushed !
and turns off power on Shutdown:
What is that ?P6504 8 pin smd chip on the master bottem right ? I guess it is a step down chip from battery voltage (63 Volt smd capacitor) to about 14 V (25V smd capacitor) to drive the gate voltages of the mosfets. But i am not sure if 14V are needed because we have gate-driver-chips anyway which might generate their gate voltages themselves. With the Gen1 boards there is a big TIP127 transistor that is activated by the on/off button an hold by the Supply_Enable_MCU pin. See the schematics i added to https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/blob/main/Schematics_2.0/hoverboard_gen2-0_uart_pins_gd32F130C8.jpg BUTTON_PINthis the on/off (POW) button. So also a connection (i guess with some smd resistor in between) to MCU pin.
CHARGE_STATE_PINThis seems to be a digital input that hast to be high in order to enable the motors:
If we can not find it it should be okay to simply comment this line because chargeStateLowActive in initialised as set = true DEBUG_PINseems to be never used in code. I have updated the defines_2-4.h |
UpdateI did a little studying up on latch circuits and while I can't seem to find a datasheet for this IC I hope I understand the circuit enough to figure this out.SELF_HOLD_PINI'm guessing this is PA6. The Header on the right in order from top to bottom is 12V GND SW. I'm guessing SW stands for Switch and is probably used in another variant of this board or for QC testing which I think would reinforce my hope as setting PA6 should accomplish the same thing as a switch. BUTTON_PINPA5 TODOI still need to find the CHARGE_STATE_PIN as this would be nice to have as a backup incase the battery voltage gets to low. NotesIf the MOSFET_OUT_PIN seems to be for an LED output it is probably for some boards that have other external LEDs like the ones with it on the front and back. My boards don't have those so I don't think I need to worry about it. I'm also not going to worry about the TIMER_BLDC_EMERGENCY_SHUTDOWN_PIN as I wouldn't even know what this is referring to. Possibly some older models with a timer IC to prevent overheating? As you pointed out it isn't used again so I don't think I'm gonna worry about this one either. This also goes for the DEBUG_PIN as I can just use UART and the LEDs for some basic debugging. I finally got Keil installed on my machine, I thought I was having driver issues for the longest time but turns out my ST-Link was bad. I ordered a new one and it should be here soon. |
Nice to hear from you again :-) I will compile a firmware for you later this day. |
So here the first test binaries: HoverBoardGigaDevice/BinariesToTest/ Please check the new defines_2-4.h before flashing. Here some ideas in yellow for better understanding of the step down regulator: |
Gotcha 👍 I'll go chase more of those traces today and try hooking up a battery. The overlap at the bottom is because they put the traces on top of each other on opposite sides of the board, I'll redraw that later today so it makes more since |
Hi, I have hoverboard with exactly same PCB but another processor. There is MM32SPIN 05PF inside. Is this processor equivalent to GD32F130C8T6 or will the necessary firmware be different? |
you should look in mm32 repo |
As your board will be 2.4.5 , yes please start a new issue and post photos from the front side with cables bent outside so as much as possible is visible of the Mainboard. You can install the pinFinder firmware of AiLife to verify the pins and then switch to his sinusoidal firmware. |
My Board:
I have another board with another different layout 😅
Layout of Board A (Master):
Layout of Board B (Slave):
Plan:
I saw this submission and will be trying to also document my board using the same process. I just ordered some needle probes for my multimeter as well as a digital microscope for better close up imaging. Those will be here by the end of the week.
Steps:
The Steps I plan to follow:
I decided to create a new issue because my board is different from the other submission I and figured it would be easier to keep things organized this way. I will update this thread with more info as I go. I am pretty new to imbedded firmware but look forward to learning as much as I can to help get this layout documented as well.
The text was updated successfully, but these errors were encountered: