Logitech Freedom 2.4 PWNED!!!! Version 1.0

For system help, all hardware / software topics NOTE: use Coders Corner for all coders topics.

Moderators: Krom, Grendel

Post Reply
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Logitech Freedom 2.4 PWNED!!!! Version 1.0

Post by SuperSheep »

I'm kissing those crappy hatswitches goodbye and replaced them with...

A joystick!

Yep, you heard right. I ripped out the old hat switches, ground away the plastic housing and made a nice cutout in the top of the joystick to support a miniature joystick. The 4 mounting holes that support the joystick actually fit right into the angled cutouts for the plastic assembly. All I had to do was drill 6 holes for the pots and wire the +/- and signal leads.

For this version, I have disabled both the twist and throttle axis's of the joystick and used them for the hat joystick's axis's.

Playtested in D3 and it works flawlessly. Nice smooth sliding and completely analog.

For version 2.0, I intend to hook a PIC microcontroller to the hat joystick and use it to simulate button pushes thereby simulating analog control but without giving up the twist and throttle.

To give you an idea of the differences in lifetimes, the average switch of this type is rated ~50,000 cycles whereas the analog joystick is rated at...1,000,000 cycles. May mean never having to worry about a faulty hat ever again.

If any of you own a Freedom, or have followed the threads about the crappy freedom hat switches, then you know why this is such a godsend, and for you good people, I will be posting pictures and giving detailed instructions on how you can do this to your stick.
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

Very nice ! Pics ? I would suggest to use the Atmel mega8 over the PIC -- more power, more functions, easier to program, free tools etc. (chip is $3.66 @ DigiKey :)). Let me know if you need assistance.

JFYI -- the hat switches Logicrap uses are rated at 1,000,000 cycles (Omron B3F-3125), also the main problem I had w/ the 2.4 (after getting a handle on the hat assembly) where the X/Y/Rz pots wearing out after ~3 months..
User avatar
Mobius
DBB_Master
DBB_Master
Posts: 7940
Joined: Sun Jun 03, 2001 2:01 am
Location: Christchurch, New Zealand
Contact:

Post by Mobius »

But sheepy - the HAT switches themselves don't wear out! What wears out is the four plastic splines on the HAT toggle mechanism.

Simply put, by grinding down the splines by a couple of millimetres, and then gluing (with super strength Araldite) a 1cm long piece of high-tensile stainless steel wire onto the ground-down spline section, results in a complete and total fix for the "2.4 HAT problem".

I did this to mine - and it's working perfectly.

Repeated disassemblies show there's no wear on the stainless steel (well, some "polishing" rather than wear.) and as already stated, the OMRON switches are rated to 1,000,000 operations. And in fact, IIRC, the pink ones (with 200 grams closing force) might even be rated to 2,000,000 operations.
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Thanks for the info Grendel. The only reason I'd use a PIC is I already have several, a programmer, and several software packages. I will check out the ATMega though, thanks.

My information on switch life was off. I was using data from general pushbuttons. I personally don't know why, maybe I'm really abusive to the hat, but I have broken several switches already.

Mobius...I did modify my stick similarily to what you did, but I am rather abusive with my sticks and actually wound up pushing the hat through the bottom of the plastic holder.

Lastly, Analog control > 8-way hat. Linear control of sliding, full directional control, and long-life.
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Sorry in advance for picture quality. I'll try using the digital camera tomorrow.

Without Hat Cover

Without Hat Cover #2

With Hat Cover
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

Very nice (after changing the extension to *.jpg ;)). Check out the MJoy Project for some more info about the ATmega8.
User avatar
WarAdvocat
DBB Defender
DBB Defender
Posts: 3035
Joined: Sun Jun 23, 2002 2:01 am
Location: Fort Lauderdale, FL USA

Post by WarAdvocat »

pix came up fine in my browser :P

Now, has anyone overcome the whole axis instability thing with the logitech sticks?
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Ok, check the pictures again. Uploaded better quality from my digital camera.

WarAdv...I want to change those too but the only way I've found so far is to buy another joystick and use the pots, basically a replacement scenario similar to the hat switches.

Grendel...Tripod doesn't support linked images, so I had to change the extensions. Thanks for the link. I visited that site before after viewing your thread about the Sidewinder PPro.

Steps I used to convert stick...

