0

Wireless steering wheel for DIY DD FFB Wheel
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Wireless steering wheel for DIY DD FFB Wheel

by Prickles on Fri Jul 10, 2015 9:17 pm

So I play iRacing and have just finished off my DIY DD FFB wheel and made two rims to go with it (utilising Adafruit's Bluefruit EZ-Key modules and Pro Trinkets).

GT Rim (Fanatec GT)
Image

Image

Image

Formula Rim (Fanatec Flat1)
Image

Image


Features:

Fanatec Flat1 (modified so I can see the beautiful Z1 screen) and GT Rims
Available here
https://www.fanatec.com/au-en/steering-wheels;showaccessories;1


Beautiful Carbon Fibre Button Plates
Designed by myself, supplied and cut thanks to Brett from Hybrid Racing Simulations (HRS). https://www.facebook.com/HybridRacingSimulations?fref=ts
Sketchup files provided below (with paddle shifter holes moved outwards 5mm on the Formula Rim to give more room for QR)
Note: the shifter mount holes needed to be countersunk too.

Wireless/Bluetooth
Each rim uses 2 bluefruit (bluetooth) modules, a pro trinket (microcontroller for rotaries), a charger, and a 2000mAh battery (all from http://www.adafruit.com). And on/off switch (from Jaycar). Further details below.

Holger Buchfink Quick Release (70mm GT and 50mm Formula)
These things are amazing. Wouldn?t recommend anything else for a DD wheel. Absolutely ZERO play.
http://www.beyondmonkey.com/pub/q1r/q1r.html
Note that I used 15mm spacers to make room (just!) for the bluetooth modules etc.
http://www.ebay.com.au/itm/301400291143?_trksid=p2057872.m2749.l2649&var=600371081173&ssPageName=STRK%3AMEBIDX%3AIT
I grabbed the 15mm M4 but I drilled them out to M5 - had to go the smaller size to get the larger charger to fit on my formula rim.

Image

Ascher-Racing Paddle Shifters
They look great and feel even better! Have a clicky magnetic action.
http://www.ascher-racing.com/
I added some spacers to my paddles to move them away from the rim. I used 9mm M3 untapped spacers from Jaycar. Definitely recommended.

Image

Buttons etc.
Each wheel has 5 pushbuttons, 2 two-way toggles, 2 rotaries, a Leo Bodnar Hat Switch, and the paddle shifters.


More information:

Here are the part numbers for my switches etc
From DigiKey:
Rotary Knob - 226-1064-ND
Rotary Encoder - CT3002-ND (Note that I can only get these to produce an input for every 2 detents when rotating ? no biggie bit 1:1 would be nice).
Toggle Switch - 360-2065-ND
Toggle Switch Caps - eg. 360-2764-ND
Pushbutton - 360-2876-ND
Pushbutton Caps - Hope this link works, there's two sizes, I got the 10mm ones - http://www.digikey.com.au/product-search/en?pv47=14632&FV=fff40011%2Cfff804a2%2Cfffc0168%2C1140348%2C3a8002d&mnonly=0&newproducts=0&ColumnSort=0&page=1&quantity=0&ptm=0&fid=0&pageSize=25
Pushbutton Guard (Large) - G13B-ND
Pushbutton Guard (Small) - 450-1063-ND (I think this is the one?)

Hat Switch from Leo Bodnar:
http://www.leobodnar.com/shop/index.php?main_page=product_info&products_id=210
Note: to mount these I had to use 3x1mm spacers between the pcb and the button plate.

Links for the Bluetooth stuff:

All the bits are from http://www.adafruit.com

Bluefruit EZ-Key (I have two per wheel as each module can control 12 inputs)
https://www.adafruit.com/product/1535

Bluetooth receiver
https://www.adafruit.com/products/1327

USB LiIon/LiPoly charger
https://www.adafruit.com/products/259
Could use this mini charger http://www.adafruit.com/products/1905 to make a bit more space (would solder closed the jumper on it so it can charge in 500mA mode with the 2000mAh battery)

The 2000mAh battery
https://www.adafruit.com/products/2011

And I'm using the 3.3V Pro Trinket get the rotary encoders working
https://www.adafruit.com/products/2010 although they said 5V one would work fine too.

To get my rotaries working (using the Pro Trinket), I had to use the Arduino software to upload the code onto the Trinket. Followed instructions here:
https://learn.adafruit.com/introducing-pro-trinket/overview

Re: wiring. I just wired the rotaries to I/O pins on the Trinket, then wired the Tx (send) pin on the Trinket to the Rx (receive) pin on the EZ-Key.

Here is the code I used for my rotaries (note that my rotaries are connected to pins 3 & 5, and 9 & 10 respectively. They are also coded to transmit keyboard keys s & r, and z & y also). I can only get them to produce one button press for every two detents when rotating though.... I had/have no coding experience whatsoever so this was like learning another language for me!

Code: Select all | TOGGLE FULL SIZE
/* Rotary encoder handler for arduino.
 *
 * Copyright 2011 Ben Buxton. Licenced under the GNU GPL Version 3.
 * Contact: bb@cactii.net
 *
 * Quick implementation of rotary encoder routine.
 *
 * More info: http://www.buxtronix.net/2011/10/rotary-encoders-done-properly.html
 *
 */

// Half-step mode?
#define HALF_STEP
// Arduino pins the encoder is attached to. Attach the center to ground.
#define ROTARY0_PIN1 3
#define ROTARY0_PIN2 5
#define ROTARY1_PIN1 9
#define ROTARY1_PIN2 10
// define to enable weak pullups.
#define ENABLE_PULLUPS

#define DIR_CCW0 0x10
#define DIR_CW0 0x20
#define DIR_CCW1 0x10
#define DIR_CW1 0x20

#ifdef HALF_STEP
// Use the half-step state table (emits a code at 00 and 11)
const unsigned char ttable[6][4] = {
  {0x3 , 0x2, 0x1,  0x0}, {0x23, 0x0, 0x1,  0x0},
  {0x13, 0x2, 0x0,  0x0}, {0x3 , 0x5, 0x4,  0x0},
  {0x3 , 0x3, 0x4, 0x10}, {0x3 , 0x5, 0x3, 0x20}
};
#else
// Use the full-step state table (emits a code at 00 only)
const unsigned char ttable[7][4] = {
  {0x0, 0x2, 0x4,  0x0}, {0x3, 0x0, 0x1, 0x10},
  {0x3, 0x2, 0x0,  0x0}, {0x3, 0x2, 0x1,  0x0},
  {0x6, 0x0, 0x4,  0x0}, {0x6, 0x5, 0x0, 0x20},
  {0x6, 0x5, 0x4,  0x0},
};
#endif
volatile unsigned char state0 = 0;
volatile unsigned char state1 = 0;

/* Call this once in setup(). */
void rotary0_init() {
  pinMode(ROTARY0_PIN1, INPUT);
  pinMode(ROTARY0_PIN2, INPUT);
}
void rotary1_init() {
  pinMode(ROTARY1_PIN1, INPUT);
  pinMode(ROTARY1_PIN2, INPUT);
#ifdef ENABLE_PULLUPS
  digitalWrite(ROTARY0_PIN1, HIGH);
  digitalWrite(ROTARY0_PIN2, HIGH);
  digitalWrite(ROTARY1_PIN1, HIGH);
  digitalWrite(ROTARY1_PIN2, HIGH);
#endif
}

/* Read input pins and process for events. Call this either from a
 * loop or an interrupt (eg pin change or timer).
 *
 * Returns 0 on no event, otherwise 0x80 or 0x40 depending on the direction.
 */
unsigned char rotary0_process() {
  unsigned char pinstate = (digitalRead(ROTARY0_PIN2) << 1) | digitalRead(ROTARY0_PIN1);
  state0 = ttable[state0 & 0xf][pinstate];
  return (state0 & 0x30);
}
unsigned char rotary1_process() {
  unsigned char pinstate = (digitalRead(ROTARY1_PIN1) << 1) | digitalRead(ROTARY1_PIN2);
  state1 = ttable[state1 & 0xf][pinstate];
  return (state1 & 0x30);
}
void setup() {
  Serial.begin(9600);
  rotary0_init();
  rotary1_init();
}

void loop() {
  unsigned char result0 = rotary0_process();
  if (result0) {
    Serial.print(result0 == DIR_CCW0 ? "s" : "r");   
  }
  unsigned char result1 = rotary1_process();
  if (result1) {
    Serial.print(result1 == DIR_CCW1 ? "z" : "y");   
  }
}



3M Dual Lock to hold all the bits in place. They aren't going anywhere?. http://solutions.3m.com/wps/portal/3M/en_US/Adhesi...ual-Lock-Reclosable-Fasteners/


Feedback

After using these rims, some thoughts:

I have a friend who has purchased some of these (they might be the same as the Fanatec Funky Switch???)
http://www.alps.com/prod/info/E/HTML/MultiControl/Switch/RKJXT/RKJXT1F42001.html
If they do work the same, I would replace the Leo Bodnar Hat Switch with one. The Leo Bodnar Hat Switch is quite tricky to use accurately.

I would try out the smaller charger ? as the pics suggest, space is at a premium here!


More pics
Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image


Pics of my chopped the top off the Formula Rim. Thanks to Henk Schoone who was the pioneer of this procedure :D (http://members.iracing.com/jforum/posts/list/3291489.page#8613078)[/size]

Image

Image

Image

Image

Image

Image
Image

Prickles
 
Posts: 8
Joined: Mon Jun 01, 2015 8:48 am

Please be positive and constructive with your questions and comments.