Main > Driving & Racing Cabinets

DIY Home Steering Wheel

<< < (3/9) > >>

twistedsymphony:

--- Quote from: Howard_Casto on May 07, 2014, 02:41:40 pm ---A chip isn't needed no, but I bet it would help.  There are 5-10 styles of effects (depending upon how you count them) and if I understand what I've read correctly, DirectInput basically sends a command that says something like "play a constant force effect with a direction of 90 degrees and a magnitude of 10000" to the hardware/driver and then the interface has to figure out what the hell to do with it. 

You can get away with supporting one or two effects, but if you want your wheel to work with any old game you play, you really need to support most or all of them.  Now for most effects the actual math and requirements aren't too bad.  I mean constant force on a wheel only needs to support two directions an a voltage step. (Actually you really need to use some math to make the effect weaker the closer the direction is to being vertical, but whatever)  Ramp effects, again not that bad.... increase the voltage by this many steps over this period of time.  Also a pulse width modulation should be doable... just swap the polarity periodically. 

But sine-wave effects and spring effects... man I don't know.  Sine waves are bad enough, but a direction can be applied as well.  Even assuming you get the math right, would your typical consumer-level AVR be fast enough to smoothly and quickly produce the wave?  And spring effects... how would you do that?  Constantly check the wheel position and attempt to fire the motor to move it back?  How would you keep the motor from going nuts if you move the wheel around a lot?

And of course hardware has to support multiple effects layered on top of each other.  I limit myself to 10 when writing software but I think you are supposed to officially support a ridiculously high number... 255?  Now in theory a simple "OR"  function should blend them, but you've still got to have enough processing power to keep track of them all on the avr. 

I suppose someone could write a driver and have this taken care of on the pc end (which would help with hardware limitations), but honestly if you want to make something future-proof you need to use a full-on HID interface. 

--- End quote ---

I think you're over thinking it :)

I did something similar to this in college... we programmed RC cars to follow a white line on the ground using photo sensors and had to control the steering and wheel speed to prevent the car from ever having a wheel touch the white line.

At the end of the year the best students were invited to a competition to improve their algorithms and given a ridiculously challenging course including elevation changes. I wanted to win so I ditched the variable speed control for the rear wheels and hooked them directly to the battery via relay to ensure I was going top speed 100% of the time... then I built the best damn line algorithm possible to make sure it never crossed that line.

I do have a point to all this.... the techniques are very similar: I know where the position of the wheels are and I know where I want them be and how fast they need to be there. I have to run calculations to figure out the intensity and direction and I also have smooth it out to keep from "bouncing" or over-correcting... if you boil it down it's very similar to how FFB works. you can imagine the line on the ground is the game telling the FFB board where the steering wheel "should" be and then the calculation are the board determining where the wheel currently is and how to best move it to be on top of "the line".

The base calculation is pretty much linear, you increasingly add intensity the further "off course" you go but that alone doesn't work. you basically need to then run the result through a derivation algorithm to smooth it out, otherwise it will be constantly over-correcting/overshooting and your wheel will bounce back and forth until the end of time.  We did this using a Motorolla HC6811 Microprocessor I'm not entirely sure how this stacks up to a modern PIC or AVR but it's pretty old tech so I wouldn't be surprised if an AVR could handle it: http://en.wikipedia.org/wiki/Freescale_68HC11


---------------
That's of course on the motor control side/hardware size...

As for layering effects, the software side (the code producing the "line" that the hardware follows) I would see it working just like layering audio... if you consider the effects as wave forms and then add the wave forms together to create the output...  Once you've got the process down increasing the number of "layers" is a matter of memory space and processing power more than anything else.


If you're interested I could try to dig out my old backup CDs and see if I could find my algorithms.

Generic Eric:

--- Quote from: twistedsymphony on May 07, 2014, 04:32:13 pm ---

If you're interested I could try to dig out my old backup CDs and see if I could find my algorithms.

--- End quote ---

@HowardC


--- Quote from: Marianne Faithfull ---Please say yes, at least say hello
--- End quote ---

Howard_Casto:
Yeah this sounds like a good group project.  I know my limitations and "deh mathz" isn't my strong suit.  Also from my conversations I think SavannahLion might be better with AVRs than me... I'm just a beginner.  Basically I'm good at the FF stuff specifically. 

As for the hardware end, I don't think it'd be too bad.  If that chip you linked to worked then I bet a teensy 3.0 would handle things and honestly it's cheaper than getting a board produced these days.  You'd need what... an amp or maybe some transistors to step up the power and some pots and stuff?  I'm sitting here wondering if pc wheels adjust the power via actual power manipulation or via pulse width modulation.  I suppose you could use either but I don't know a lot about motors.

Xiaou2:
Personally, I dont get the whole effect thing.   Did Race Drivin have 'effects?   Nope.   But it was one of the best physical driving sims ever made.

 The shaft for the wheel goes right through the motor itself, as far as memory serves me.  The Motor is heavy duty, and huge.  Probably weight 30 to 40 lbs.   At full power, its a bear to resist... and probably would hurt a small childs arms.    Though, most Op's never turned it to anywhere near max.

 The motor is very precise... and it can stop and stay in certain spots as it pleases.   It uses a 10 turn pot, and uses a worm shaft like mechanism to limit the rotation.   As the shaft rotates, it moves a "stopper bar" up and down the length of the shaft.  Once the bar hits the end of the spiral, the bar slams into a rubber post or something.  Quite ingenious.


 I have not bought a FFB wheel in ages, so maybe Im not getting what can be accomplished in my mind clearly..  but it seems like what they are trying to do... is similar to what they do with gamepads..  and gamepad rumble really isnt that good.   Not very realistic to say the least.

 I think the main issue, is getting a great high power ffb wheel... that will work great with mame and or elder console games.  I could care less about many of the new games... as they rarely are any challenge anyways.  All fluff and no nutter.  :P


 As for the 2nd yoke... it appears they are doing a lot more than trying to move something left to right.  They are probably trying to do the same kind of thing that Race Drivin does.  Ability to directly hold and or move to precision spots... and vary the amounts of force to boot.  Rather than some resistance bands or other less accurate means of representation.

 Im not saying you couldnt do decent job with a cheaper setup..   but like many things..  if you dont go for the gusto.. you get the el-crappo  "Generica".


 Anyone whos played Datona Usa, whom them plays a game of Race Drivin right afterwards.. could easily tell you that one out classes the other.   They just probably wouldnt know why.


Generic Eric:
It doesn't matter to me, because I haven't worked with either, but Teensey 3.1 is teh hotness (3.0 has been outmoded). 

So, if we can, can we start with the latest tech since the price point is the same?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version