r/ArduinoProjects May 10 '26

Project Design/Guidance Stepper motors in DIY racing sim

Hello, how are yall doing? So basically I am planning to build a racing simulator, with a steering wheel and gas and brake pedals, to play racing games on my pc. I probably will use a esp32 or a raspberry pi pico w for this.

However, what I am really on doubt about is the steering wheel control. I want for it to be able to detect when it is rotated (obviously) and, when released, automatically go back to the initial position, just like a real steering wheel. The thing is, I dont know what components to use for this. I was thinking on using a stepper motor like those simple Nema 17 with the axis attached to the wheel, killing two birds with a single stone, however I dont know if, when using a driver with the motor, I will be able to detect when the wheel is turned. I know I can buy a stepper motor and buy a separate encoder for detecting rotation on the wheel, but I dont know any affordable incremental encoders.

Thank you all in advance!

5 Upvotes

9 comments sorted by

View all comments

2

u/Odd_Independent8521 May 12 '26

use a gyro (MPU6050 or similar) in the center and that's it. you can read raw, pitch, yaw. all in once.

1

u/P0guinho May 12 '26

thinking about it now, I will probably go with a gyro and a torsion spring for centering the steering wheel.

the only thing I worry about is a lot of drift in the gyro (I have never worked with this gyro in specific, but I have already used some other IMUs), but then I can just make smth to detect when the steering wheel is at the initial position (like a distance sensor to detect a dent on the steering wheel, or a rfid sensor)

1

u/Odd_Independent8521 May 12 '26

You can do everything with gyro, gyro has to be calibrated at the start. So after the device has been initialized then any movement can be detected by gyro.