Car Simulator Arduino Pedals

60,607

315

30

Introduction: Car Simulator Arduino Pedals

I have a on going project to build a car-simulator and one goal is to get the feeling like sitting in a real racing-car. With this instruction I explain how I have build my pedals to my car simulator. Of course you can buy stuff like this but I want to build it cheap. My pedals have gas, brake and clutch and use a Arduino (Windows native drivers) to connect to usb port.

Hope I can inspire you with my building and I meet you on a trackday in Project Cars!

Step 1: Parts You Will Need to Buy or Get From Scrapyard

1. Arduino Pro Micro

You can use any of board based on ATmega32U4

2. Usb cable between Arduino board and computer.

3. 3 piece Slide Potentiometer 5kohm.

4. 3 cheap styling pedals for cars.

5. Spring

6. Some metall to build pedal construction in

7. Nuts, bolts and cables to potentiometer

8. Project Cars or another car simulator you like.

Step 2: Welding Potentiometer and Arduino Together.

Connect Gas to A0, Brake to A1 and Clutch to A2.

Connect each potentiometer to +5v and GND

See draft.

Step 3: Programming Arduino and Test

For this you need to download MHeironimus/ArduinoJoystickLibrary Version 1.0 and JensArduinoCarPedals from Github.

Install libary and open jenswsArduinoPedal project.

Download it to your Arduino board and connect to your gaming computer.

Go to Controlpanel/Hardware and sound/Devices and printer.

If everything is correct you now see your arduino board as a joypad.

Right click on your Arduino board and choose Game control Settings

After you choose your Arduino board you can go to tab test and test your potentiometer.

It is important that you use Version 1.0 of MHeironmius Joystick libary

Step 4: Building Pedal Construction

I build my pedal construction in steel and welding it together. One tricky part was to find spring with correct feeling. You have to test what you like. I also fond that 100mm from bottom to center of pedal was a good length for my foot.

I show some pics how i have done to give you idea how you can build yours.

Step 5: Install Potentiometer on to Pedal Construction.

I have choose to mount my potentiometer in back of pedal console.

When I press on a pedal potentiometer go from 0 to 5kohm.

It may be a better solution to mount direct on pedal?

Step 6: Settings in Project Cars

Start Project Cars and go to Options/Controls/Edit assignments

Choose Throttle and press on gas pedal.

Do the same with Brake and Clutch

Step 7: Test Run in Project Cars

If you have done everything correct you now have som nice pedals to you car simulator.

Probably I gona build version 2,0 of my pedals.

I'm not 100% satisfied with the feeling in my pedals.

Maybe i rebuild brake to hydraulic and try different springs on gas and clutch.

3 People Made This Project!

Recommendations

  • Stone Concrete Cement Contest

    Stone Concrete Cement Contest
  • Science Fair Challenge

    Science Fair Challenge
  • Make It Modular: Student Design Challenge

    Make It Modular: Student Design Challenge

30 Comments

0
orhus
orhus

6 months ago

hey guys, how could is use this in real game, 'cause the game can't see it.

0
jensws
jensws

Reply 6 months ago

Depending on with game you play, it should pop up as a gaming device in windows. Can you see it in windows device manager?

0
orhus
orhus

Reply 6 months ago

Yes absolutely, and I can test all axis
(sry if i have a terrible english, i'm just a student in hungary)

0
jensws
jensws

Reply 6 months ago

I have only used my in project cars. In settings of that game you can do custom binding of keyboard, steering wheel and pedals.

0
orhus
orhus

Reply 6 months ago

And did u test it in other games, 'cause I couldn't use this setup in any other game.

0
bbogdanmircea
bbogdanmircea

Tip 2 years ago

Hello, the sketch that is posted needs minimal changes to work with the last version of the library.
Basically you can look in one of the Examples for the library and you will understand what is missing for the sketch to work, you just need to define a Joystick variable with the properties that you want for your pedals:
Joystick_ Joystick(
JOYSTICK_DEFAULT_REPORT_ID, //hidReportId
JOYSTICK_TYPE_GAMEPAD, //joystickType
0, //buttonCount
0, //hatSwitchCount
true, //includeXAxis -> Gas
true, //includeYAxis -> Brake
true, //includeZAxis -> Clutch
false, //includeRxAxis
false, //includeRyAxis
false, //includeRzAxis
false, //includeRudder
false, //includeThrottle
false, //includeAccelerator
false, //includeBrake
false); //includeSteering

This is the way I am using it in my sketch, I use X for Gas, Y for Brake, Z for Clutch so there is a slight mistake that I made there intentionally.

0
andrestito49
andrestito49

2 years ago

esta es mi pedalera! todavia estoy dandole reformas para que sea mas presisa

65895305_1241080249407478_7940342873201836032_n.jpg65960385_1241081366074033_7198325098871259136_n.jpg
0
bbogdanmircea
bbogdanmircea

Reply 2 years ago

Hello, could you post some dimensions for your pedals? I like the idea of the circular Potentiometer and how you connected it to the pedals.

0
bbogdanmircea
bbogdanmircea

2 years ago

Hello, can you post some complete list of components and files?
I would like to make just a Clutch Pedal to add it to my 2 Pedal Setup.
I am interested in the Sliding Potentiometer model and the dimensions of the Pedal.

0
HarrisonA13
HarrisonA13

Tip 2 years ago

Hello everyone. I was able to make it work for the following reason.

The library link above is from version 2.0.5 but the pedals program works ONLY in version 1.0 it is necessary to get the library from another location.

0
HarrisonA13
HarrisonA13

Question 2 years ago

What version of the library did you make this program for?

So I am building a complete simulator and it is 80% ready. The code is not compiling, I added the correct folder to the library and set up the circuit but I tried everything and the code does not compile, it seems that it does not recognize the library.

Sorry anything i don't speak english - speaking by google translator

0
jensws
jensws

Answer 2 years ago

Hi i'm using verison 1.0.
Try that and I think it should work, Good luck!

0
teomanB
teomanB

Question 2 years ago

is there going to be v2.0 and is there any link for pots can't find anywhere or where did you salvaged them nice work

0
AlexA415
AlexA415

3 years ago

Hi when I load the libreira "arduinjoysticklibmaster ..." arduino 1.8, it gives me an error the file does not contain a valid library. do you have a solution? Thank you
0
Suraj Bhawal
Suraj Bhawal

5 years ago

That's an amazing looking pedals here... I also made the complete simulator set a few years ago. I used PIC18F2550 as the brain of the system. worked great for a while until one day my nephew decided to break it.

487226_436400629715990_1711703501_n.jpg528854_436400733049313_319726367_n.jpg552421_436400703049316_745802452_n.jpg555979_436400589715994_1400049200_n.jpg
0
sahadatsunny202146
sahadatsunny202146

Reply 5 years ago

have you given any tutorial for this complete simulator?

0
jensws
jensws

Reply 5 years ago

No I haven't. Still working on some part.

0
Suraj Bhawal
Suraj Bhawal

Reply 5 years ago

no... But it's on my to-do list to re-do this project sometime in the future... But if you want the firmware for the pic, I have that and I can give it to you if you want.

0
jensws
jensws

Reply 5 years ago

Nice work!