<?xml version='1.0' encoding='utf-8' ?>
<rss version='2.0' xmlns:dc='http://purl.org/dc/elements/1.1/'>
  <channel>
    <title>Wolfmans Howlings: Converting a Sidewinder 3D pro joystick to USB</title>
    <link>http://blog.wolfman.com/articles/2009/10/24/converting-a-sidewinder-3d-pro-joystick-to-usb</link>
    <description>A programmers Blog about Ruby, Rails and a few other issue</description>
    <language>en-us</language>
    <ttl>40</ttl>
    <item>
      <title>Converting a Sidewinder 3D pro joystick to USB</title>
      <description>
        &lt;p&gt;In playing with my new Rovio I decided that my Old MS Sidewinder 3D
        Pro Joystick would be an excellent way to control it, as it has the
        twist which can rotate the Rovio, and the joystick up/left/down/right
        can move the Rovio in those directions while still facing forward.&lt;/p&gt;
        
        &lt;p&gt;The problem is that the joystick has a game port connector, and my
        Linux workstation does not have a game-port. After doing the obligatory
        Googling I found
        &lt;a href=&quot;http://www.descentbb.net/viewtopic.php?t=15526&quot;&gt;this&lt;/a&gt; Exactly what I
        needed, except this was for Windows not Linux. Thinking I would have
        to modify the code I contacted Grendel who graciously sent me the
        source code for the project, however it turns out the code he wrote
        was so good it works as is on Linux, I just needed to &lt;code&gt;modprobe
        sidewinder&lt;/code&gt; and it worked.&lt;/p&gt;
        
        &lt;p&gt;The project is based on a great little hackers device called a
        &lt;a href=&quot;http://www.pjrc.com/store/teensy.html&quot;&gt;Teensy&lt;/a&gt; a relatively cheap
        general purpose programmable USB dev board. It has lots of
        sample code showing it being a keyboard or mouse or serial port
        etc. It is programmed in C using the avr-gcc toolchain. This is like a
        Basic Stamp with USB, something I needed years ago but couldn't
        find. Now I have one I forgot what I needed it for many years ago, but
        it is in my arsenal now.&lt;/p&gt;
        
        &lt;p&gt;The only thing I needed to do, as I was on Ubuntu Hardy (8.04 LTS) and
        not 8.10 or newer, was to build the avr-gcc toolchain myself. The one
        included with Hardy did not recognize the atmel mmcu atmega32u4 type,
        which is relatively new. This process is made much easier with a
        script you can get from this
        &lt;a href=&quot;http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;amp;file=viewtopic&amp;amp;t=42631&quot;&gt;thread&lt;/a&gt;,
        Note you need to register with the forum to see the download
        links. The file you want is
        &lt;code&gt;build-avr-gcc-4.3.3-libc-1.6.7-insight6.8-arch25-fix.zip&lt;/code&gt;. Make sure you
        read the first post of the thread and make sure you have all the
        dependencies installed first according to the pre-reqs.txt file in the
        download. (Especially the libmpfr-dev which I missed initially).&lt;/p&gt;
        
        &lt;p&gt;Anyway I prototyped the circuit using the photos provided in Grendels
        post, and plugged it into a Windows XP system and it worked, then I
        plugged it into my Linux box and dmesg told me it recognized the
        joystick device..  &lt;/p&gt;
        
        &lt;pre&gt;&lt;code&gt;[926661.299475] input,hidraw8: USB HID v1.11 Joystick [Detlef &amp;lt;Grendel&amp;gt; Mueller Microsoft SideWinder 3D Pro (USB)] on usb-0000:00:1d.7-4.3
        &lt;/code&gt;&lt;/pre&gt;
        
        &lt;p&gt;I then downloaded jstest which is a simple joystick test program, and
        all the degrees of freedom were recognized.&lt;/p&gt;
        
        &lt;p&gt;I wanted to make the proto more robust so I designed a PCB layout
        using
        &lt;a href=&quot;http://www.expresspcb.com/ExpressPCBHtm/Download.htm&quot;&gt;ExpressPCB's&lt;/a&gt;
        free PCB design and schematic tool (Windows based but runs fine under
        Wine on Linux). These guys will make 3 off 3.8&quot; x 2.5&quot; PCBs
        &lt;a href=&quot;http://www.expresspcb.com/ExpressPCBHtm/Specs.htm&quot;&gt;MiniBoard&lt;/a&gt; for
        around $50, which is a get price if you can't make your own. However I
        decided that for this one off project I'd just do a PCB prototype
        instead, so I sent the PCB layout to Grendel as thanks for all his
        hard work, in case he ever wants to go into production for this great
        little project.&lt;/p&gt;
        
        &lt;p&gt;I got a
        &lt;a href=&quot;http://www.schmartboard.com/index.asp?page=products_th&amp;amp;id=24&quot;&gt;Schmartboard&lt;/a&gt;
        board (around $5 from Fry's) and a Rt Angle female pcb mount 15 pin
        DSub connector (.99c), and soldered the components and jumper
        wires. The DSUB needed coaxing onto the board as I guess the pin
        spacing is not the standard 0.01&quot;, however Shmartboard does have a
        &lt;a href=&quot;http://www.schmartboard.com/index.asp?page=products_io&amp;amp;id=16&quot;&gt;board&lt;/a&gt;
        especially for dsub connectors, Fry's did not stock it though. I like
        these Schmartboards, they are cheap and well built, through hole, and
        you can even do surface mount if you have to. They are a lot better
        quality than what you can get from Radio shack!&lt;/p&gt;
        
        &lt;p&gt;&lt;img src=&quot;/files/IMG_0332.JPG&quot; alt=&quot;3DPVert&quot;/&gt;
        &lt;img src=&quot;/files/IMG_0333.JPG&quot; alt=&quot;3DPVert&quot;/&gt;&lt;/p&gt;
        
        &lt;p&gt;As a side note, as I am getting older and it has been 10 years since I
        did any pcb soldering I found that my eyesight has deteriorated to the
        point that I needed a magnifying lamp to do this work, and that my hand
        is no longer as steady as it was, and that my old trusty Weller 35W
        pro soldering iron was too hot and unwieldy, and I was making solder
        bridges everywhere and melting the wire and connectors. (That did not
        used to happen when I was younger ;) So I splashed out and got a nice
        new
        &lt;a href=&quot;http://www.hakkousa.com/detail.asp?PID=1250&amp;amp;Page=1&quot;&gt;Hakko 936 soldering station&lt;/a&gt;,
        with the 907 iron and a very fine soldering
        &lt;a href=&quot;http://www.hakkousa.com/detail.asp?PID=1141&amp;amp;Page=1&quot;&gt;tip&lt;/a&gt; and some
        very fine solder. This made this go a lot smoother, although finding
        the right temperature to use was hit and miss.&lt;/p&gt;
        
        &lt;p&gt;The last component was putting the finished product into a box. None
        of the Radioshack boxes I had lying around would fit, so remembering
        that I had great fun building an Acrylic box for my PC (which I
        eventually ditched for a Silenced case), I made a little acrylic box
        for the converter. A trip to Tap Plastics to get the adhesive was all
        that was needed as I still had some Acrylic scraps laying around.&lt;/p&gt;
        
        &lt;p&gt;Anyway that was my project for this week. Next up writing the code to
        control the Rovio with my Sidewinder 3D Pro. What Language to use??
        Ruby, C++/Qt, Java, maybe learn a new one like Groovy? Hmmm what a
        Dilemma.&lt;/p&gt;
      </description>
      <author>Jim Morris</author>
      <pubDate>Sat, 24 Oct 2009 20:58:07 -0700</pubDate>
      <link>http://blog.wolfman.com/articles/2009/10/24/converting-a-sidewinder-3d-pro-joystick-to-usb</link>
      <guid isPermaLink='false'>urn:uuid:4a277c1c-aeaa-4b99-a56e-f21d4fe9e1ac</guid>
    </item>
  </channel>
</rss>