1. Bought a MadCatz Gamecube controller from best buy. Cost ~ $15. Other controllers may work if they have small enough joysticks internally. This may or may not be the same joystick.
2. Disassembled the logitech.
3. Desoldered the 4 hat switches and the 2 top buttons(numbered 5 & 6).
4. Cut the PCB copper traces leading from the hat switches and buttons to the transistors. Necessary because the holes for the mini joy pins intersect the traces in some places.
5. Drilled 6 holes for the mini joy potentiometer pins.
6. Ground down the plastic assembly that holds the hat stick till there was sufficient clearance for the mini-joystick.
7. There is a 3 pin connector on the logitech handle PCB that has a red, black, and green wire. I wired the red and black to the outermost pins of the 2 pots on the mini joystick. Doesn't really matter which is which, it'll just change the axis direction(may need to be inverted in software)
8. Connected the green to the horizontal pot on the mini joystick center lead. Disconnected the wire from the twist pot.
9. Ran a separate wire from the vertical pots center lead down through the handle to the base. Traced the center wire from the throttle pot back to the base PCB, removed it and soldered the separate wire to it.

That's about it. I will hopefully get some pictures of the insides so that you can see the steps as well.
MD-2389
Defender of the Night
Defender of the Night
Posts: 13477
Joined: Thu Nov 05, 1998 12:01 pm
Location: Olathe, KS
Contact:

Post by MD-2389 »

Because I'm a nice guy....

First image

Second image

Third image

Sheep, if you have any more, then feel free to e-mail them to me. md2389@gmail.com

You could also just create a simple html document, and embed the images on that and just leave a link here.
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Thanks so much MD!

I'm working on the PIC software now. I'm going to make the twist use the emulated buttons and that way I can keep the full analog hat mainly cause it's just so darned smooth. :)
Jesus Freak
DBB Ace
DBB Ace
Posts: 373
Joined: Mon Feb 24, 2003 3:01 am
Location: Mechanicsville, Md, USA
Contact:

Post by Jesus Freak »

Very nice! Logitech should implement that into their next joystick :)
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

I'd only buy a Logitech again if they implement the Interceptor technology (HAL sensors).

Sheep, make sure you build everything into the handle, that wat you can easily replace the base when the X/Y pots go bad.
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Thanks for the great feedback guys. I tried implementing the PIC Micro today. Here's what happened...

I wrote the software to read the analog signal from the "twist" pot, and output to 2 separate I/O pins. One I/O pin is for "twist left" the other for "twist right". When the A/D reads a value near middle with a specified "dead band" both outputs are low. When you begin to twist right, the "twist right" output begins outputting pulses in PWM format and the "twist left" output is held low. Vice versa for other twist direction.
The PWM is as follows...
Little twist=short on time, long off time.
Large twist=long on time, short off time.

Put the whole contraption on a PCB, soldered the + and - leads, the pot lead to the A/D input, and the outputs to each of the switches.

Well, the whole thing did not work at all. Seems that the buttons in the head of the joystick are multiplexed which means I either have to use a analog switch to simulate button pushes or hopefully use 2 buttons from the base of the unit.

Grendel...Not nearly enough room in the handle. Even if I use SMD the whole way, it would be a really tight squeeze. I'll probably wind up making my own custom cable harness for the handle to add however many leads I need.

Version 2 looks to be some more work than I originally thought, but I will get it working and post the results.
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

Use a transistor to mimic a hat switch maybe ?
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Could be done that way too. I'll know more tomorrow when I look closer. The analog switch is nice cause I think overall, it'll be smaller and won't require any passive componenst.
User avatar
Mobius
DBB_Master
DBB_Master
Posts: 7940
Joined: Sun Jun 03, 2001 2:01 am
Location: Christchurch, New Zealand
Contact:

Post by Mobius »

MD-2389 wrote:Because I'm a nice guy....
Yeah - you converted sheepies garbled text/images into an unavailable domain name! EXCELLENT WORK! Yuo deserve a cookie. :)
MD-2389
Defender of the Night
Defender of the Night
Posts: 13477
Joined: Thu Nov 05, 1998 12:01 pm
Location: Olathe, KS
Contact:

Post by MD-2389 »

Mobius wrote:
MD-2389 wrote:Because I'm a nice guy....
Yeah - you converted sheepies garbled text/images into an unavailable domain name! EXCELLENT WORK! Yuo deserve a cookie. :)
They worked when I posted, and everyone I've talked to can view them. Not my fault your ISP sucks. ;)
User avatar
Admiral LSD
DBB Admiral
DBB Admiral
Posts: 1240
Joined: Sun Nov 18, 2001 3:01 am
Location: Northam, W.A., Australia
Contact:

Post by Admiral LSD »

Both SuperSheep original links and MDs newer ones work fine here. It's interesting that SuperSheeps worked, normally Opera interprets the .txt extension literally and prints the file as text but this time it didn't...
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Update

Well, I rewired the PIC micro to output pulses to 2 of the base buttons as they are not multiplexed and it works sorta...

