• Welcome to PiBoSo Official Forum. Please login or sign up.
 
October 17, 2019, 03:49:36 am

News:

GP Bikes beta16b available! :)


The Lumberbar/MCCC/M300/M301

Started by Chris_Beeves, May 06, 2019, 09:07:40 pm

Previous topic - Next topic

Chris_Beeves

Hello enthusiasts!

This is going to be a monster post describing my ongoing project of making a controller.
The idea is to keep it low budget and open source but maximum fun!
It's gonna be a long one.
Get ready, here comes the blabla:

I recently bought my father a force feedback wheel as a retirement present. It was loads of fun!
But it got me thinking about simulators, or more so the absence of them in motorcycle games.
Why is there no game that implements proper counter steering? (This was before I found GPB)
How hard can it be to make a proper controller?
I started contacting companies (Milestone, Jester, etc) that I knew were making cool arcade motorcycle games.
They were not very interested in my questions and suggestions.
Then I stumbled on to Gp bikes. Love at first sight.. Then I tried direct steering, and wow!
I hated it! What a horrible horrible function! I was using a PlayStation controller at the time, and it was ridiculously impossible.
So, I decided to make my own controller.
Enter MCCC! (Motorcycle countersteer controller) (CCC in Roman numbers =300) So,
The magnificent M300!!

I knew I wanted it to be based on torque input. That's the only way I could think of that could be realistic.
At first I thought about a static bar with pressure sensitive resistors plugged into a ps3 controller,
but a static bar just felt wrong. I thought I'd add an adjustable spring resistance that would change
with acceleration and lean. I would also need two inputs to act as one axis. I thought r1/r2 button
did this, since they are the Z-axis, but it didn't work out.
So, scrapped the M300..

Then I found the Arduino Leonardo which seemed to be the answer to all my questions (except the two-outputs-one-input-problem).

Enter M300! (Again..)

This time I actually built something. A few pieces of wood, an old RC radio and some crashed clip-ons from my old Triumph.
I connected the brake handle (bicycle style handles) to one of the potentiometers and some springs and thread from the
"handlebars" to the other one for steering (until I could figure out the torque thing). Then I took an old throttle handle
and cramped a potentiometer into the end of the right clip-on and connected it to the handle. A little tinkering, zip-ties
and a spring later, I had a working throttle handle!
Loaded The Arduino with a ffb wheel program and actually got the steering, brake and throttle working!
On the "wrong" axis and of course no ffb, sure, but it worked fine in gpb!


Activated Directsteer again, and WOW!! It was horrible!! Still completely impossible..
So I started over..

Enter M300!!
(Again, yes...)

Now I bought two load cells which I connected together in a way that any respectable engineer would frown upon.
Got them working against each other and amplified the voltage difference between them with an op-amp.


After many hours studying and testing I got them working perfectly, just the way I wanted! I used the now
spare potentiometer from the old steering for the clutch handle. Worked perfect!
Plugged it all in and tried it with GPBikes.. Guess what!? It was still horribly horrible!
At this point I was quite ready to give up.

Then I saw Marcel's Mixed Reality video where he put a handlebar on his Fanatec wheel base,
and it looked awesome! I didn't know Piboso had implemented ffb in such a good way!
Sure, it has its bugs on rough surfaces, but wow!

This made me go out and buy a cheap second hand Logitech Driving Force GT wheel to see what
I could do with it. If it worked, I will make my own more powerful ffb base.
I took the M300 apart again and turned the Logitech around and tilted it (as in the picture)
and strapped the remains of the M300 to it. I took the load cells from the steering and used
one for the front brake. Great feeling!



Enter M301!! Yes, I know! A completely new name!! :O

And WOOW! It actually works surprisingly well!! I still have to tweak the settings a lot, but for proof of concept,
I am more than content!! You can really "feel the road" in the handlebars, and the counter steering is surprisingly
intuitive! (Still difficult as h*ll though)

