Logitech G29 brake mods
25 October 2018
Background
Having poor coordination always and no depth perception until vision fused in my 40s,
driving and bicycling were as nearly athletic as I cared to get.
My copilot got a BMW E21 320i when her old Toyota Corolla died in the early 1990s.
The best BMW garage in town offered discounts to BMW CCA members, so we joined.
This led, in 1995, to a 5-speed 1985 BMW E23 735i,
which I wanted to own since reading the September 1985 Road & Track review.
By 1997, I was driving it at BMW CCA driving schools on Watkins Glen, Mont-Tremblant,
Road Atlanta, Mid Ohio, Sebring, Summit Point and Putnam Park.
Driving schools mostly ended for us around 2003, owing to increasing expenses
and likelihood of non-trivial track offs as my confidence grew.
The Motronic DME had also became unreliable.
Meanwhile, I still ride bicycles…
Nostalgia being what it is, VIRTUALLY revisiting driver schools seems attractive. Many cars and tracks driven are available with sim racing program Assetto Corsa and can be played using relatively cheap Logitech G29 pedals and steering wheel. Playing Assetto Corsa on conventional PC monitors limits field-of-view; A Samsung Odyssey VR headset has since been replaced by HP Reverb G1.
Problems
By lacking inertial cues from velocity changes, sim racing seems harder than real. Although Logitech improved pedal feel with their G29, braking remains problematic:,
- signal to sim software is based on pedal movement distance, not pressure.
- feedback for tires losing grip during braking currently comes thru the steering wheel, instead of the brake pedal.
Project
Those 2 brake simulation shortcomings can be mitigated, respectively, by:
- replacing brake potentiometer with a load cell, e.g
Logitec G27 Load cell brake modification
- That mod used analog conversion, but SP_Adapter separates pedals from wheel.
- since AccuForce controller supports analog pedals, instrumentation amplifier model is less bother than ADC + USB HID module.
- simulating ABS feedback at the brake pedal
- ABS is relatively distracting; consider instead simulating disk runout and road noise.
- e.g. @ 3:47/10:56 of this video: DIY RUMBLE PEDALS SIM RACING
- Get tire slip data from Assetto Corsa via UDP socket or Python
- proTyres app [requires registration] includes indicator for Tyre slip during braking
Assetto Corsa software development
- SimHub already solved this…
- Assetto Corsa Programming
- acplugins
- Python reference doc
- Getting started
- “I have developed an app with
import socket
and it works fine for me and a few other guys, but there are some other users where the socket cannot be loaded”
you can fix it by embed import *.pyd files into environment
- “I have developed an app with
- download python 3.3 and extract it.
- copy file socket.pyd from python /Dlls/ to your game folder \Steam\steamapps\common\assettocorsa\apps\python\yourapp\DLLs
- and modify the script that cause error, insert follow code after you import socket
sys.path.insert(0,os.path.join(os.path.dirname(__file__),"DLLs")) os.environ['path'] = os.environ['PATH'] + ";,"
- and modify the script that cause error, insert follow code after you import socket
A “complete” hardware car sim slaved to Assetto Corsa
Monitor app for more or less the complete AC API (might useful for App developers). See the screenshot in the attachments.
STM32 HID adapter for G29 pedals with load cell brake
- AccuForce controller supports analog pedals; interface load cell using instrumentation amplifier module
- Unlike ESP8266, STM32 supports custom native USB
- Prototype using a $2 Blue Pill
- Blue Pill uses STM32F103C8T6 with 128Kbytes of Flash and 20 Kbytes SRAM
- Blue Pill STM32F103 ~49 VAX (integer) MIPS + 9 Whetstone (floating point) MIPS
- 1994 Pentium PCs rated ~ 71 VAX MIPS and 12 Whetstone MIPS
Clone code from SP_Adapter - Logitech pedals as separate USB game controller
HX711 support
- STM32duino HX711 lib
- STM32duino API
- Arduino HX711.cpp
- HX711 Arduino UNO code to stm32f103 blue pill board
Black Magic Probe bootloader expects/requires dfu-util to load second stage
BMP bootloader can be installed by ST-Link..
17 Feb 2021
Black Pill
512KB Flash 128KB RAM STM32F411CEU6 module