mirror of
https://github.com/EFeru/hoverboard-sideboard-hack-GD.git
synced 2025-07-27 09:39:33 +00:00
Update README.md
This commit is contained in:
parent
836e321549
commit
72289747e7
44
README.md
44
README.md
@ -1,27 +1,24 @@
|
||||
# hoverboard-sideboard-hack-GD
|
||||
|
||||
[
|
||||
[](https://travis-ci.com/EmanuelFeru/hoverboard-firmware-hack-FOC)
|
||||
[](https://www.gnu.org/licenses/gpl-3.0)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=CU2SWN2XV9SCY¤cy_code=EUR&source=url)
|
||||
|
||||
This repository implements the firmware for the hoveboard sideboards. The hoveboard comes with two identical sideboards that can be flashed with this firmware.
|
||||
|
||||
The sideboards comes in two MCU flavours:
|
||||
- [GD32F130C6T6](/docs/GD32F130xx-Datasheet_Rev3.3.pdf) -> use this repository if you have a GD32 MCU
|
||||
- [STM32F103C8T6](/docs/stm32f103c8-Datasheet.pdf) -> use my [other repository](link) if you have an STM32 MCU
|
||||
### If you have an STM32 sideboard check-out the repo [hoverboard-sideboard-hack-STM](link)
|
||||
|
||||
---
|
||||
## Hardware
|
||||
|
||||
The original sideboard hardware supports one 4-pin cable that originally were connected to the hoveboard mainboard. They break out GND, 12/15V and USART. Additionally, two ports are used to connect to the LED boards. On the back of the board, two Photo Interrupter Optical Switches can be found, originally used to detect if a human is standing on the hoverboard.
|
||||

|
||||
|
||||
The original sideboard hardware supports one 4-pin cable that originally were connected to the hoveboard mainboard. They break out GND, 12/15V and USART. Additionally, two ports are used to connect to the LED boards. On the back of the board, two Photo Interrupter Optical Switches can be found, originally used to detect if a human is standing on the hoverboard.
|
||||
|
||||
The [GD32F130C6T6](/docs/GD32F130xx-Datasheet_Rev3.3.pdf) pinout is shown in the follwing figure:
|
||||
The sideboard heart is a [GD32F130C6T6](/docs/GD32F130xx-Datasheet_Rev3.3.pdf) with the pinout shown in the follwing figure:
|
||||

|
||||
|
||||
The sideboards, also called sensor boards, feature an [MPU-6050](https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/) from Invensense. The MPU-6050 determines the board orientation by combining a 3-axis gyroscope and a 3-axis accelerometer on the same silicon die, together with an onboard Digital Motion Processor™ (DMP™), which processes complex 6-axis MotionFusion algorithms. The DMP™ offers many features, such as:
|
||||
* Accelerometer and Gyroscop raw data output
|
||||
A very important component of the sideboard is the IMU [MPU-6050](https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/) from Invensense. The [MPU-6050](https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/) determines the board orientation by combining a 3-axis gyroscope and a 3-axis accelerometer on the same silicon die, together with an onboard Digital Motion Processor™ (DMP™), which processes complex 6-axis MotionFusion algorithms. The DMP™ offers many features, such as:
|
||||
* Accelerometer and Gyroscope raw data output
|
||||
* Quaternion output
|
||||
* Temperature output
|
||||
* Pedometer
|
||||
@ -29,10 +26,10 @@ The sideboards, also called sensor boards, feature an [MPU-6050](https://www.inv
|
||||
* Low-power modes
|
||||
* Self-test and calibration
|
||||
|
||||
The MPU-6050 pinout and orientation of axes is shown in the follwing figure:
|
||||
The [MPU-6050](https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/) pinout and orientation of axes is shown in the follwing figure:
|
||||

|
||||
|
||||
For more details check-out the [MPU-6050 datasheet](/docs/1_MPU-6000-Datasheet.pdf) and [MPU-6050 registers](/docs/2_MPU-6000-Register-Map.pdf).
|
||||
For more details see the [MPU-6050 datasheet](/docs/1_MPU-6000-Datasheet.pdf) and [MPU-6050 registers](/docs/2_MPU-6000-Register-Map.pdf).
|
||||
|
||||
---
|
||||
## Flashing
|
||||
@ -41,17 +38,17 @@ On the sideboard, there is a debugging header with GND, 3V3, SWDIO and SWCLK. Co
|
||||
|
||||
If you never flashed your sideboard before, the MCU is probably locked. To unlock the flash, check-out the [wiki page](link).
|
||||
|
||||
Then, choose one of the following ways for building and flashing the firmware:
|
||||
To build and flash choose one of the following methods:
|
||||
|
||||
### 1. Using Keil uVision (recommended)
|
||||
### Method 1: Using Keil uVision (recommended)
|
||||
|
||||
In (Keil uVision)[https://www.keil.com/download/product/], open the [sideboard-hack.uvproj](/MDK-ARM/), click Build Target (or press F7), then click Load Code (or press F8).
|
||||
In [Keil uVision](https://www.keil.com/download/product/), open the [sideboard-hack.uvproj](/MDK-ARM/), click Build Target (or press F7), then click Load Code (or press F8).
|
||||
|
||||
### 2. Using Ubuntu
|
||||
### Method 2: Using Ubuntu
|
||||
|
||||
Prerequisites: install [ST-Flash utility](https://github.com/texane/stlink).
|
||||
|
||||
To build the firmware, type:
|
||||
Open a terminal in the repo check-out folder and type:
|
||||
```
|
||||
make
|
||||
```
|
||||
@ -60,30 +57,31 @@ then you can simply flash the firmware by typing:
|
||||
make flash
|
||||
```
|
||||
|
||||
*Note: If someone finds a way to build and flash the GD32 MCU via (Platformio)[https://platformio.org/] please let me know.*
|
||||
*Note: If someone finds a way to build and flash the GD32 MCU via [Platformio](https://platformio.org/) please let me know.*
|
||||
|
||||
|
||||
---
|
||||
## Example Variants
|
||||
|
||||
This firmware offers currently these variants (selectable in (config.h)[/Inc/config.h]):
|
||||
This firmware offers currently these variants (selectable in [config.h](/Inc/config.h):
|
||||
- **VARIANT_DEBUG**: In this variant the user can interact with sideboard via a Serial Monitor to observe and check the capabilities of the sideboard.
|
||||
- **VARIANT_HOVERBOARD**: In this variant the sideboard is communicating with the mainboard of a hoverboard using the (FOC firmware repository)[link]. !This Variant is not yet fully tested!
|
||||
- **VARIANT_HOVERBOARD**: In this variant the sideboard is communicating with the mainboard of a hoverboard using the [FOC firmware repository](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC). !This Variant is not yet fully tested!
|
||||
|
||||
Of course the firmware can be further customized for other needs or projects.
|
||||
|
||||
--
|
||||
---
|
||||
## 3D Visualization Demo
|
||||
|
||||
By calculating the Euler orientation angles from Quaternions, we can make a simple 3D visualization example (see [sketch](/docs/sketch_processing/sketch_processing.pde)) in [Processing](https://processing.org/) as shown below:
|
||||
By [converting Quaternions to Euler angles](https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles), we can make a simple 3D visualization example (see [sketch](/docs/sketch_processing/sketch_processing.pde)) in [Processing](https://processing.org/) as shown below:
|
||||
|
||||

|
||||
|
||||
|
||||
--
|
||||
##Contributions
|
||||
---
|
||||
## Contributions
|
||||
|
||||
Every contribution to this repository is highly appriciated! Feel free to create pull requests to improve this firmware as ultimately you are going to help everyone.
|
||||
|
||||
If you want to donate to keep this firmware updated, check-out the link below:
|
||||
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=CU2SWN2XV9SCY¤cy_code=EUR&source=url)
|
||||
|
Loading…
x
Reference in New Issue
Block a user