So, I'm still investigating what solution will be best for my new base. A stepper motor with supreme torque and
holding torque is probably the way to go, but I'm not sure how it works with the available open source Arduino
force feedback sketches. Probably not very well without a quite expensive motor driver.. I'm probably gonna try
a largeish DC motor and gear it. Bang/buck ratio is probably hard to beat. I'm thinking, since I don't really
need 900 degreed turning (more like 50), I can gear it with belt and pulleys and get a lot of torque per ampere.

A side project while working on this was my little lean seat. The A.S.S.-unit (Arduino Seat Sensor )
I put switches that monitored if I had my weight to the center, left or right and I got the rider to lean
accordingly in the game. It was cool that I got it working, but it just didn't feel natural at all.
Got the tip from passerby to use head tracking instead. So I got my ps3 cam out and soldered myself
a 3 diode race hat! Using Opentrack I can now move the rider by moving my head. That is some next level stuff!
And it feels much more immersive (close to falling off my chair).



Having a spare load cell I just had to build foot controls as well! Took an old set of foot pegs from my Cbr and connected
switches to the gear side and load cell to the brake side.



 It's really nice having a proper shifter!



It contributes greatly to the overall feeling.




That is pretty much where I am today.

What's on the workbench right now is:

- Converting the race hat to IR leds instead of blue ones

- Making haptic feedback knee sliders (so that you get some indication before you fall off in direct steer mode) First prototype is done! They're lying there waiting for serial data to arrive.. I'm thinking of ways to make them wireless, there will be enough cables on this thing as it is..



- Making the .dlo plugin for gpb send serial data to The Arduino to control the knee sliders (to begin with)

- Constructing a prototype ffb base

- Making it all look good (Knowing myself, it is unlikely I will take the time to do that.. :) )

I'll keep updating with my progress!

I had to try..

D4rw1n

Following this very closely !!

A lot of good ideas, and about the haptic feedback for the sliders, I had thought about putting some curved and textured spinning disks directly mapped to motorcycle speed,.
So that when you lean (with actual sliders) and hit the apex, you would touch these curved disks as if it was in real.
Of course only if the chassis can lean.

A question about your loading cells: are you actually measuring the mean value between both of them? or are they dedicated for their proper side?

Chris_Beeves

May 07, 2019, 03:54:22 am #2 Last Edit: May 07, 2019, 04:25:14 am by Chris_Beeves
Quote from: D4rw1n on May 06, 2019, 10:37:32 pmFollowing this very closely !!

A lot of good ideas, and about the haptic feedback for the sliders, I had thought about putting some curved and textured spinning disks directly mapped to motorcycle speed,.
So that when you lean (with actual sliders) and hit the apex, you would touch these curved disks as if it was in real.
Of course only if the chassis can lean.

A question about your loading cells: are you actually measuring the mean value between both of them? or are they dedicated for their proper side?

When I used them for steering I measured the difference between them.
Since I can't write code for the Arduino, I have to settle for editing code other people have done. I used the "Joystick Library" found here on GitHub and adapted it to my setup. Since the steering was mapped to only one analog input on the Arduino, I had to have the load cells work "against" each other and amplify the difference in voltage between them.

(Not an UNO like in the picture, but a Leonardo)

The Vref ended up at about 2,7V and increased to 4,6V when I pushed one of them and about 0,6V when I pushed the other.
A working circuit, but it didn't work the way I thought it would with GP-Bikes.. So i took the circuit apart and used the load cells separately.

Cool idea with the discs btw! I think it it would be quite a lot of work for not so much difference in feel though. IRL knee pucks don't really deliver much "sense of speed". I don't think I would pass a blind test with a 200km/h scrape and a 60km/h one.. Unless there were curbs of course. ;)
I had to try..

HornetMaX

Quote from: Chris_Beeves on May 06, 2019, 09:07:40 pmI knew I wanted it to be based on torque input. That's the only way I could think of that could be realistic.
And here it goes again :)
Quote from: HornetMaX on April 20, 2019, 10:19:44 amDS2, as expected, is the way to go for FFB. I can't even remebber the number of times a newcomer arrives, asks for advice on an FFB rig, one suggests DS2 and the guy ends up saying "I'll do DS1 because <insert wrong explanation here>".

