Skip to content
reed-dan edited this page Feb 15, 2024 · 13 revisions

Autodetect

if your board is not listed in the Wiki and you really want to use it, please follow the step below to use autodetect to add support for new layout

Video Tutorial

Preparation

To be able to use the autodetect feature you will need the below parts

  • A constant current power supply set to 24V2A
  • All the electronics from the hoverboard you would want to use except the battery
  • A SWD programmer
  • A ESP32
  • A PC with serial terminal software

Identifying The MCU and SWD Connector

Only GD32f series is supported by autodetect, if you have new mcu please start a new issue with name of the MCU and pictures

SWD connector is typically located near the mcu with 4 pins which is 3V3 GND SWDIO SWCLK (order will vary), some contain a 5th pin NSRST.

image

Serial Port

To use the autodetect, you need to establish connection to the motherboard controller, so you will need to find at least one serial port, all known gen2.x boards use serial0(tx=pa2 rx=pa3) for comms masterslave (this is usually the 4 pin cable between the master and slave boards), as it is very easily accessible we will use it for connecting our ESP to.

The VCC on comms masterslave connector is 12/15v, do not connect it to the ESP! You will fry your ESP.

Flashing Firmware

Download the prebuilt binary

Installation method please see SWD flashing

Flash Repeater Software on ESP

It is suggested to just use your esp32 for autodetect purpose, although not necessary, it will convert the serial voltage to 3.3v for you

The autodetect packet is sent in plain acsii so if you wanted you can use a USB to serial adapter with baud 19200

Flash this firmware on esp, you need to build it your self with arduino ide. Make sure to update your lines on line 22 of the autodetect.ino file to reflect your esp.

` oSerialHover.begin(19200, SERIAL_8N1, 16, 17); '

Connecting Serial Lines

The wiring diagram is like one in remote uartbus but with only one board and no diodes is needed.

Start Autodetect

Connect all the led and motor wires like it original is to the master board, do not connect the bluetooth module, and connect the esp to masterslave cable like mentioned above, connect the battery connector to the Constant Current power supply, and bridge the power button with a piece of wire, all the leds should light up, if not the board is likely damaged.

Follow the guide in the serial terminal to complete all the steps, if the board automatically switches off please start over again, please skip the current DC test unless the motor is mounted to original housing.

Copy all the pin configuration after the steps are finished.