Arduino based G25/27 Shifter Standalone
HTML-код
- Опубликовано: 6 сен 2024
- RamjetX - G25/G27 shifter for Arduino based input
Full implementation of the G25/G27 and creation of the G25 Arduino IDE compatible library.
----------------------------------
My code is here. github.com/Ram...
For more information see this link:
www.isrtv.com/f...
This is not a link to my personal library for the arduino version. It is however a very useful resource by Pascalh from his schematic teardown and Teensy "sketch".
I'm yet to release the library I have written for native Arduino C. Since I wrote it as an Object, it can be called and given any pin parameter you want to wire to it. The benefit is you can connect as many shifters as you want and each will work on a single arduino.
The reason why I havent released my own library is simply because like a lot of my projects, they are migrating into the SuperG-Box core that I have intention of selling at near cost to the Sim Racing community.
Sim racing products are wildly too expensive and want to be able to provide professional grade product at DIY pricing. So stay tuned for exciting news on that.
Also check out OZNZSimRacing.com forums for my own project section updates.
Excellent. I used your code to hook up the shifter to an Arduino Pro Micro. Then my son wanted to use the wheel and shifter on the Xbox One, and of course, it doesn't work. So I added a little toggle switch to switch between PC and XBox mode. When the Arduino starts, it reads the switch position on 2 pins, and if it's shorted, it will switch to keyboard mode. In keyboard mode, it just sends key presses using the Keyboard library. As it is just a normal USB keyboard, the XBox can handle it. Provided the game supports keyboard input (not all of them do), you can now use the shifter on the XBox as well. Handbrake mode is, since the XBox One doesn't support 3rd party analog controllers not verified by Microsoft, switched to a toggle in XBox mode. Still reads the Y position, but just presses a button when it's above a certain threshold.
Awsome Work Dude. Before your Code, I only got my H-Pattern working, but now all the Buttons and the Reverse Gear is working as well. Thanks a lot.
Shifting sound ...
I love it
This is exactly what I needed thank you so much!! And you even updated it recently!!
I just received my Arduino Uno and 9 pin connector, for the joystick Lib I think this one (link)? Because I don't see any reverence. github.com/MHeironimus/ArduinoJoystickLibrary
You need to enable the pull-down resistors for the analogue values if you are not using them. This prevents them floating.
Hey! Can you reupload your tutorial pictures? It seems that tinypic discountinued.
Hey man, does the new code work with the Arduino Nano? Have basically everything wired up but can't seem to get it work? Let me know.. If you see this!
Thanks
Good night, in the female serial, the colors are different, there’s even a blue wire that I haven’t seen anywhere talking about it and another doubt I’m using an arduino nano v3, can I use this or is it better to get another one?
The nano is a Atmel 328p processor. It does not have native USB and won't emulate a gamepad.
Use an Arduino with an Atmel 32u4 processor. Pro micro, Leonardo etc...
great job, very good your tutorial ... but i'm having a problem or i'm blind, i searched the files you provided and i didn't find the correct wiring diagram to make from DB9 to arduino (example: DB9 PIN 5 to A0 arduino) ..could you provide me here in the comments please?
Can I use it with Logitech Driving Force GT
good project .. can you demonstrate the wire connection with aurdino micro please?
Updated library
@@RamjetX share the bro with the pinout on the logitek g25 shifter on arduino pro micro or on arduino leonardo
Can we use arduino Leonardo? The big one
Yeah. That's fine. It's the same Atmel 34u4 chip.
@@RamjetX how about wiring? Any different?
what mod you did to the shifter to sound like that?
I think I shall do this very soon... My Summer Car is frustratingly unable to see reverse on my G27 due to it being button 23, and Unity only supports 20 buttons. Remapping via software has failed no matter what I try (Unity does weird ow level stuff with joysticks apparently), so having a hardware interpreter seems the only fix.
github.com/RamjetX/Logitech-G25-27-Shifter
Hi Sir, unfortunately ican't see all the photos attached on your tutorial. Can you help me with this? i just owned Log. G27 shifter and planning to partner it with my Thrustmaster wheel. Thanks a lot mate!
can you let me know the steps if i have a leonarado micro pro or the one you have? pls!
Pro micro yes... code here. github.com/RamjetX/Logitech-G25-27-Shifter
hi, please help me, my shifter g25 damage ("serial" cable is lost) i need photos or any tip about conection in main board of the shifter and db9. please help. Thank you and sorry my bad english.
I'm curious how the cable got damaged. Here is a good website with lots of information on the cable pinout for the DB9. www.isrtv.com/forums/topic/13189-diy-g25-shifter-interface-with-h-pattern-sequential-and-handbrake-modes/
If you need the matching connection at the PCB side for the DB9. You can use the schematic for the PCB in that site to reverse check what the pins are on the DB9.
I'll have to open my shifter up to give a complete pinout again. I hope that website helps. I started there and rewrote the library for Arduino instead of Teensy.
Hi RamjetX, thanks for replying, the cable is a damage because my dog "ate" ... (maybe he thinks it's delicious ... kkk) I lost the connector (db9), I tried to identify the pcb board connection, but Unfortunately No success, in my case, I need complete information (pin on the pcb to pin on the db9 connector). I try the website indicate but unfortunately the information is only about conection DB9 to Teensy 2.0 (in my case i no any information about pinout in pcb shifter). Thank you very much for your attention.
Hi again RamjetX, i leave a topic about this problem in the forum ISRTV (waiting moderator approved)... cross my fingers to help...
Hi, do you have any idea why at least in Dirt Rally 2.0 when setting the keybinds for the shifter gears, 9 times out of 10 the game sets the gear keybind to "z-axis" or "lower z-axis" instead of the button number for the gear we see for example in windows game controller properties?
If for example I try binding the gear 1, it rarely registers correctly the "button 1" instead it almost always registers "z-axis", and I have to keep trying to bind it again and again.
Anyways, thanks for your efforts on the coding.
Check the game controllers setting panel in windows. If the axis are moving at the same time your setting gears. You can disable the axis by modifying the arduino example sketch and make the Joystick Axis 'false' for those axis.
The example sketch I included is pretty well documented in the code. Shouldn't be too hard to find and reupload to the arduino...
Shout out in the simhub discord if you need more help.
Cheers,
RamjetX
@@RamjetX Thanks I will try that!
where do I find the wiring diagram for the connectors?
At the top of the code
works on arduino leonardo pro micro?
@@1djval Yes.
Thanks
@@1djval I have 3 more recent build videos on my channel... it explains everything
Good day RamjetX, I would like to ask for your assistance on how to make this arduino converter work
There are 3 videos I did when updating the library about April last year. Width checking them out
I get problems with calibrating the shifter in ETS2, while the windows joystick thing is registering the buttons when shifting, very often ETS2 just ignores that input when trying to use that for shifting in settings. Can you make a video of your process of that?
ETS2? I presume that's European Truck Simulator 2? Unfortunately I don't have that game. But the process of the gear change is that it holds the button for the selected gear just as the original G shifter does. If it supports the original G25 and G27 shifter, it should be exactly the same
I am currently using a G27, but want to upgrade my wheel base while keeping the shifter, with all buttons working. I have already a arduino nano v3 is it possible to get it working? (sorry for that probably noob question)
The Arduino nano has the wrong CPU sorry. It must be an Arduino or clone board with the Atmel 32U4 chip. That's leonardo, and pro micro
@@RamjetX ok thank you very much for the answere! Then i will buy a new arduino.
Hello, I'm trying to do this mod too and I noticed that when I plug in the 5V from my Arduino, the power LED doesn't light up, while the sequential LED works when sequential mode is on. Is this normal? (I don't have a G25 wheel so I can't tell if this is normal or not)
Yeah that's normal. I never looked further into it.
@@RamjetX Thank you, I thought there was something wrong.
Hello, I know it's been a few years, but could you share your code and wiring diagram to use a micro arduino on the g25 h-shifter as in the video ?, I look everywhere but I only find the schematic and code for the teensy board
github.com/RamjetX/Logitech-G25-27-Shifter
@@RamjetX Thanks for putting the code in github and making it available to us, I will revive my shifter g25, thx bro
Future more, I found this in your G2x_Shifter code.
Logitech Pedals G25 Shifter DB9 male Connector
DB pin 1 = Loopback device detection
DB pin 2 = shifter_Data_Input
DB pin 3 = shifter_Data_Latch
DB pin 4 = shifter_X
DB pin 5 = not connected
DB pin 6 = Ground Data
DB pin 7 = shifter_Data_Clock
DB pin 8 = shifter_Y
DB pin 9 = VCC 5V 17 Data
3 21 X axis
5
6 ----- 11 GND
7 20 Y axis
9
and some other internet things give me different results.
Can you describe what is correct?
The two wiring Pinout are the same. Check out my video where I determine the pinout and find that VCC is pin 9, and pin 1 was is also VCC but used as a loop back to check if it was connected
@@RamjetX so basically I need to shorten pin 1 and 9? I got it working with only VCC too 1 tho. I will watch your vid, maybe there is more too it than it meets the eye.
@@Sharp_Stone it is shorted inside the G25 shifter DB9 plug anyway. Electrically pin 1 and 9 are connected already.
The misconception is that pin 1 is VCC, when it's actually just a loopback that the G25 wheel base looks at to see if the shifter is connected to the base before it tries to read any shifter values. That's why when it's disconnected from the base, the G25 wheel doesn't go crazy reporting random gear changes when it's not connected. ;)
Cool video! Im on the teensy side tho as adruino's are crazy priced here in canada somehow
+comodohalo Isn't the Teensy 3.2 a ARM cortex processor? I haven't tried one yet and not sure if the libraries for those to work as a usb game input device work properly.
I did promise to release the Library to someone else earlier and it's totally slipped my mind. We're in the process of moving house at the moment.
I'm using an Atmel 32u4... its an Arduino Leonardo based board.
www.ebay.com.au/itm/310634777706?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
I got them from the link above and it just works like an arduino leonardo in the IDE.
I will get that Shifter library extracted and cleaned up for general users, but it won't be this weekend. Remind me next week to upload something for you.
+RamjetX indeed they are using a ARM processor, they work really great tho for pedals. since its 10-12bits of analog reading so its like you had one of thoese expenside 30 usd pedal adapter. im still unsure if its my shifter or the code. Good look with your house move, ill surely remind you
Wire conection on arduino micro please , and the rest of stuff for conect g29 on usb , thanks in advance
G29 same as G25... code should work identical. github.com/RamjetX/Logitech-G25-27-Shifter
You know that there's actually a premade adapter to use that shifter in usb ? Because that's what you made, right ?
IMNOTA , hey mate. Yeah look a few guys in OZNZ sim racing were upgrading wheels and wanted to keep their shifters. What I did with mine was combine the shifter and pedal adapter in one with dynamic brake force adjustment and launch control active. It was a mini button box in later revisions too. It was educational tinkering for me and useful for others. It was fun to make
RamjetX
Oh, ok, so it was worth the work.
Thanks for clearing that up.
Do you need arduino or a teensy? Because on the links to the forum they mention teensy and not arduino. But a teensy is quite pricey where as an arduino is not.
The details in the link he uses a teensy. I rewrote most of his teensy code as a library for arduino. I agree, teensy is silly expensive compared to an arduino clone with exactly the same chip.
I've been quite sick lately and busy lately finishing the rest of my projects. Plus Uni study. I did however get an example for my arduino version of the library. So I'll put it up on my github tomorrow. I should have uploaded it last week but cold and sick baby etc.. Life just gets away from you
The original ISRTV forum was for teensy... I'd adapted that and built the arduino compatible library years ago... sorry for the late reply. github.com/RamjetX/Logitech-G25-27-Shifter
will this work with arduino uno?????
Sorry no. The pro micro or Leonardo have the Atmel 32U4 chip which can natively emulate a gamepad which is what the code is trying to do.
The Uno is a Atmel 328 chip and doesn't have USB connections. It uses an separate USB to serial converter on the board. Realistically, the pro micro is a better all round board. The price is relatively the same and you won't have issues with fake China ftdi chips on clone Uno boards being bricked by ftdi and they're horrible driver bricking.
RamjetX ok thx
Hi all, it is some months that I am trying to make it work but when I compile I receive the message " 'Joystick_' does not name a type, did you mean 'Joystick'?
I can guess it has something to do with Joystick library but I don't understand where the problem is. Any suggestions?
Grab the 2020 release of the library from Github. There is a new example file in there. It should just load and run.
Tried again to be sure, but same issue. Thanks for replying me!!!
@@RamjetX I know it is not a metter of your code but any other ideas?
@@TheGarimbus you are using an Arduino pro micro or Leonardo?
@@RamjetX Leonardo
this is very nice. but I don't know you you get this tool to work.. your information link shows only teensy solutions.. :(
github.com/RamjetX/Logitech-G25-27-Shifter
hello mate. i just ordered the same board and would like to use my g27 shifter with fanatec csw base. would you be willing to help me with the software please?
github.com/RamjetX/Logitech-G25-27-Shifter ... sorry for the late reply
@@RamjetX Hey RamjetX , not to be rude, but in struggling with coding, do you have a working Sketch i can load and use?
@@karlsteeg4139 there is an example with the library. Just check what pins your using and it should just work.
@@RamjetX , thank you, will do so, going to have to reverse engineer it, my color code re different to others
Im looking for a way to make the wheel rim a standalone usb controller to use on a different more powerfull wheel base. Theres a board in the wheel that houses the led rev lights, paddle shifters and 6 buttons on the rim with the 7 pin conecter that would have conected it all to the wheel base. My question is could i wire that to the adreno and make it all work with out much coding?
Can I get the pinout please???
Can I use a db9 adapter
Indeed it is a db9 connector... code linked here, follow generic wiring diagram and use the inbuilt example github.com/RamjetX/Logitech-G25-27-Shifter
hello, did you release library compatible with arduino boards?
+m4t3k1991 Hey, I haven't yet. I'm finalizing the code for the complete all in one sketch which will become essentially what I'm going to call the SuperG-Box.
I may release an 8bit axis version of the library though which doesn't have the self written 10Bit HID implementation code. It would work fine for just a standalone shifter.
The problem I have is that it has evolved quite a bit and become an entire control system firmware for Sim Racing that it works better than alot of the other custom boxes out there on the market.
Were you looking to just use your Shifter with a different wheel? I can probably put a quick version together for you and pull it out of my SuperG library.
+RamjetX yeah, like u said, im using logitech dfgt and i always want to have standalone shifter and g25/27 shifter is perfect for that. I got arduino leonardo, but im dont have any programming skills :(. It would be great if u can help me with that.
+m4t3k1991 I can whip up a little stand alone sketch for you. I'm pretty busy at the moment with a baby/renovations/work etc.. but I'll link you something soon hey.
+RamjetX thank u, i will appreciate your help. If u want we can talk via mail. :)
github.com/RamjetX/Logitech-G25-27-Shifter
i really need some help with this can we chat?
Have you seen the 3 video tutorial on how it's built?
I'm on simhub discord and can help there
@@RamjetX yes I followed the amstudio video and wired my G25 into a arduino Leonardo as per his video and using his github link and yours I can't get my shifter recognised
@@RamjetX do you have an invite link for the discord please
@@jezarmstrong7891 www.simhubdash.com/
Whic used ardunio
pro micro is best
Great job, work on g29 ?
Hello mate, heres a video that shows how to do it with a g29 shifter: ruclips.net/video/dLpWEu8kCec/видео.html
github.com/RamjetX/Logitech-G25-27-Shifter
hello X,please send me the wire position on arduino
+Dhiego Rodrigues Updated video description for more details :)
can this be done with the g29 shifter
Yes, but you won't get any buttons. Just gears. In all fairness though, the g29 shifter is just an X Y joystick. Amstudio has a ready made solution for that
@@RamjetX will it still work with the Arduino nano?
@@SLIDWAYSx No, it needs the Atmel 32u4 chip. Sold as a Pro Micro, or a Leonardo.
@@RamjetX ill have to order one thanks heaps much appreciated
Do you have any experience with iracing?
I do... I didn't like it :(
I want that
github.com/RamjetX/Logitech-G25-27-Shifter
İ did every step correct but my shifter doesn’t work and the only error i got from arduino is com1 error what do i have to do exactly
Gonna need more info on what it is you have and trying to do. If you followed the instruction in the link, there is a quirk with programming the teensy.. .you have to hit the reset button to reboot the teensy in a programming mode for the software to upload the software. Beyond that, I have no idea what kind of error you'd be getting. Not enough information.
i did what you said before, i don't have a single idea how to program stuff, i saw the topic in the forum and decided to buy teensy, my father did the soldering part and he checked everything there is no problem there but for some reason only time that gearbox giving any feedback is when you connecting the gearbox to teensy board (only in the connecting part if you connect it there is no feeedback) otherwise nothing shows up in the gaming controller settings i'm sure i setted up everything correct but only thing that has error is i don't get this window on my software i61.tinypic.com/2m504cw.jpg everything else is looks correct i hope i explained everything...
From your picture, it looks like it is programmed okay. Do the buttons on the serial monitor work?... I can't see it wouldn't be working. You don't need a com port for it to show up as a HID Gamepad/joystick. It should be plug and play
RamjetX ok thanks for everything i think shifter is broken i bought it second hand for my thrustmaster setup so it might be broken:( only thing i want to ask now does the power sign light up when you plug to pc mine is not lighting up when i plug it
Sting ER the power leds don't light up on the shifter from memory. The shifter is literally a joystick with all the buttons using a parallel to serial shift register. When you have the screen up showing the info like in your picture, do the buttons work?
sorry to bother you again mate. i got the board today. willing to point me somewhere for more info please? wiring/coding? thx in advance
Funny you mentioned it.. I haven't had a chance to do anything more with it since christmas till just 2 weeks ago. I made one for a oznzsimracing.com member and he's pretty wrapped in it.
I had to make some late adjustments to the code for his shifter since the potentiometer in his was dirty and the gate thresholds moved. But you'll get the idea. So I'm making an example folder ino for it now and I'll have it out by Friday. We have a public holiday here this week and I've been ill, but hopefully Friday I'll have some time to put something out on my bitbucket.
Try this: github.com/functionreturnfunction/G27_Pedals_and_Shifter got it working.
Cool Mathijs, It's still all in the single ino file.
I did get round to uploading to BitBucket. I have made some changes but mine is two separate libraries. The HID and the G-Shifter on it's own.
It was easier to separate them and call the G-Shifter purely for the gear and buttons from a getter method.
Got a little work to do this morning but I'm glad your post came up to remind me. :)
Cool can you link to it? :)
Yeah I will, I'm just setting everything up on a new laptop. Reinstalling GIT and setting up all my repository again... I remember now why I keep a dev laptop for years. All the dependencies and setup over the years is a nightmare to replicate.
Хвастун и все сказано! Если есть у тебя достижения так поделись проектом с людьми, а если преследуешь цель обогащения то выходи на рынок производителей. Тебе здесь не место "товарищ!". Вот ссылка люди на G27_Pedals_and_Shifter (github.com/functionreturnfunction/G27_Pedals_and_Shifter), пользуйтесь на здоровье. я уже все сделал и прекрасно все работает.