The output from the PIC is pulse width modulated and seems to be doing it's job fine. The response in D3 is not what I expected though. It is more "all on", "all off" instead of smooth so I think I'll have to go with "Plan B"

Plan B

I'm going to use the PIC micro to completely take over all of the joystick functions as Grendel did for the Sidewinder. This way I can have 5 axis's and all buttons. Only real side effect will be that it won't come up Logitech Freedom in Windows, but whatever I assign it to. Upgrade!! heh

I'll post more as I get something going on that end.
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

Plan B would be fairly simple w/ the MJoy thing -- the mega8 has six 10bit ADCs, gives you X,Y,Rz,T and Rx/Ry. I'd change the button handling of MJoy a bit but overall the mods would be easier than what I had to do for the 3DP handling. I could create an appropriate report descriptor for you.
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Thanks Grendel. I do want to learn how it's done though since I'll be using a PIC as opposed to the ATMega. Main reason is that I already have the PIC, a programmer, an IDE, crystals, and am fairly familiar with using PIC's. The ATMega looks like a great device and supports 6 instead of the 5 axis's that the PIC would but I only need 5 axis's as I'm not using the throttle.

Maybe I'll get a sample ATMega chip and start working on something more comprehensive in the future.

Any information you can throw my way as far as talking to the USB would be great! :D
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

Unfortunately connecting to USB isn't easy, I was quite lucky to find the USB stack implementation for the mega8. If you want to stay w/ the PICs, you most certainly have to use extra hardware to deal w/ the USB transport layer -- here's an example: http://www.beyondlogic.org/usbnutshell/ ... 876Example

USB In A Nutshell is a good document to give you a quick overview about device level USB protocols. Beyond Logic has a lot reading material on USB too. FTDI has a nice USB I/F chip, the dev board is $25 -- very neat tho.

The fastest, cheapest and easiest way is probably to use the software USB stack for the mega8 :)
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Great links Grendel, thanks.

I have found that the PIC I currently have is not quite fast enough for low-speed USB, however, I placed an order for a PIC18F2455 which has an onboard USB2.0 Transceiver, 10 A/D inputs and 23 I/O ports.

This looks like what I'll need to finish this project and what more, I get all 6 axis's working, so I spose I'll just replace the throttle and have a fully functioning Logitech Freedom with the addition of an analog hat. :D
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Update!

I've managed to get the PICmicro to read the 5 axis's and 4 buttons(only using handle stuff) and transmit info to computer through USB port.

Joystick shows up as "SuperSheeps USB Joystick" and is calibrated through windows as well.

One nice thing is that the joystick has become wired once again, and is powered by the USB port. This means...

No more batteries!! NiCd, and NiMH don't quite reach the voltage levels needed so always had to use Alkalines. Logitech > Greenpeace

No more auto shutoff. Man I hated that. You'd leave your joystick for 60 seconds and wham, recalibrate. Joke.
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Grendel...USB Complete is an awesome read. PM me for details.
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

SuperSheep wrote:Joystick shows up as "SuperSheeps USB Joystick" and is calibrated through windows as well.
Suggestion: make it autocalibrate :) I'd be interested in your device/string descriptors, can't get more than 4 chars out of the device name..
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Code: Select all

code_pack
Descriptor_begin

Device1
db EndDevice1-Device1 ; bLength
db DEVICE             ; bDescriptorType
dw 0x0110             ; bcdUSB (1.10)
db 0x00               ; bDeviceClass (none)
db 0x00               ; bDeviceSubClass (none)
db 0x00               ; bDeviceProtocol (none)
db 0x06               ; bMaxPacketSize (6 bytes)
dw 0x6666             ; idVendor (6666h - bogus)
dw 0x6767             ; idProduct (6767h - bogus)
dw 0x0100             ; bcdDevice (1.00)
db 0x01               ; iManufacturer
db 0x02               ; iProduct
db 0x00               ; iSerialNumber (none)
db NUM_CONFIGURATIONS ; bNumConfigurations
EndDevice1

Config1
db Interface1-Config1 ; bLength
db CONFIGURATION      ; bDescriptorType
dw EndConfig1-Config1 ; wTotalLength
db NUM_INTERFACES     ; bNumInterfaces
db 0x01               ; bConfigurationValue
db 0x00               ; iConfiguration (none)
db 0x80               ; bmAttributes (Bus Powered)
db .50                ; bMaxPower (50 x 2mA = 100mA)

