DIY Logitech G25/G27 shifter/pedals USB adapter

  • Thread starter RomanST77
  • 57 comments
  • 59,032 views
24
Russian Federation
Russian Federation
Hello there!

I'm proud to show my Logitech G25/G27 shifter/pedals USB adapter based on STM32 microcontroller:

IMG_3985.JPG IMG_3964.JPG

It's similar to Leo Bodnar's USB adapters for pedals and shifter but it's open source and open hardware. The project page on GitHub: https://github.com/robotsrulz/SP_Adapter

Youtube video:

Commented in Russian, I'm showing the controls in Assetto Corsa.

I also replicated shifter electronics to move buttons from shifter to steering wheel if you don't use your shifter and wants to make a formula 1 steering wheel for your Logitech G25 or G27 wheel base:

IMG_3947.JPG

This button box is built just to test the board on picture above and connected instead of G27 shifter to DB9 connector of Logitech G27 wheel base:



I have some amount of soldered boards to sell but all designs are freely available in case if you want to make it yourself.

IMG_3948.JPG

Actually this is a part of a larger project to build a custom Formula 1 style steering wheel using Logitech wheelbase but this project is delayed at the moment. If you have some skills in hardware hacking or microcontroller programming your help in this project will be appreciated.
 
This is great! Thanks for sharing. If I ever get anywhere with my own G27 project I'll be open sourcing that too. Feel the love!
 
I'm interested in buying one ready-made ( Saw you offered this on your site )..

I have a bad neck / back and severe nerve damage from car accident may 7 2011 where other party ran a stop sign and hit me... Basically I get 2 hours of lowest-level pain ( 4 / 10 ) every 72 hours and I use that to keep my sanity before torture resumes... How much is one fully assembled?


