Skip to content

Commit

Permalink
Merge branch 'main' of github.com:bbogdanmircea/DIY-Sim-Racing-Active…
Browse files Browse the repository at this point in the history
…-Pedal into main
  • Loading branch information
bbogdanmircea committed Aug 15, 2023
2 parents 5d1bc24 + ad0a58e commit 237b8b8
Show file tree
Hide file tree
Showing 19 changed files with 110,818 additions and 1 deletion.
Binary file modified Arduino/.DS_Store
Binary file not shown.
Binary file modified Arduino/Esp32/.DS_Store
Binary file not shown.
Empty file added Arduino/Esp32/Main/.last-used
Empty file.
1 change: 1 addition & 0 deletions Arduino/Esp32/Main/compile_commands.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
5 changes: 5 additions & 0 deletions Arduino/Esp32/arduinoCliBuildScript.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# shell script for automatic built of the ESP32 binaries
# for Arduino-cli help, see https://arduino.github.io/arduino-cli/0.33/commands/arduino-cli_compile/


arduino-cli compile --fqbn esp32:esp32:fm-devkit --output-dir Arduino/Esp32/bin Arduino/Esp32/Main/.
Binary file added Arduino/Esp32/bin/Main.ino.bin
Binary file not shown.
Binary file added Arduino/Esp32/bin/Main.ino.bootloader.bin
Binary file not shown.
Binary file added Arduino/Esp32/bin/Main.ino.elf
Binary file not shown.
110,781 changes: 110,781 additions & 0 deletions Arduino/Esp32/bin/Main.ino.map

Large diffs are not rendered by default.

Binary file added Arduino/Esp32/bin/Main.ino.partitions.bin
Binary file not shown.
Binary file added Arduino/html/.DS_Store
Binary file not shown.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ Feel free to join, research before you build and ask questions.

# Hardware
## ESP32
The embedded code of the DIY active pedal runs on an ESP32 microcontroller.
The embedded code of the DIY active pedal runs on an ESP32 microcontroller. Some PCB design, which hold the ESP32 breakoutboard, the ADC breakoutboard and connectors are uploaded to the [Wiring](Wiring) directory. They were used to proof the concept.
The regular ESP32 is currently recommended over the ESP32 S2, as it has a FPU and it performs better with the stepper library. ESP32 S2 is losing steps currently.

ESP32 PCB | ESP32 S2 mini PCB
:-------------------------:|:-------------------------:
![](Wiring/Esp32/Esp32_PCB_0.png) | ![](Wiring/Esp32_s2_mini/Esp32_S2_mini_PCB_0.png)

A more sophisticated custom PCB is currently under development and tested. Please refer to the Discord for up-to-date designs.

## Mechanics
There are multiple variations of the DIY active pedal build by users, which can be found at our [discord](https://discord.gg/j9K5vUuT) channel.
Expand All @@ -34,11 +41,34 @@ Currently a nicer PCB deisgn is under development, which has the ESP & ADS integ
# Software

## ESP32 code

### Architecture
A Doxygen report of the sources can be found [here](Arduino/html/index.html).

### Built from source
To flash the [code](Arduino/Esp32/Main), e.g. via Ardiono IDE to esp32.

### flash prebuilt binaries via webflasher
HASN'T BEEN TESTED YET:
The prebuilt binaries for the regular ESP32 can be found [here](Arduino/Esp32/bin). They can be flashed via the ESP [webflasher](https://esp.huhn.me/).

## SimHub plugin:
The SimHub plugin was designed to communicate with the esp32 to (a) modify the pedal configuration, e.g. the force vs. travel parameterization and (b) to trigger effects such as ABS oscillations.

![image](SimHubPlugin/Images/SimHubPluginOverview.png)

To install the plugin, copy the plugin [binaries](SimHubPlugin/bin) content to your SimHub directory, e.g. C:/Program Files (x86)/SimHub


# Todo
- [ ] Add Doxygen + Graphviz to the project to automatically generate documentation, architecureal design overview, etc.
- [ ] Add automatic system identification of pedal response
- [ ] Add model-predictive-controll to the ESP code for improved pedal response
- [ ] Add build manual
- [ ] Create video describing the build progress and the features
- [ ] https://github.com/gin66/FastAccelStepper/issues/194
- [ ] https://github.com/br3ttb/Arduino-PID-Library/issues/138
- [ ] GUI design improvements for the SimHub plugin
- [ ] SimHub plugin: Bugfix for COM port selection wrong, when switching between pedals
- [ ] Send SimHub data via wifi to ESP
- [ ] Automatically generate the bin files and refer to the ESP32 [webflasher](https://esp.huhn.me/)
Binary file added Wiring/.DS_Store
Binary file not shown.
Binary file added Wiring/Esp32/Esp32_PCB_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file added Wiring/Esp32_s2_mini/Esp32_S2_mini_PCB_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 237b8b8

Please sign in to comment.