Quote from: Chris_Beeves on May 06, 2019, 09:07:40 pmEnter M301!! Yes, I know! A completely new name!! :O

And WOOW! It actually works surprisingly well!! I still have to tweak the settings a lot, but for proof of concept,
I am more than content!! You can really "feel the road" in the handlebars, and the counter steering is surprisingly
intuitive! (Still difficult as h*ll though)
All this with DSA/DS2 right ?

Quote from: Chris_Beeves on May 06, 2019, 09:07:40 pm- Making the .dlo plugin for gpb send serial data to The Arduino to control the knee sliders (to begin with)
You're aware the info is not available in GPB telemetry right ?
I've seen your suggestion/wishlist post about it but judging from past experience I wouldn't bet much on the request being granted.

Chris_Beeves

Quote from: HornetMaX on May 07, 2019, 06:41:25 amAnd here it goes again :)
Quote from: HornetMaX on April 20, 2019, 10:19:44 amDS2, as expected, is the way to go for FFB. I can't even remebber the number of times a newcomer arrives, asks for advice on an FFB rig, one suggests DS2 and the guy ends up saying "I'll do DS1 because <insert wrong explanation here>".
Nah, there I went. All on my own. And found the way out myself. :P

I still think that with better support in the game, that would be a great and cost efficient solution. Something like a spring loaded car sim wheel.

Quote from: HornetMaX on May 07, 2019, 06:41:25 am
Quote from: Chris_Beeves on May 06, 2019, 09:07:40 pmEnter M301!! Yes, I know! A completely new name!! :O

And WOOW! It actually works surprisingly well!! I still have to tweak the settings a lot, but for proof of concept,
I am more than content!! You can really "feel the road" in the handlebars, and the counter steering is surprisingly
intuitive! (Still difficult as h*ll though)
All this with DSA/DS2 right ?
Exactly. That is the only mode for ffb.

Quote from: HornetMaX on May 07, 2019, 06:41:25 am
Quote from: Chris_Beeves on May 06, 2019, 09:07:40 pm- Making the .dlo plugin for gpb send serial data to The Arduino to control the knee sliders (to begin with)
You're aware the info is not available in GPB telemetry right ?
I've seen your suggestion/wishlist post about it but judging from past experience I wouldn't bet much on the request being granted.

I had to try.
If I wasn't aware, I wouldn't put it on the wishlist, would I? ;)

Until the miracle happens I will trigger it using lean angle. If it is too "off" I'll combine the integer with an analog input with a potentiometer for on-the-fly calibration.
I had to try..

poumpouny

Hornet Max : i've respond to you in the other threand about you asking why people insist about DST, when you've compared it with car simracing .......

And why are you so sceptic about DST ? have you tried to build something and failed or are you just assuming it will never work ?

Chris_Beeves

Today I started soldering everything to a circuit board. Had som trouble with loose connections making the rear brake lock up. :)

I am the biggest time optimist in the world when it comes to soldering. It takes forever!

Also I ordered two 43A motor controllers. I think I will begin with making a ffb unit with a cordless drill motor to test. Right now I don't know how big a motor I will need.

It'll have to be a proper prototype though, so I'll have to make room for a second motor or a bigger one just in case.
I had to try..

HornetMaX

Quote from: poumpouny on May 07, 2019, 02:06:30 pmHornet Max : i've respond to you in the other threand about you asking why people insist about DST, when you've compared it with car simracing .......

And why are you so sceptic about DST ? have you tried to build something and failed or are you just assuming it will never work ?
I'll reply in the other thread.

Chris_Beeves

May 09, 2019, 05:03:18 am #8 Last Edit: May 09, 2019, 05:05:21 am by Chris_Beeves
Last week I got a rotary encoder from a friend. It comes from a hp printer.

Yesterday I finally got around to figuring the wiring out. By the time I finished all the figuring out and it was time to hook it up to 5V I had the days last figuring; I figured it was better to switch the power on when I was less tired, to avoid letting all the magic blue smoke out..

