Archive for March, 2010

Shifter update

Sunday, March 28th, 2010

My shifter is almost complete now.  All the mechanics of it have been done, just the electrics left.

The pictures are pretty self explainatory but i’ll explain how it works.

The first collet on the shifter shaft is staic and held by a grub screw.  The spring then exerts force against the delrin block supporting the skate bearings.  The block is free to move over the shaft.  This part gives the ‘clunk into gear’ feel.  Underneath the the rod end is a slightly cupped out thick ‘washer’ and then that’s followed by another static collet.  The spring force is also excerted on the washer and then the body of the rod end.  This means that when the shaft is moved off center, the washer falcrums on the body of the rod end and pulls the shaft down against the spring, this keeps it centered.  This combined with the gates on the bottom of the shifter gives it a very real feel.  I still have to put a slight concave in the neutral position although it is not stirctly needed as the spring is just about enough to give some more resistance, just before falling over the edge onto the ‘in gear’ ramp.

The plan for the electrics is to have a dual personality 6th gear.  There will be a toggle switch to make it either reverse or 6th.  Therefore in normal 5 speed boxes it will be reverse but in 6 speeds i can use it as 6th but flick a switch and it will be reverse.

p3280032_sml p3280034_sml p3280033_sml

Racing sim update

Friday, March 26th, 2010

Ok, as promised here is the details of the electronics.  Most of you would be interested in the load cell interface so i’ll start with that.  The interface is truly simple, the main chip, an INA122PA is only about $7 from RS and a little more from Farnell.  There are other equivalents but this is the one i used and is also one of the cheapest.  The pinout is very basic for our purposes.  You have a power supply (coming from the Mjoy) to power the chip and the load cell.  The load cell applies it’s voltage to 2 pins and the chip simply amplifies the voltage from the load cell.  The gain (how much it amplifies the voltage) is set by the resistor accross pins 1 and 8.  The capacitor is a simple 0.1uf filtering type. The cell puts out 2mv/v so at 5v excitation we get 10mv at full scale.  To get 0-5v we need to multiply that by 500.  For this chip that means a resistor of about 400 ohms.  Less resistance will give more gain.  Since my load cell is a 100kg item i have increased the gain on mine to about 600.

That’s about it!  Hook it up inline instead of a pot and you’re done.  Just make sure you get the wires around the right way…

lc_interface Load Cell interface

As for the main Mjoy board, I modified a layout i found around the net.  I have not removed any ‘branding’ so if one wanted to seek out the original designer i’m sure they could.  The only real change i made was to add pads to be able to vertical mount standard diodes for the buttons rather than use SMD types.  Most other changes were to add some distance between tracks etc.  Print, transfer, etch, drill and solder etc.  I made up my own paralell port programmer interface to program the chip in place with the provided header.

One thing i would like to add here is that originally i tried to use an AtMega88 as i was told they were basically the same.  Unfortunately they are not.  There are too many dfferences to allow the standard hex file (for the AtMega8) to work.  Someone has ported the code to the ’88 but i have not been able to get this to work.  I presume it has something to do with fuse settings on the chip but even though i have set them right, it still does not work for me. I ended up having to stick with an AtMega8 at about 5 times the price of the ’88.

mjoy_pcb p3210025_sml1