I am planning on buying the G25 or G27 shifter ( 25 has the Sequential to Incremental system which is nice ) and G27 or G29 pedals.. Does your software include auto calibration for pedals ( Ie when plugged in just press each pedal once like you do with the wheel or do you have to calibrate it each time? Auto calibrate would be super easy to code in so I am considering arduino board such as tweensy because of this, but I'd prefer something ready-made because of injuries ). Thanks.
 
I'm interested in buying one ready-made ( Saw you offered this on your site )..

I have a bad neck / back and severe nerve damage from car accident may 7 2011 where other party ran a stop sign and hit me... Basically I get 2 hours of lowest-level pain ( 4 / 10 ) every 72 hours and I use that to keep my sanity before torture resumes... How much is one fully assembled?

Hi Acecool! I'm sorry to hear about your injuries. I hope simracing will make you feel better. Unfortunately I sold out all the devices at the moment. I did not decide yet if I want to make a second batch of devices. If I decide to make some additional devices it will take about two months (order PCBs from SeeedStudio, assemble, test and send one to you). Fully assembled and tested device will cost about $16 not including shipping fees (typically about $6-$8). If you need something right now you may look at Leo Bodnar's devices:

http://www.leobodnar.com/shop/index.php?main_page=product_info&products_id=187

http://www.leobodnar.com/shop/index.php?main_page=product_info&products_id=188

I didn't test Leo Bodnar's devices personally but I heard a lot of simracers use them. I believe my device is better but it takes time to make them...
 
Leobodnar comes out to $65 for the Pedal device, and the shifter device... I'd rather use arduino / tweensy than pay $65 O_o... Leos does support 10 bit for 1024 steps which is nice for more accuracy, not sure on yours?? His also does 250 steps per second and yours is at 500 or?

I know I can build it; I have a rework station and I do repair electronics from time to time ( monitors, miscellaneous purchases here and there ), but the problem is ( aside from injuries ) I have issues placing order and the board doesn't seem to be included on ANY of the links... The first one comes out to around $1,600 the second is like $30, then $16, etc.... No idea what the 1 + 10% is for either... It is difficult to know exactly which parts to order...

If it is possible to get it within a month I'll gladly pay you $30 shipped Paypal discreet, but if not can you help me with ordering the parts? The plugin for Chrome doesn't seem to work on all sites ( Last one asks for you to choose United States each time ) and the others, as said, charge huge rates or don't include all parts and I haven't seen the board on any of them.. Your site is slightly confusing as it seems circular ( Buy the PCB on this site, click and then either download layout [ +1 on open source and hardware ] but no purchase... ) and could use some updating...

I would definitely prefer 1 USB device for both shifter and pedals instead of 2 devices as with LEOs...

Thanks in advance!


Oh, are you familiar with Logitech Momo Racing Wheel ( Black )? FF doesn't work although one pin does add power which gives resistance from motor vs removing the pin and it being easy to turn ( although that could be electric braking ); I still need to test the motor individually and if good then it is likely the board ( the motor / J2 one of the pins broke free of the solder and the trace lifted up.. I resoldered it and now I do get some lights but they flicker [ if I hold the accelerator down all the way then plug the device into power and release then the usb-light is full on but still flickers slightly; power light turns on for a split second but only if I plug power AND usb in at exact same time ] ) - can't afford new wheel for now... Shifter is $30 and pedals are $30 I may be able to get G27 wheel for $100 ( new is $300 maybe $230 depending on sale so it would be a lot cheaper buying individually )...
 
Last edited:
I'll try to answer questions one by one:

My device has 12-bit ADC (4096 steps) and 2 ms update interval (500 Hz). However there is a complementary filter implemented in firmware to reduce potentiometer noise so pedals acceleration is slightly lower (compared to not filtered output). In fact I don't think it makes any real difference because most racing games update physics at lower frequency (e.g. 60 Hz for iRacing). The same applies to ADC resolution due to potentiometer noise.

If you are looking for a cheapest possible solution then it's possible to use a $2 STM32 minimal development board with some wires and a couple of DB9 connectors. I assume that total cost will be less than $5.

I can also sell you the really last device I was keeping for myself to make firmware updates. Since last firmware seems to be good enough I think I can do that. It will cost about $26 including shipping cost. I will put it on ebay and send you a link if you interested.

I had Momo Racing Wheel some time ago but never opened it so I cannot help with repair, sorry.
 
Don't get me wrong, I would absolutely love to have one right away, and the spcs sound great, but if something comes up you'd be out of one so I'm not sure that would be fair to you or the community especially because you're using it for dev purposes - otherwise I'd say I'll take it, link me...

A few questions:

Is there the auto-calibration for pedals built into the code? IF not, since it is open source I may take a look at it...

Most importantly then: The list of components ( especially your board [ do I send the files to a manufacturer or how does that work?? ] which I couldn't find ), because I was having trouble with the plugin, and I can solder it together.. Then you're not without your development device.
 
Pedals are calibrated using DXTweak2 or default Windows calibration panel. I have no idea why would anyone need auto-calibration but if you want to make it - you're welcome.

Here is a list of components: https://github.com/robotsrulz/SP_Adapter/blob/master/Schematics/1-click-bom.tsv
There is no strict requirement to use exact part numbers, I used cheap Chineese replacements instead.

I attached Gerber files to order PCBs from Seeed Studio. Upload zip file here and fill the form, board dimensions are 50x50mm: https://www.seeedstudio.com/fusion_pcb.html You may use other PCB service but they may have different requirements to Gerber files.
 

Attachments

  • Gerbers-Adapter-v10.zip
    66.7 KB · Views: 64
Cheers.. So it seems I have to order 10 ( price between 5 and 10 is identical )... and I'll probably go with ROHS components. so instead of $9.90 it'll be $17.90 with the following settings... Is there anything incorrect? If I have to order 10 I may as well order the components for 10 ( should be less expensive per individual component; or not? ) and either assemble or sell the remaining unassembled boards? ( Although I'm sure there are those that would appreciate a pre-soldered board who may not have a rework station or the patience for such work )?

Material: FR4 TG130
Layers: 2
Size: 50x50mm
Qty: 10
Panels: 1
Thickness: 1.6mm ±10%
Color: Blue ( Personal preference although i might go black... )
Finish: HASL Lead Free ( Doubles the price )
Copper Weight: 1 Ounce
Minimum Hole Spacing: 0.3mm
Minimum Width of Track / Spacing: 0.6mm
Blind Vias: No ( Can't be changed )
Half-cut / Castellated Holes: No ( Can't be changed )
Impedance Control: No


I'm curious though; this one is Rev 1.0 ( according to viewer on site ) and you're working on ( or done with?? ) 1.1... How far off is that design before it is ready to order / manufacture? Because of the mounting holes ( and maybe less parts for redesign? or smaller or? ) for the case it may be worth it to wait ( I'd probably mount it in wood, or print a case when I can afford a 3D printer )...
 
The settings look correct to me, however, lead free finish is your personal choice, I never set this option. Yes, I understand that lead does some damage. I don't think that makes any sense because I already live in a dump place:

14204335384948.jpg


Assembling and selling extra boards will be funny, reminds me of Amway or Oriflame business :)
 
Version 1.1 has identical schematics, I only added power LED (0603 size led + 0603 330 Ohm resistor) and mounting holes for acrylic case. I did't order new PCB's so it's not tested
1.1.png
.
1.1-case.png
 
If you have a breadboard setup, does it work? Adding LED shouldn't be too difficult; I'm an expert with logic, programming, debugging, etc. ie everything software and whatever translates to other fields. But having to debug a board ( aside from the normal things to repair electronics such as monitors, etc.. ) isn't my strongest area of expertise as I've only just begun with building my own electronics after repairing for many years..

If you were in my shoes, which would you order? 1.0 or 1.1?
I do like the fact that 1.1 has the 3 extra mounting holes and that there is a design for a case ( which can be made out of easily sourceable materials ). A few things on the design are moved around slightly or ( Comparing the 2 designs in the viewer it does appear so... )?

I may go ahead and order 1.0 and then order 1.1 later on...

I'm curious, how do I program the board once it is assembled? Is it USB or JTAG or? I'll probably need to build a cable for that, eh?

Does it matter which port I plug the shifter into vs the pedals or either or?
 
If you have a breadboard setup, does it work? Adding LED shouldn't be too difficult;
No, I didn't test it on breadboard. As I said before version 1.1 has the same schematics as 1.0, I only added power led and mounting holes. I ordered new pcbs yesterday, you can wait a couple of weeks then I can confirm it's okay. Right now only version 1.0 is 100% tested and 100% proven to work okay.

I'm curious, how do I program the board once it is assembled? Is it USB or JTAG or? I'll probably need to build a cable for that, eh?
The board can be flashed with DFU tool (see section Firmware update in README on GitHub). You need only USB cable to flash new firmware. However if you plan to debug firmware then you will need ST-LINK v2 adapter, either original or cheap clone, no preference.

Does it matter which port I plug the shifter into vs the pedals or either or?
One connector is male, the other is female. Yes, there is a difference and each connect must match its counterpart on shifter and pedals cables.
 
Are you willing to share the gerber file for 1.1, or are you going to wait until you test it? I may as well go ahead and buy it; I trust you and I trust that you know what you're doing :-)
 
Last edited:
I attached gerber files for v1.1, remember that this version was not tested yet...
 

Attachments

  • Gerbers-Adapter-v11.zip
    33.6 KB · Views: 43
Thanks! I'll be placing the order today.

I'm curious; what Gerber / editor software do you use?
 
Thanks!

I found another site that is half the price: http://www.elecrow.com/services/pcb-prototyping/10pcs-2-layer-pcb.html but the files need to be exported differently it seems.

Reason I am looking around is because I'm waiting on a question I had from seeed ( price difference of $3 if you order expedited vs normal; ie expedited form without 2 day expedited option selected is $3 cheaper )..

Elecrow also have assembly service plus a list of almost 400 parts that they'll provide for free, which seems nice. Waiting on a response from them as well.

Once I order I'll review the code for auto calibration ( pedals would be simple to calibrate; just log min and max and apply a small buffer, especially if jumpy ) ( Shifter could also be auto calibrate if 2 axis joystick as I believe it is ).
 
Is it possible to get the BOM file too ( Updated for 1.1? )

When I try ordering any from digikey, etc.. the price ends up being close to $2000 USD because of minimum order of the SM chip being 1400 units, caps being 4000, etc... IE default options are used.

Thanks!

Edit: RS site doesn't add anything to cart. Newark has messed up defaults ( order minimums that bring price to $1500 ), Digikey has same issue as Newark.. 2 of 5 work "properly"?..
 
+1

I already placed the order for the PCBs not too long ago so they should be arriving pretty soon here. Do you make the cases or are they made somewhere?
 
I ordered some acrylic cases from Dangerous Prototypes. It's much cheaper to find a local laser cutter but I had some DP discount coupons and wanted to test their services. Unfortunately my case design has a serious issue - I didn't think how connector side panels will be attached so I had to use some glue to attach them. While next version of acrylic case design isn't ready yet I tried to make a 3d printed case. This attempt was much better, printed case fits the board nicely. I will upload stl files if you're interested.

DSC_2996 (1).png

PS: Ebay listing: http://www.ebay.com/itm/262806713437
 
Last edited:
My PCBs should be arriving in the next week or 2... I'll take some photos when they arrive; total cost from elecrow
Subtotal $9.50
Shipping & Handling $4.80
Grand Total $14.30 USD

for 10 without parts..Not bad.. With parts ( tons of surcharges ) is like $10+ to $20+ per board which seems kind of high..

Do I need the programmer for these? Most likely right? I purchased one ( ST-Link V2 Programming Unit mini STM8 STM32 Emulator Downloader M89 New GM ) to go with the STM32F103C8T6 I bought to play around with..

I'm going to go ahead and place the order for the components x 10 ..

The funny thing is I missed out on the holiday sales for the pedals and shifter which was $30 USD each :-(

Trying to find a set ( found some pedals for $40 shipped but the ebay seller relisted it and canceled my winning bid claiming I asked for it - disappointed ) or I may just buy a wheel if I can find one for under $150 shipped.
 
I just received the boards today... 10 to 11 days ( Pretty sure it came yesterday or so and I ordered in late / pm if I recall correctly ); not bad from start to finish... They even included the through-hole-continuity cylinder for the all of the holes which seemed like it was supposed to be an "extra" cost on the other site. All of the edges are 100% burr free; they're really smooth... The quality seems to be better than the STM dev-board I purchased not long ago. I honestly didn't expect the pcbs this soon; so I still need to order the rest of the parts ( and a shifter / pedal set because I lost out on the holiday sales )...

As promised; photos showing their service, packagine, etc.. - Note: There aren't scratches or smears - those are camera artifacts. I'll try to get better pictures later on.

Envelope - padded: https://dl.dropboxusercontent.com/u/26074909/_photos/pcb_for_pedals_and_shifter/20170127_131935.jpg

Another layer of bubbles: https://dl.dropboxusercontent.com/u/26074909/_photos/pcb_for_pedals_and_shifter/20170127_132020.jpg

Yet another layer of bubbles with the pcbs being shrink-wrapped to the bubblewrap: https://dl.dropboxusercontent.com/u/26074909/_photos/pcb_for_pedals_and_shifter/20170127_132101.jpg

underside: https://dl.dropboxusercontent.com/u/26074909/_photos/pcb_for_pedals_and_shifter/20170127_132107.jpg

PCB top ( Note: These aren't scratches; the glint / glare is from the silver hole-cylinders ): https://dl.dropboxusercontent.com/u/26074909/_photos/pcb_for_pedals_and_shifter/20170127_132146.jpg

PCB bottom: https://dl.dropboxusercontent.com/u/26074909/_photos/pcb_for_pedals_and_shifter/20170127_132153.jpg

Closeup bottom: https://dl.dropboxusercontent.com/u/26074909/_photos/pcb_for_pedals_and_shifter/20170127_132158.jpg

Closeup top: https://dl.dropboxusercontent.com/u/26074909/_photos/pcb_for_pedals_and_shifter/20170127_134308.jpg
 
Looks great, now it's time to buy chips, crystals, resistors, etc. Meanwhile I sold 6 of 10 adapters and ordered next batch from SeeedStudio...
 
I went ahead and soldered the leads onto my STM32 board to start testing before I get components in ( also got a breadboard and the STM32 Link 2 [ actually, they sent me 2 instead of 1 O_o ] ).

Do you have specifics in terms of each component? Some part numbers show up as 35v or 6.3v, etc...

I went through and updated part numbers, set up cost in excel, etc... eBay seems to be the least-expensive overall but with different parts showing up as different voltage, etc.. I'm not sure which to get. Here's the updated excel file ( feel free to use any or all part of it for the site ): https://dl.dropboxusercontent.com/u...s_and_adapters/PedalAndShifterController.xlsx

Here are saved shopping carts containing all, or almost all components which had export / import option on carts...

DigiKey ( You can actually load up my saved cart; although because they don't have some parts in stock it wants you to buy entire order for several thousand dollars ): https://www.digikey.com/MyDigiKey/Home/ResumeOrder?webId=161770774&accessId=24125

Newark: https://dl.dropboxusercontent.com/u..._controllers_and_adapters/Newark_ShopCart.csv

Farnell: https://dl.dropboxusercontent.com/u...controllers_and_adapters/Farnell_ShopCart.csv

Edit: I wasn't thinking clearly... Pretty sure caps the only thing that matters is Farads and voltage acts as capacity or something. Going to double check and place the order today. Oh, I just got the shifter in from eBay. Any way to quickly test it with my stm32f01 board? I'll look up something because I'm sure someone posted the code for it online and being able to test would be nice.. I had to resolder the usb micro port because it wasn't seating the cable properly... Once I get parts I can begin assembling the pedal / shifter boards; I'm thinking of making wood boxes for them...

Edit: One of the most expensive components are the 2 DB9 ports which can be $4 each; on ebay you can get 20+ for between $3 and $6 depending if it is male or female... I will be ordering some of the parts in larger quantities as I do want to get more into hardware development and having them on hand will be useful ( and the prices for 100 is the same, or very close, to 10 of them )...
 
Last edited:
Short: I have a few questions regarding pin-outs...

If BOOT0 text is facing up is the female db9 port on the right or left ( I believe left but I need to verify )? Same orientation for all other questions...

For the 5 pin debugging / flashing pins at the bottom left, the silkscreen doesn't have which pin is 3.3v, 5.0v, ground, swdio and swclk; do you mind elaborating which pin is which I can update silkscreen and submit a pull request for the other changes too?

For the BOOT0 pins, what are the differences when using a jumper to connect left-bottom and left-top vs right side?

For the 27/25 pins the same ( I believe it is vertically so center bottom for 27 pedals / shifter depending on side, and top and center for 25 ) which side is for pedals vs shifter?

For the voltage regulator, there is a . on the silkscreen.. is this the key for a dimple ( if there is one ) or does it indicate positive lead?


I updated short version to remove things a photo revealed...



Long version:

I have a few questions if you don't mind... I have all of the parts except the 10uF caps ( which I accidentally removed from my cart and added 2 sets of 4.7uF caps when I was comparing prices ), double-row headers ( which I may end up not using for this ), the micro usb port, the 5v to 3.3 voltage regulator and the DB9 Male port...

I started soldering the first by hand ( Normally I'd set up a line and do all of x, then y, then z to all ) so I can test my pedals and shifter asap and to see how well my solder connections look ( I ordered a tweezer set as mine are too large to be effective and will order a pcb vice because the dual claw thing I have is useless ) to determine whether or not I will build a reflow oven or do them by hand... Hardware is interesting and since I have software down to an art and also teach it, I was thinking of learning hardware... especially since prototyping and ordering boards ( using breadboards or doing mockups with wires causes other issues and everything is more stable on a board ) has become very inexpensive nowadays...

1 ) Assuming from photos on your site, which don't quite have a clear angle for certain parts... and if you're looking at the board with the BOOT0 text up then the FEMALE DB9 port goes on the right ( silk screen doesn't show it ).. Some of your photos show the smallest section of the port but it is still hard to determine whether or not it is female but I believe it is but would like confirmation...

2 ) I ordered different colors of headers and have removed pins from 1 strip of each of six colors ( white, black, blue, green, yellow and red ) and depinned one angled set... I want to set up the debugging angled port with color coding as there is no silk-screen as to which pins are for: SWCLK, SWDIO, GND, 3.3V, 5.0V ( if included ), ( or these which may not be included: SWIM, RST ) - I'm guessing SWCLK, SWDIO, GND, 3.3v and 5.0v are all included ( 5 pins; 4 of which are used by STLink2 to program the board but I only saw 3 used on your photos.. I'm guessing 3.3v, ground and swdio... ) In short I'm wondering which pins correspond to which - I will look up the STM32F042F6N6 pin-out and see about tracing the traces to the pins and updating ( and submitting a push request on git ) the silkscreen with them..

The reason is to add color-coding to the header pins to make it easier until next version with updated silk-screen ( although I may opt to continue using coloring ). Likely colors will be 3.3v as red or white ( as white is still an electrical hot wire and easily identifiable for those that are color-blind ), ground as black, 5.0v as red, yellow or white ( depending on choice for 3.3v - likely to be red ), input / output as green, and sw click as blue...

3 ) I'm interested in knowing the BOOT0 pin in terms of the different modes or differences between jumping the left side vs right side.. so I can set up colored headers to show the right position and to update the silk-screen.

4 ) I'd like confirmation as to my suspicions regarding the jumper positions for the 27 / 25 marker... in terms of which is for shifter vs pedals...

5 ) Confirmation that the . for the voltage regulator is the "key" for positive or negative to verify that I purchased the right layout for the regulator ( although I haven't checked if they changed but since I bought it on eBay I'd like to be safe )..

6 ) The PWR LED negative silkscreen marker is barely noticeable when printed on the board - but it is easy to trace the wires and determine the left pad ( using the same board orientation above ) is the ground...

Thanks!
 
Last edited:
I was able to test the unit today; still waiting on the C8 cap, voltage regulator and a few things to make assembly easier.. Since c8 regulates usb power I used the 3.3v from the stlinkv2 to power it.. Everything else was fine. I did use a wall charger though for turning it on and off to test certain states...

The micro-usb adapters I have are garbage. There are plastic standoffs that need to be broken off and the metal prongs are super short and there are only 2 mounting points which isn't good, not to mention the metal doesn't seem to stick well to the solder I have so I had to wedge it in, basically... so I'm probably going to buy a set of 400 pre-tinned wires and come off of the board until I find a replacement micro-usb connection that works... At least this way I am not applying any pressure on the board
 
I didn't find the footprint for these micro usb sockets so I have to break standoffs too. But since you don't have to apply significant force to the connector no need to worry about that.

Rev 1.2 boards use the same sockets.

IMG_4324.JPG
 

Latest Posts

Back