Skip to content
/ CVJoy Public

moving Car Simulator with forcefeedback steering wheel, pedals, shifts, wind, shake

Notifications You must be signed in to change notification settings

cv256/CVJoy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

For only 500 USD (most of it on wood and a chair) I built myself a full car simulator , with:

  • 6 speed H shifter and reverse
  • sequential shifter
  • handbreak + clutch + break + gas pedals (all are 10 bit analogic)
  • master shutdown
  • 7 buttons (for horn, lights, camera, etc or to emulate keypresses like Esc for pausing the game and entering menu)
  • leds for RPM
  • leds for loosing traction on Front and on Back
  • lots of wind, based on the car speed (provided by 2 strong hairdryers)
  • shakes based on the speed and on the suspension movements (provided by an old mixer)
  • a great 10bit 900º forcefeedback real steering wheel
  • the simulator pitches and rols 16º (wich is a lot, scary) front/back left/right (provided by two 800W drills)
  • and I've been thinking about adding 2 seatbelts that compress you when you break or turn hard ;-)

It is recognised just like any comercial good steering wheel with forceedback, 3 pedals, handbrake, buttons and shifter, so that parts work with any game. The leds, wind, shaking, pith&roll need a specific class for each game, and by now I've developed it only for Assetto Corsa (but it's easy to do it for other car games, or even flight simulators).

See the general diagram here: https://github.com/cv256/CVJoy/blob/master/Simulador%20Automovel/Comunicacao/Diagram1.png

This project wants to be a complete tutorial on how to do it, and I'm sharing all the software I developed for this. It would be fantastic if this could help others to build their own simulators.

THE SOFTWARE:

Inside your Program Files folder create a folder called CVJoy (this is the regular way but it doesnt have to be exactly like this). Inside it save CVJoy.exe you can find here.

Download and install vjoy: https://sourceforge.net/projects/vjoystick/ This tiny software allows other softwares to perfectly emulate a joystick on your computer. Configure it like this: https://github.com/cv256/CVJoy/blob/master/Simulador%20Automovel/Comunicacao/VJoy%20configuration.jpg

Download AssettoCorsaSharedMemory: https://github.com/mdjarv/assettocorsasharedmemory Compile it and copy the resulting AssettoCorsaSharedMemory.dll into the CVJoy folder. This tiny library allows other softwares to know whats happening in the game in real-time (speed, position, acceleration, rpm)

Connect the computer (this project needs just 1 computer) to the Arduino using a usb cable. The computar will recognise your arduino as a serial port, tipically COM3. Connect the same computer's 12v output (from it's PSU) to the Arduino.

Download and install the arduino IDE Software you can find here: https://www.arduino.cc/en/Main/Software

Use it to Open my file https://github.com/cv256/CVJoy/blob/master/sketch_CVJoy/sketch_CVJoy.ino and then Upload it (save it) into the arduino. This file is the software (written in the arduino's specific language) that the arduino will allways be running, even if it is not connected to any computer.

This is one of the screens of my software CVJoy.exe: https://github.com/cv256/CVJoy/blob/master/Simulador%20Automovel/Comunicacao/CV%20Joy1.png On the top half you can view the buttons, leds, pitch, roll, steering wheel, shift wich are red by CVJoy.exe from the arduino. On the lower half you can view the data that is being red from AC throught assettocorsasharedmemory, and you can configure how this values will be sent to the arduino, how they will affect the leds, the wind and shake. And if you press the Setup button you can configura a lot more parameters, test motors and parameters, analyze graphs: https://github.com/cv256/CVJoy/blob/master/Simulador%20Automovel/Comunicacao/

THE HARDWARE:

The electronics are based on :

Put the Arduino, Dimmers and Relays in a transparent box so that you can see the hardware leds.

This is a simple guide for choosing IMUs: https://www.sparkfun.com/pages/accel_gyro_guide This is a simple explanation about IMUs: http://www.instructables.com/id/Guide-to-gyro-and-accelerometer-with-Arduino-inclu/ This is a fulll explanation of IMUs: https://theccontinuum.com/2012/09/24/arduino-imu-pitch-roll-from-accelerometer/ But I gave up IMUs because lots of noise (or lag), distance sensors are a much better solution.

(writing in progress...)

THE MECHANICS:

(writing in progress...)

About

moving Car Simulator with forcefeedback steering wheel, pedals, shifts, wind, shake

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published