PCB Layout files (Sprint 5.0 format, free reader available to be able to print them http://www.abacom-online.de/uk/html/dateien/demos/viewlayout50.exe)

NB – The Mjoy PCB has incorrect axis lables, they are backwards so it should read X,Y,R,T,Z,Rx.  Not really important other than the fact that the XYRT axes are 10bit and the other 2 are only 8bit. Earlier versions of Mjoy only have 2 10bit axes (X and Y)

pcb-mjoy-v14
load_cell_board

Please let me know if you download these files, it’s nice to know someone else is finding these useful.

I’ve also started work on my H Shifter for the sim.  I’m trying to keep the design simple but at the same time i want something robust and somewhat realistic.  Combining the ideas of some others, i have come up with my own design which should allow for this.

Shown below is the basis of the shifter (not complete obviously).  Between the 2 horizontal bars (the ones with holes in them) will go a block of delrin which supports 2 standard skate bearings.  I have not yet finished the profile on the horizontal bars, there will be another dip in the middle. The delrin will freely slide over the 1/2″ shaft and will be followed by a spring and then a retaining clip.  This will force the block/bearings down on the ‘ramps’.  This should give a ‘clunk’ into gear and also allow for a little freeplay between gears in the ‘y axis’ when viewed from above.  The centering mechanism will be another single spring around the shaft that sits on the rod end and is secured again by a retainer.  The compression of the spring will try to keep it centered.  From there it is only a matter of making a gate plate and hooking up the switches for the gears.  I intend to mount the switches in the base of the unit to keep them safe.

p3250031_sml p3250030_sml

Time for a new project

Sunday, March 21st, 2010

While i’ve been tinkering with many things over the time since my last post.  Most of it has not really been very noteworthy or at least nothing that would probably be of interest or use to anyone else.

However, inspired by now owning a 2L turbo sports car and some recent participation in some motorsport events i’ve decided to build a racing simulator.  It’s nothing new, i don’t claim it to be but i’ve decided to collaborate some of the things i have done in hope that it might help someone else going down the same path.

The aim of this project is to produce a somewhat life-like simulator without using a standard shop bought wheel/pedal set.  I’ts not going to be real, i know, but here’s my ‘requirements’:

  • Realistic steering wheel with as much rotation as possible
  • Analogue Clutch
  • ‘H’ pattern gear shifting
  • Analogue Hand/E brake
  • Force measured brake (not movement like normal pedal sets)
  • Small/Storable/Disassembleable  (I don’t have a spare room for a sim cockpit)
  • Strong/Durable
  • Cheap!

The intended target platform is a PC running ‘Live for speed’

I started this project a couple of months back, starting with the wheel and now i have just completed the pedals.   The steering mechanism was construced utilising a 2:1 ratio cam belt driven gearbox giving a theoretical ‘lock to lock’ of 540 Deg.  A little less than i wanted but it works ok.  There’s nothing too technical about it other than the gear reduction.  It uses a real sports steering wheel too.  A keen eye might also be able to tell what the bearing/shaft supports are recycled from :)

The pedals were heavily based on the design of the commercial product from http://www.cannonsimulationtechnologies.com. Todd of CST also sells a ‘DIY’ guide for making a pedal set that is somewhat comparable to his commercial product for only US$12.  I probably could have constructed my pedals without the need for the guide but i went and bought it anyway.  I saw it like paying royalties for his design and i think it’s only fair he gets some reward for his efforts.

The main difference with my pedals are basically the fact that i have constructed them almost entirely of things i had at home already or i could acquire for free.  The problem for someone attempting to replicate what i have done is, not everyone would have the stuff lying around like i do but parts can easily be substituted.

So far, the build has only cost me about $80.  The bulk of that cost is for the rod ends that go to the tops of the pedals at ~$16ea.  The springs were about $7 each.  The steering mechanism has been totally free so far.

All these mechanics are no good without some way to interface them with a PC.  I tinkered with the idea of using an optical mouse to track an encoder mounted to the steering wheel at first but this was not far from epic fail.  It worked but was too unreliable, lost it’s center and basically sucked.  One advantage it did have was an almost unlimited number of rotations.  Pity it sucked everywhere else.  Abandoning the optical mouse idea, i moved to the old pot style joystick.  I happened to have an old E-Sky USB trainer in the cupboard that i never use anymore so i gutted that –  The result is the ability to have 4 axis analogue joystick control.  Only problem was that ideally i needed 5 analogue inputs but it was enough for ‘proof of concept’ for now.

Not long after destroying the USB trainer I came across Leo Bodnar’s site.  He sells a generic USB interface that provides 6+ Analogue inputs as well as 32 odd buttons.  While his product is good, it did not really follow the rule of cheap.  At about $80 to get one to my door, it would have doubled the current cost of the build.  Some more googling turned up a ‘product’ called Mjoy by Mindaugas Milasauskas.  It’s a DIY USB joystick interface based on an Atmega8 AVR. It seems that his legacy goes on but for some reason his website is gone.  I am making  Mindaugas’ and version of the joystick interface (for a fraction of the cost of Leo’s).  All of my designs and ideas will be published here.

The interesting thing with the CST pedals is the use of a load sensor for the brake sensing.  This is a superb idea (Although Todd admits it was not his).  This will give a much more real feel to the brake pedal.  I managed to salvage a load sensor from some industrial scales some time back – I knew it would be good for something! The problem is the interface between the load sensor and the joystick controller.  The load sensor only puts out ~2mv at full load, we need 0-5v scale for the joystick interface.  Some more googling dug up an ‘off the shelf’ chip designed for this exact task.  It’s an INA122 by Burr-Brown (owned by Texas instruments i believe).  As it turns out,  this appears to be the chip Leo uses in his controller with load cell interface.  The difference with me is, i’m going to give you all the info you need to get it running with Mindaugas’ design for free.

Details to come….