Interface1	
db 0x09               ; bLength
db INTERFACE          ; bDescriptorType
db 0x00               ; bInterfaceNumber
db 0x00               ; bAlternateSetting
db 0x01               ; bNumEndpoints (excluding EP0)
db 0x03               ; bInterfaceClass (HID class)
db 0x00               ; bInterfaceSubClass (none)
db 0x00               ; bInterfaceProtocol (none)
db 0x00               ; iInterface (none)
EndInterface1

HID1
db 0x09               ; bLength
db HID                ; bDescriptorType
dw 0x0100             ; bcdHID
db 0x00               ; bCountryCode (none)
db 0x01               ; bNumDescriptors (1)
db REPORT             ; bDescriptorType
dw EndReport1-Report1 ; wDescriptorLength
EndHID1

Endpoint1
db 0x07               ; bLength
db ENDPOINT           ; bDescriptorType
db 0x81               ; bEndpointAddress (EP1 IN)
db 0x03               ; bmAttributes (Interrupt)
dw 0x0006             ; wMaxPacketSize (6 bytes)
db .10                ; bInterval (10ms)
EndEndpoint1

EndConfig1

Report1
db 0x05, 0x01		; Usage Page (Generic Desktop),
db 0x09, 0x04       ; Usage (Joystick),
db 0xA1, 0x01       ; Collection (Application),
db 0x09, 0x01       ;   Usage (Pointer),
db 0xA1, 0x00       ;   Collection (Physical),
db 0x09, 0x30       ;      Usage (X),
db 0x09, 0x31       ;      Usage (Y),
db 0x09, 0x35       ;      Usage (Rz),
db 0x09, 0x33       ;      Usage (Rx),
db 0x09, 0x34       ;      Usage (Ry),
db 0x15, 0x80       ;      Logical Minimum (-128),
db 0x25, 0x7F       ;      Logical Maximum (127),
db 0x35, 0x00       ;      Physical Minimum (0),
db 0x46, 0xFF, 0x00 ;      Physical Maximum (255),
db 0x75, 0x08       ;      Report Size (8),
db 0x95, 0x05       ;      Report Count (5),
db 0x81, 0x02       ;      Input (Data, Var, Abs)
db 0xC0             ;   End Collection
db 0x05, 0x09       ;   Usage Page (Button)
db 0x19, 0x01       ;   Usage Minimum (Button 1)
db 0x29, 0x04       ;   Usage Maximum (Button 4)
db 0x15, 0x00       ;   Logical Minumum (0)
db 0x25, 0x01       ;   Logical Maximum (1)
db 0x75, 0x01       ;   Report Size (1)
db 0x95, 0x04       ;   Report Count (4)
db 0x81, 0x02       ;   Input (Data, Var, Abs)
db 0x75, 0x04       ;   * Pad * Report Size (4)
db 0x95, 0x01       ;   * Pad * Report Count (1)
db 0x81, 0x03       ;   * Pad * Input (Const, Var, Abs)
db 0xC0             ; End Collection
EndReport1

String0
db String1-String0, STRING ; bLength, bDescriptorType
dw 0x0409                  ; wLANGID (0409)
String1
db String2-String1, STRING ; bLength, bDescriptorType
data 'M','i','c','r','o','c','h','i','p',' ','T','e','c','h','n','o','l','o','g','y',
     ' ','I','n','c','.'
String2
db Descriptor_end-String2, STRING ; bLength, bDescriptorType
data 'S','u','p','e','r','S','h','e','e','p','s',' ','U','S','B',' ','J','o','y','s','t','i','c','k'

Descriptor_end
[Rant]
Why does code double line spacing? :x
[/Rant]
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Picture Time!!!!

Base of Logitech with new PICmicro brains. :)
Image

PCB underside from top handle...
Image

PCB topside from top handle...
Image

Solved a problem where joystick would reset during games and would not reconnect on startup.

Also, added functionality to the Red/Green LED so that it reports the status of the Joystick.

And finally, a screen capture from the Game Controllers/properties panels...
Image
User avatar
Floyd
DBB Captain
DBB Captain
Posts: 561
Joined: Sat Apr 26, 2003 2:01 am
Location: Germany
Contact:

Post by Floyd »

amazing. thumbs up!
User avatar
Sergeant Thorne
DBB Material Defender
DBB Material Defender
Posts: 4641
Joined: Sun Nov 25, 2001 3:01 am
Location: Indiana, U.S.A.

Post by Sergeant Thorne »

I'm envious. :) Cool
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

Very nice !!

What happened to the other buttons ? ;)
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Thanks guys!

I play using Joystick/Keyboard so I don't use the Base buttons. I'll probably wind up adding them later along with the throttle for completeness sake.

The top two buttons (5 & 6) will never fit next to the hat so they are gone permanently. Never used them, so no real loss there. :)
Post Reply