Hopefully this will work for sensing handlebar angle!

I had to try..

Chris_Beeves

Wohoo!
I actually got the encoder working today!
It is incredible how exact they are. On 1:1 gearing I get a resolution of 0,045 degrees steering angle! (About 8000 ppr)
That should absolutely be sufficient!
I had to try..

poupou59890

Hi,

What would you at least ? because I understood that you will use angle but  how ? Like DSA/DS2 mode with FFb ? or another system ? good job :)

poupou59890

Quote from: Chris_Beeves on May 07, 2019, 07:06:14 am
Quote from: HornetMaX on May 07, 2019, 06:41:25 amAnd here it goes again :)
Quote from: HornetMaX on April 20, 2019, 10:19:44 amDS2, as expected, is the way to go for FFB. I can't even remebber the number of times a newcomer arrives, asks for advice on an FFB rig, one suggests DS2 and the guy ends up saying "I'll do DS1 because <insert wrong explanation here>".
Nah, there I went. All on my own. And found the way out myself. :P

I still think that with better support in the game, that would be a great and cost efficient solution. Something like a spring loaded car sim wheel.

Quote from: HornetMaX on May 07, 2019, 06:41:25 am
Quote from: Chris_Beeves on May 06, 2019, 09:07:40 pmEnter M301!! Yes, I know! A completely new name!! :O

And WOOW! It actually works surprisingly well!! I still have to tweak the settings a lot, but for proof of concept,
I am more than content!! You can really "feel the road" in the handlebars, and the counter steering is surprisingly
intuitive! (Still difficult as h*ll though)
All this with DSA/DS2 right ?
Exactly. That is the only mode for ffb.

Quote from: HornetMaX on May 07, 2019, 06:41:25 am
Quote from: Chris_Beeves on May 06, 2019, 09:07:40 pm- Making the .dlo plugin for gpb send serial data to The Arduino to control the knee sliders (to begin with)
You're aware the info is not available in GPB telemetry right ?
I've seen your suggestion/wishlist post about it but judging from past experience I wouldn't bet much on the request being granted.

I had to try.
If I wasn't aware, I wouldn't put it on the wishlist, would I? ;)

Until the miracle happens I will trigger it using lean angle. If it is too "off" I'll combine the integer with an analog input with a potentiometer for on-the-fly calibration.

Good idea for the lean angle and the "modify it on the fly pots" I tried to do such a system but cannot find a way to activate it correctly. SO now with arudino and UDP and little vibration motor from Xbox gamepad it can be done I think.

poupou59890

regarding the knee slider vibration, I just think (yes it,s not very usual^^) the lean sound need to be triggered and it is different lean angle for each bike, so in the config file of each bike, It will be possible to find the right lean angle, and then put this angle in the arduino config (or thanks to a pots maybe.) in order to be right for each bike.

Chris_Beeves

Quote from: poupou59890 on May 10, 2019, 12:13:30 pmHi,
What would you at least ? because I understood that you will use angle but  how ? Like DSA/DS2 mode with FFb ? or another system ? good job :)
I'm not sure what you mean exactly, but the controller will pretty much be a modified open source car simulator ffb wheel. Just with a lot less total rotation. (Max 90 degrees instead of 900> ) And DS2, exactly!


I don't think it's even as easy as that, since rider position also affects the "drag angle". One would have to assume full hang off.
I don't see this as a very big problem though. I don't even know if it will be very helpful! :)

We'll see! Looking forward to trying.
I had to try..

poumpouny

When i thought about what Hornetmax said :

-If you use Loadcell, it means you will use DST or you will just controll DSA with torque input ?

-If DSA controlled with torque input, this mean you'll use the arduino analog input from loadcell as "lean" input in controller mapping ? which mean you're FFB wheel will no longer be consider as "lean/steer" input cause you can only map 1 axis to  the lean input (in this case the loadcell) and then you're FFB wheel will no longer receive the angle output from GPbikes ? or can GPB take input from 1 controller and return the FFB (steering angle) into another input ?