PiBoSo Official Forum

General => Custom hardware => Topic started by: Chris_Beeves on May 06, 2019, 09:07:40 PM

Title: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 06, 2019, 09:07:40 PM
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!
(https://lh3.googleusercontent.com/yhljQ7EQl8l317kz8IwPWcTSteTrOK6TLUQDzp1wDwrkCqeYJulKzvin8nu-LpSml5ojq863AkTz_nxfATLDL-ljcUfEl6Mmc16ajCjppyfwR7NmVGKS8SY4Zh5AFvNXIr9xouqvhPJ18DHW9shpX51DUiD7-I0zbr6JxejeyRQwilvHLS5gCMpBHXVvNkOo9c025ixiverQY0psZwNTwCy9vEpbrkZYYqLG6NJTK0RqWeYTzhAxBX6TN-0IaGC7jQ-ulzsNZZ5O4q28pRyo7ngOT70Obs_6udlLsYsoScbpNwP1iiivr_bNt2O14s6zeu3t8lpG2eH-rIugWNSduuJH6r8ZWWk0CC8AYKxyaMIy-7ZYhfP0u80_uxMoKKGriE3PBfp8FOgd-yZKFSsjG-sKJQREthcxIhoTf53xMokBjtY77XLQNwcL68bSF9fT2CfQftvU6S1C757muvjICLdMttmepBobhZFk_OCGhYfPPfy8dki4x37SbcSKJDodJjw-u3IyuW8ydBPTcvemgSCwvWYPf1oRiSqMLqfJpyuLVRWTQ5P2T8M6rEh-Wn0YadsI768wApBnsx8jvpOQ2tGqqvEhq7UvXjxtneKn1ZNHY86Aq5iJRATlTtqE4m8GqS1MR6OAHrNQrhT1wkAzZGQnGZuCxliApj1PJi8PHA0aMG0J4HP0kW7-Cp7cR644mm41WsKJpea5p0g-b9jlVCCv=w1300-h976-no)

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.

(https://lh3.googleusercontent.com/W811rokRIspRQkyRdUKdr5j-wXl75CjA0EZYCj3um2VTx_dv8VyPju0-K_OShKQgelml12giRUF7TacrABJ1k5Ylf-GL_am4I6HII7gkQhouOIQz1F7pyNOIMmWzzHnw9h74K-5fpOl24gTcTwJTNbwDxQ2Z0slkSUqwFUtGNalt9xcovFwTWQ4SilU8xgKvIMImTlc6EJVpdYrS9LBElpKLIo6Xv0TQeBgJPdPPp5OAF4b_LVW8oDZQKONxmO-8eOhCxtAd9VFP5RWlOxdhKZhmuNHeXShRhGPTujA-BwwLq0bEdu_VjHv9_tlqN9XW18tL2eyJpbjnFm0q4k8yg2xu3tW7GRohXBx-SeAaOw2bt6fnQC1vsw93AC5TgIBdufblGQd8vJuXzm7_XUGbCfW2X7R5BShBGMmabvLsQGG8qXWf2VJuLlo3FVOdgJpTtZPLV9fawGabhh5_41EShxms8ySXEDLAMyD14-Z0UvOgXYT-yNx7Mla2Yim7G6I5S98YkeK6e7mCpI_TWfQuqGESUi_Ys-hpN63CSLxu7qNs81k87O0TfW7-0wSbosPlRLjipgGPQuEhGRN-2Ixz4K1ovMdK9Q3b1wU8pqNAcaSVVWdLrgcCvz-Ylls8ByMCMs_wlhV0PeH-G36a-Wm4qsvE-iK2OIZTpYnAL_T2jmWiK-lmWchsxlpN_fKXXT81VynAdSZ68zqa73p9YuOlDWt9=w732-h975-no)
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!

(https://lh3.googleusercontent.com/Y5RlgT0CspNHtVQ5HFSpLRbEjJ4HRLSyXSny0BVNTIJq9atFWVyc_7mf84s2QSy2gXpr3STD1iiX3OvoBxQGhwwFFOGLaBOFxcRCxABhvrv66zco1Om-W8LFE4L2XrabZRmaJRW61xU6mR00fatAhhVV7D74DBpSoWQ7Is-O9DhS3BYrB4aBg5sPrsL-ZMKmcIVZL_zRIrQK3GmODraMoL02NqgSs87PoU9TIuInKoBL_Ai6nypiTXfQEHfQyZrFadHL00RJRvcgfKBBISeYXxUpQ11eLUgNFdgSLX_i5XSbCtUG_6NyWVBQT3nxrfk2l4xUbnB6bn6Z9hSlMAr8g2G0ckFUxBd5HdrYFi7it6oqHK0wquHgu_vJWm4DkEE9bF9t7WkZ_zpLq4ZruW2zshd7hpKVzCNasUyHC03p9ldD0y7gFajb1W02hLgVu37AFr9w0h1N4Cc1n4xCEZpugbzAnLkCgRzc1T1vJpCvJAltO1hn9yn_2Gd1Epm3mKY76yEDr9BfKtLAXV7IRnj1sizgph_NOAtBEn7RZo6rQsR79sk4TkFJswjeW2dTyzO4x3NM2RXmWe4YCXOnGYh2d4cLAD_1RhR_uGZVltWvb4_SxxQB84MBZlooy4OAa_GlR1_oW7kijzMKnVwBdtEYIQvUMMZwjPVKC-PjP08u7F-nzYmn0cReLEW3sec1fqx579spCeURWctjYYbtFWtP5Bi4=w732-h975-no)

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).

(https://lh3.googleusercontent.com/iNkB4c-g_iGHDm2U6V9lMD38XPE8V3N5iuveVddDjfddsXbhT3eCiRJ57i133fnleIoCIQCtsbOUKVZGUyuJEKZDEDVuCqVvnXD5MYeyVS_NAToxlGgzZSk03ZywAABtHNY29wkoSRRZkMNTMS_9gwGsPsRurFChRLVOcM3jwt2DRg6dKnL0MlVOki6j9-RJsIqMHwB9FxN0yyTj4RQrnmChtMefMR3VM4kcQehFMTgnHzzhwAaVmeTz0EozmKl7x12kF9KGR2l9t9ks3VMAreExHD2CNT0twr9Zqwu5rJo3njYIVcYCZIucjVES6kTMU49I4ljWSBiG3-ErzAtGlzu6UT9hxCKXw1ZhPmjnJIpjnZUpUk1g7dw7f7a2DzLxqoYFUYshN5IMqnOP1aMKaGpkbE8NEbYPE4BSEv5cPuFydY0AsMxynhUaoB7IWshTZLQEPLUYS5JrS9OAw6aD_xgtD2oHH67FBCVcyquTYn287wdyOp9qbT6CBLnL4wcwwTCw18P7oR3Z117FcM-QO5BAQPAH9CGScgZ5M7jyHANZJpt-vr1ehQa63CL5SI2hBXHQss4n_IA9lyk7f2bnk8ownuJwkRJATbffjn8vF62XonXoPJDG3bQ0MjtnVAlhAH5c5BsPgYJWFC18BKFit8xPgA-K7tcDTIpRMlGaYVCodfHKvuhcknuaoCKoqnDSjg0TALQi6IWqWrXE1q4VocJ2=w732-h975-no)

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.

(https://lh3.googleusercontent.com/WxsQCzuSPpRVaXUszAxs8XZjSrPO-tfRVf2Mmca2Y-zlAC-OIYZ2-v3GgcEf1DK1bZLIDVhPJBcQ-QV-S724AOREKH5wZsKtIXmP-yR85TtmSqN9H3nRCH38J7H23Z1vlbqVXS6uCCfDR-FgHhI1cfFYinGHvHtDZOAinZkYjAFx8AP-TU8AbiPYPRT-wEyzJ9OEYUZJO2-S9n9x2XTDQ99hpq4m35chf0XoLVfyv_zSPT2LUacu-fz0rsNob0N_LrtFTYE9-gPCAaABhXk-p1g35pc8cKcAv8Z1v6ZEa5MKt4HoVmFp_BmyL-LpS0NkF07pM36lrga3IWMBgHYf8ub0ZdNcq9mo6yOtb9IuywW-eas2TZEPMud70VYh6CHeZhXeX-tDJuukFJqyvviR3s-VtCeHDNIiRAoUphZaH72Frm-w2IbRmrcPzU1o2QLs-hc6n-fM2tymvvEN9llCETiamENhnSqL41XPYt7EQ197ui_W6eW5Z8WGruCp7jsGwocyjJ04LqvXNjkzHq8zWKmrcHHGRhHwD4AYhLgS1uNKT_aHiaFCbpaGQKE-EMOzZldwVK2qcxexTFD707_YHNi9AllTatlb4suDFKQ968ClVVKRvFpKe958rbR1fGGwdCSGE-B5BTfN5cNDMl5DCB1pMXG0D2L9LQiBQqllGNPUHTSpIC-XsR8iSbrrnqj1qOfFtVMVB65jPCXhew1KIMkt=w1300-h976-no)

It's really nice having a proper shifter!

(https://lh3.googleusercontent.com/fVekGduggQhBXnOeXECnrJTdNtY8H3CoplTFaarHEueztaawwBPymCv8LrcbDqORE1Ks75JwrKBcuL5XEjE2P8murYWBtyenmsiyIxc_FdIUXD_b6tdIJz0c-_V5OQXsfAuaNFaTENDpaJUovdiwWud545pdMwZJuE85od8GTCC03zBuOLe3nhSWNAKOq_ZhygCQ22ivvXEmz4Yn03ePRiNU2sxRyHOB3iTjrbxoY-aDvZh6TDZqx8Nki5L5UlgnKHHVrQUgAsGBwRZ8tk61XgtHkvMEK7tbTRrDcasnbSW-lQvN_IXWWyr8fXQYJM84UDpe8JWQFK5tssvbOP6SiakrQES3USF6PKlXIa4_u_ydfkcK7ir-pT3c2aC4l1PE1MKnOvFBtNTYIBbgry3EAyPcDPTsx-PG_Z9Q7_9hQBrkxaDF5qJQl-RCK7y3rgSpq6rGd9i7LDqEgU5cvHUgwGVa4FwsCbRYQgUZTcChCVFpazCJkjglHr1DeztwgCMge6QPHPhOsvyex4ZR8tfDTyzwAI48ZrMC6OJ62Z3HXcmlKdFF3bM1QGJFwK6NO94I3DaY_MTlzPSLOshjeBH4NHVCyeZoM4nOToZoLKaywp2jV7Ct4rq_zWRihsfgk1GOaFuaGHI26M53SstCVp2eiygcf1nti8ghoOguQ4uq-EOqDuS3v6KGR4VfE38QQcWFF0QM2B3Ih8u7BatKOV49Acj6=w1300-h976-no)

It contributes greatly to the overall feeling.


(https://lh3.googleusercontent.com/g3wCbil_0GdDJwK0Laq7NEbhl-bhQwuyYi5pLMvkyVACVHlMzRQRVFMn3eFomyv6jHfZUE6YZASv_5-1NUWHxg7nA_w_ksXF2V133_K2KqKXRYZaUVtDX1Odz3irxwnURyjjycrvmF14--20t4JvPrM0c-GLjgNTemPkVEtUGyqoVWp80OCBjnER3RtvAtNj4rPDQROx8Ue6hzZ5VajGZLU1Q7O5grK2kYBSa2W5VNiaNHh-_SNzd6iiOtWi2AaH-EgoGxeAJhbEvYkLBvfBpExs3EsGnmb7KfdbUnllX9u5cCZawmw7oTgcpMG3HNWmvLbjlOk44-S7loxs4gJb0eX0Mok7e4YJfxd4rmIjluV_dch01xSh_cVzGLse2DVo86jfu6HUsWI4CKVjynVgQP9xXHF32mzmDSoeFayCgka61zpcBD1PVGm0-FFUK9w-iAPPpLXmwBPisafwVeVj2qLHWoJRJg9KcDttutmkrNtzOkRhqhTR8HBcUg-8_hpqdQt03t1SI8Zi4sHJPKeEpM-w6wLXlGjKhJAkvyA0YjyjufgkEhohBYLLHw77vJAyXleOUsYISa7pcQMCFhBQCHrlpxJPtnwk2rhvcwH1y757eWazhB-lZcOEobkEPfWxXhgsy-ffWs9bSSzPAkBOf8ND3YjtymMY95cvwcNJpD04SvHCILpxWTS1Gy1APaTNHvbtaXEh1wwGA_loAAQIQZO2=w1300-h976-no)

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..

(https://lh3.googleusercontent.com/VpzlztHBrhEwbyPcJwSpPIQZl71C_MSpm3A-sgbWeUKWLPibrnOicxkpQQwXGps6Z6Jt3rNI089GqzjXlkPeQhXwgteXXQYx0nKekSJaJd_SZJuBaR4VpPz_2pOsxUKC6DPzLHPttvY9ab9nWET_hnryov69UFPDBfhpuIiAhKzYj4He3Z-6jKGtgaD8am168YghmUHyUnwjrSFVMr6RTu8SA4YS39xbS2WyubQG3iKPhRwVMgUIRt6ZvWlrhIiUnOm8HSs2Ij7rD1ofQBYtc8E_IBBpOahIq_dRBkHQyJ-znA9pwMwYWOsnH_M3jwThKgffDPye3827D42st8tIOSyuLEDI5drkDekXhMVFNzSm4uolixiZyc4KnFyzkBp1PRfjS6Ftk8i5S-lkea0qGUv6x2cD82tKLqN_BUW6Tyh7r4YCdLC7nQ4VvhVsPn_9fsCQWNn2Ew3GZ-N7T0vwbrT3aUnQ6P0M-P3Eo74LakDqEWwRY9B7J1RN85F8ZyeVs4w3gEiV0U-oYpu5jDLQjLZlBAyvjJCuHEGPvyofUYtxWRI6hM4Tx1Zpfnqe0leloDgewjNjBQCsu2RaRCmcL_44_ba4pdmiiIUCUzL9DufzpqEFPYCycHHzi7-OX7jjDusklqnnVkc-x94V0ZFL-4FLX_TaSoThx02rF4SK5cXefBkywZlHZb-MuTv-ORGVjJtozEMwB1WehZHVPMY5Hx2-=s346-no)

- 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!
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: D4rw1n on May 06, 2019, 10:37:32 PM
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?
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 07, 2019, 03:54:22 AM
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 (https://github.com/MHeironimus/ArduinoJoystickLibrary) 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.
(https://lh3.googleusercontent.com/pJXfJmGHzweYAea39wZ_FPIPc98c3CVC5Vg58ZNg0lJo-GX8jZ-svnd9fU0tFzW0mF81x9NFdkiy7dRWNnpn_LkVvhkX3bpFkIyQZRlSxiLjbKYOfwOTGEFZeqvTPeuVrniNbvhXLR8ZK4uXav6QjcOwxYqMt-DVWCmRUY5CvN-jc7mdht2JQwlmz7-pT0RCxB-35jZdEgCO7kUg3Rp2e0Fd37SINmpzmZ4IY5RjnLPLj8imWBJkE73I_1uyh9MbecdZwE818hmGe-8JKA_pdwgDmqSmSNlxlDYxYztnCmGcWJnpdgW6IfgTjdDOVer4gv48At8O-OrCZvnI8JCfJ9-rga1nzmxoRetbNcbvWoMB1p9EB-wS1YoTJ34aYWyOy2zvl2VxInhBIAsNCdfcxqMtXw_uqRVMJTJ7oSpShOMlxwNYhJ1UfQLPZEq9zn65U5E8SUUba63afmG_emM4n0IYSxirAT4WRygX4jwp__rrrvKS6ufxJqwyDlymucW8GZ_mucMdWXBUAWedhm3KG3UcNXd3zZOo4pIWMMw0mSU0v-VDaSw6nt7QRTDKhOcgo-FZEhEsq4pybP-rcBvkFZ-J0RlbIx0JxJw1vndLdEwDfgGcDxF4WuwK10T4rocHwS5ldy3_XDaOe_ynjZj1XR9tiqyBkvu02LkzNODMOk-O5fSQ9pMCa8oNos8FzbtmVVW96xsPUZRCnVWqhM9Zk2C9=w680-h320-no)
(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. ;)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: HornetMaX on May 07, 2019, 06:41:25 AM
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.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: 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.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: poumpouny on May 07, 2019, 02:06:30 PM
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 ?
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 07, 2019, 09:03:15 PM
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.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: HornetMaX on May 08, 2019, 10:22:38 AM
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.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 09, 2019, 05:03:18 AM
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!

(https://imgshare.io/images/2019/05/08/CDF542F6-6C25-42F5-80C0-3CB424922F31.jpg)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 09, 2019, 08:35:31 PM
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!
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: poupou59890 on May 10, 2019, 12:13:30 PM
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 :)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: poupou59890 on May 10, 2019, 12:18:12 PM
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.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: poupou59890 on May 10, 2019, 12:20:57 PM
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.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 10, 2019, 12:32:32 PM
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.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: poumpouny on May 10, 2019, 01:49:04 PM
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 ?

Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 10, 2019, 03:00:58 PM
The second prototype I made was made for DS1 mode (torque). It is all explained in my first post here I think. No ffb was planned for that one, only adjustable resistance from the GPBikes plugin depending on a number of factors.

After seeing Marcel's video (and his advice) I switched to ffb and DS2.  Now I just use the load cells for brakes.

With a better implementation of DS1 in the game I think prototype 2 would have worked fine though. :)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 12, 2019, 09:42:58 AM
Found out that I have access to Visual Studio Enterprise, so today I started looking at writing the example .dlo for my knee rumblers.

The function I want from the .dlo is receiving the lean angle and sending it to an Arduino via serial port.
Receiving the lean angle seems simple enough (just copy the example code), but everything with the serial port handling makes it a bit complicated.
Especially since I have never seen Visual Studio until today  ;D

I have no idea what I am doing so far, but with enough trials and errors I guess I will get there in time..
This is what I have come up with so far. In my naive mind I just need to figure out the magic word that makes the .dlo spit out telemetry data through the (hopefully) opened serial port:


#include<windows.h>
#include <stdio.h>

/*
If compiled as C++, extern "C" must be added to declaration of functions to export

X+ is right, Y+ is top and Z+ is forward.
*/


extern "C" __declspec(dllexport) char* GetModID()
{
return "gpbikes";
}

extern "C" __declspec(dllexport) int GetModDataVersion()
{
return 8;
}

extern "C" __declspec(dllexport) int GetInterfaceVersion()
{
return 9;
}

/******************************************************************************
structures and functions to receive data from the simulated bike
******************************************************************************/
extern "C" typedef struct
{
int m_iRPM; /* engine rpm */
float m_fEngineTemperature; /* degrees Celsius */
float m_fWaterTemperature; /* degrees Celsius */
int m_iGear; /* 0 = Neutral */
float m_fFuel; /* liters */
float m_fSpeedometer; /* meters/second */
float m_fPosX, m_fPosY, m_fPosZ; /* world position of a reference point attached to chassis ( not CG ) */
float m_fVelocityX, m_fVelocityY, m_fVelocityZ; /* velocity of CG in world coordinates. meters/second */
float m_fAccelerationX, m_fAccelerationY, m_fAccelerationZ; /* acceleration of CG local to chassis rotation, expressed in G ( 9.81 m/s2 ) and averaged over the latest 10ms */
float m_aafRot[3][3]; /* rotation matrix of the chassis. It incorporates lean and wheeling */
float m_fYaw, m_fPitch, m_fRoll; /* degrees, -180 to 180 */
float m_fYawVelocity, m_fPitchVelocity, m_fRollVelocity; /* degress / second */
float m_afSuspLength[2]; /* shocks length. meters. 0 = front; 1 = rear. */
float m_afSuspVelocity[2]; /* shocks velocity. meters/second. 0 = front; 1 = rear */
int m_iCrashed; /* 1 = rider is detached from bike */
float m_fSteer; /* degrees. Negative = right  */
float m_fThrottle; /* 0 to 1 */
float m_fFrontBrake; /* 0 to 1 */
float m_fRearBrake; /* 0 to 1 */
float m_fClutch; /* 0 to 1. 0 = Fully engaged */
float m_afWheelSpeed[2]; /* meters/second. 0 = front; 1 = rear */
int m_aiWheelMaterial[2]; /* material index. 0 = not in contact */
float m_fSteerTorque; /* Nm */
int m_iPitLimiter; /* 1 = pit limiter is activated */
int m_iECUMode; /* 0 = engine mapping; 1 = traction control; 2 = engine braking */
char m_szEngineMapping[3];
int m_iTractionControl;
int m_iEngineBraking;
int m_iAntiWheeling;
int m_iECUState; /* bit field. Bit 1 = TC active; bit 2 = engine braking active; bit 3 = antiwheeling active */
} SPluginsBikeData_t;

/* called when software is started */

extern "C" __declspec(dllexport) int Startup(char* _szSavePath)
{
/*
return value is requested rate
0 = 100hz; 1 = 50hz; 2 = 20hz; 3 = 10hz; -1 = disable
*/
return 3;

int main()
{
HANDLE hComm;
hComm = CreateFile("\\\\.\\COM24", //port name
GENERIC_READ | GENERIC_WRITE, //Read/Write   
0, // No Sharing                               
NULL, // No Security                             
OPEN_EXISTING, // Open existing port only                     
0, // Non Overlapped I/O                           
NULL); // Null for Comm Devices

if (hComm == INVALID_HANDLE_VALUE)
printf("Error in opening Serial port");
else
printf("\nopening serial port successful\n");

DCB dcbSerialParams = { 0 }; // Initializing DCB structure
dcbSerialParams.DCBlength = sizeof(dcbSerialParams);

Status = GetCommState(hComm, &dcbSerialParams);

dcbSerialParams.BaudRate = CBR_9600; // Setting BaudRate = 9600
dcbSerialParams.ByteSize = 8; // Setting ByteSize = 8
dcbSerialParams.StopBits = ONESTOPBIT; // Setting StopBits = 1
dcbSerialParams.Parity = NOPARITY; // Setting Parity = None

SetCommState(hComm, &dcbSerialParams);

COMMTIMEOUTS timeouts = { 0 };
timeouts.ReadIntervalTimeout = 50; // in milliseconds
timeouts.ReadTotalTimeoutConstant = 50; // in milliseconds
timeouts.ReadTotalTimeoutMultiplier = 10; // in milliseconds
timeouts.WriteTotalTimeoutConstant = 50; // in milliseconds
timeouts.WriteTotalTimeoutMultiplier = 10; // in milliseconds
}
}

/* called when software is closed */
extern "C" __declspec(dllexport) void Shutdown()
{
int main()
{
HANDLE hComm;

CloseHandle(hComm); //Closing the Serial Port
return 0;
}
}


Any input on this would be very much appreciated!

Until next time..  :o
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: HornetMaX on May 12, 2019, 04:28:57 PM
Try to look at existing libraries for low-level stuff like handling of serial ports, it's always easier.
For a past project, I used this: https://www.teuniz.net/RS-232/ (https://www.teuniz.net/RS-232/)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 12, 2019, 05:04:36 PM
Great tip! Thanks!

Looks a fair bit simpler than the standard windows stuff.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 21, 2019, 12:06:11 AM
Still waiting for the motor driver board to make the first prototype.. Somebody is probably swimming the package over to Sweden from the UK.
I have a holiday coming up in two weeks so hopefully I'll get some time to get it running.
Can't wait to have a working rig so I can play again soon!
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 29, 2019, 07:35:57 PM
Well, some good news is that I got my motor drivers! :D
Bad news, they were damaged..
Good news, I fixed them!

Bad news, I can't seem to get the encoder working on the Arduino Leonardo.. On the Uno it works perfect, but the Leo, no..
So I'm kind of stuck trying to find out what the problem might be..
The different FFB programs I have tried for the Arduino Leonardo won't recognize it either.

Probably a good thing since I need to be focusing on my studies at the moment! Hard though, when this is so much more interesting..
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 30, 2019, 07:59:02 AM
VOILA!!

Ran the encoder through my new 5€ Arduino oscilloscope and saw that the signals made much more sense when running the board on 3,3V instead of 5V.


So now it seems like I have almost all the components I need in order to build a working prototype! :D
All I need now is some connection from the motor to the steering axle.
I'm thinking belt drive, but with the ratio I want (something like 1:15) it would require quite a large pulley on the steering axle..
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: TimboC137 on May 31, 2019, 06:18:12 PM
very nice. can't wait to see it in action.

maybe you could use a few pulleys to step up the ratio instead of one large pulley. something like this maybe....

https://www.aliexpress.com/item/32341085661.html?spm=2114.search0104.3.22.12e1641dkza1ww&ws_ab_test=searchweb0_0%2Csearchweb201602_4_10065_10068_10130_10547_319_10059_10884_317_10887_10696_321_322_10084_453_10083_454_10103_10618_10307_10301_10821_537_536%2Csearchweb201603_52%2CppcSwitch_0&algo_expid=6ee7440b-41c9-4bd8-93ca-e5b7cd338d45-3&algo_pvid=6ee7440b-41c9-4bd8-93ca-e5b7cd338d45&transAbTest=ae803_5
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on May 31, 2019, 06:47:17 PM
Quote from: TimboC137 on May 31, 2019, 06:18:12 PMvery nice. can't wait to see it in action.

maybe you could use a few pulleys to step up the ratio instead of one large pulley. something like this maybe....


I know! Me neither!! ;D
(Damn you, lack of time)

I thought about that too, and probably it is the only choice I have.
I wanted to avoid it, since it doesn't only add cost but also takes space and makes the FFB less "direct"..

Since using a BLDC or stepper motor (super expensive drivers) is out of the question, I'm going to have to use a high gear
ratio to get high torque. Even a large 350W e-bike motor is 3000rpm, and since I will only be using 50 degrees of movement, I won't have the need for that kind of speed. A 1:30 ratio on that kind of a motor would probably be fast enough and that would give me about 30Nm of stall torque :O
If I don't gear it I think I'm just going to burn motors.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on June 08, 2019, 04:26:04 AM
I have been experimenting a bit with The Arduinos and decided to rip out the internals of the Logitech wheel and try to replace them.

Bought an Arduino Pro Micro, which is pretty much a tiny Leonardo, off eBay and I already had motor driver boards.
The wheel has an optical encoder, similar to the one I already tested, so I wanted to see if I could get it working with the Arduino.
It worked like a charm, so I decided to try switching out the "motherboard".

I wanted to see how the resolution and force feedback feeling would be. It was a huge step up! Feels like the original hard/software is on power save mode, not doing much work unless it really has to. The new brain has much less of a weak center, and reacts much quicker! Plus, I can tweak the ffb effects a bit.
All this I managed to do without cutting a single wire, so it is fully restorable.

(https://imgshare.io/images/2019/06/07/5849ABFD-69B4-48C1-8D9B-44A5BF4E6DA1.jpg)

After using the Pro Micro,  replacing the little breadboard with a smaller soldered version and resoldering the capacitor and all connectors of the motor driver to the bottom of the PCB, I could even get the cover on! This is so much fun..

Now I have to reassemble the handlebar controls again, I want to try this with GPB!
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on October 26, 2019, 12:53:57 PM
Redesigning the clutch and throttle at the moment. I now use a hall sensor inside the clutch handle instead. The wire was a pain. :)
I'm also trying to convert the throttle from potentiometer to hall sensor. My first 3D-printed prototype had some issues, so I'm designing v2 now..

Will be testing a brushless setup for ffb soon as well , but I'm not too confident it will work. A fun experiment though :)

Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Gav on November 08, 2019, 08:43:20 AM
Quote from: Chris_Beeves on October 26, 2019, 12:53:57 PMRedesigning the clutch and throttle at the moment. I now use a hall sensor inside the clutch handle instead. The wire was a pain. :)
I'm also trying to convert the throttle from potentiometer to hall sensor. My first 3D-printed prototype had some issues, so I'm designing v2 now..

Will be testing a brushless setup for ffb soon as well , but I'm not too confident it will work. A fun experiment though :)



You can use an ebike throttle if you want a ready made solution for the throttle as these use a hall effect sensor and work perfectly. They are also very cheap.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on November 09, 2019, 04:12:57 PM
Quote from: Gav on November 08, 2019, 08:43:20 AMYou can use an ebike throttle if you want a ready made solution for the throttle as these use a hall effect sensor and work perfectly. They are also very cheap.

Yeah, that would absolutely work. I'm having fun making my own though, so that is plan b.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on November 26, 2019, 08:30:53 PM
Actually got an e-bike throttle for free, so I guess I'll use that one for now.. :)

I have had some time lately, so a little progress has been made. Bought some bearings and a motor. I need to 3D-print som bearing holders and the big pulley to be able to build a first real prototype.
Sketched it up: (https://i.ibb.co/N9zxbfw/D2-CB1824-47-BD-4-C0-C-9556-3-C85-A46-FD1-C4.jpg)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on February 04, 2020, 09:00:17 PM
Tomorrow some parts are going in the printer! Interested to see how the PLA will hold up. If it works out well, a prototype in not so far away! :)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on February 08, 2020, 09:31:48 PM
(https://i.imgur.com/nZu1MkA_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)

The "fork" came out OK, and some of the parts for the front brake were fine. The top clamp and the belt pulley however got warped at some point during the print and messed up the top layers, but it's good enough for a prototype.
Always fun to see the parts designed in CAD coming to life.

Booked the printers this Wednesday again, so hopefully better luck then. :) 
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on February 18, 2020, 09:24:31 PM
Bad luck this time too! The filament got stuck in the very end and the print was stopped. Bearing brackets, load cell holder and a 100 tooth belt pulley came out great though, so I just need to redo a few parts.

Load cell front brake bracket:
(https://i.imgur.com/fM5SVMg_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)

I'll probably go for a hydraulic system in the future, but this wire solution actually gives quite a good feel. Nice blend between firm and flexy.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on February 21, 2020, 08:38:48 PM
The third print had failed too.. Printed 12 hours, then just stopped.. At it again!
Took the opportunity to redesign so I can have a quick release system for the handlebars to easily be switched to a steering wheel.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on February 26, 2020, 09:03:31 PM
Printed the Quick Release today and it turned out great!

And got the fourth try of the top clamp on the printer right now.. Fingers crossed!
(https://i.imgur.com/lUigii7_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on February 28, 2020, 04:25:22 PM
Fourth try was successful!
Next step is to make the top and bottom plate and assemble.
I also need to figure out a good table mount.. (https://i.imgur.com/BTmzWa3_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on March 01, 2020, 08:06:04 PM
Today's progress:
(https://i.imgur.com/LGNHsMl.jpg)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: ainuke on March 01, 2020, 09:02:43 PM
Quote from: Chris_Beeves on March 01, 2020, 08:06:04 PMToday's progress:
(https://i.imgur.com/LGNHsMl.jpg)

awesome looking rig!

can you be specific about the motor/driver combo you're using and how much torque you're expecting?

also, I'm interested in learning about the ffb you're using; more for another project I'm working on (FFB joystick for combat flight sims). You're using the Leonardo for processing this? Where can I read more about this, specifically as relates to gaming contollers? (My skillset lies more in mechanical design/prototyping than software, so looking for easier solutions).

Following this thread now...
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on March 01, 2020, 09:56:59 PM
Quote from: ainuke on March 01, 2020, 09:02:43 PMawesome looking rig!

can you be specific about the motor/driver combo you're using and how much torque you're expecting?

also, I'm interested in learning about the ffb you're using; more for another project I'm working on (FFB joystick for combat flight sims). You're using the Leonardo for processing this? Where can I read more about this, specifically as relates to gaming contollers? (My skillset lies more in mechanical design/prototyping than software, so looking for easier solutions).

Following this thread now...

Thanks! :D

The motor I just got because it looked strong, but after testing it I just think it's heavy ;)
I'll be using a BTS7960B driver to start with, should be plenty for this 120W motor. On paper I'll be getting something in the 2-4Nm area, so probably about 2Nm..
To accurately simulate a motorcycle, I'll be needing a lot more than that (probably in the 10Nm area), but that's another build. I have a "hoverboard" brushless motor waiting for that.

I'll be running EMC on an STM32 "black pill". There are perhaps better options, but EMC is quite easy to use.

I don't know how well the wheel firmware would translate to a joystick, it only offers ffb to the steering axis.
Xsimulator.net has a lot of info regarding "diy peripherals", I'd give it a read.
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: davidboda46 on March 01, 2020, 10:57:57 PM
Looks great man! Really makes me wish I had a 3d printer.

Cheers,

/David "Gonzo" Boda #46
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on March 02, 2020, 05:59:52 AM
Quote from: davidboda46 on March 01, 2020, 10:57:57 PMLooks great man! Really makes me wish I had a 3d printer.

Cheers,

/David "Gonzo" Boda #46

Thanks! Yeah, it's magic for prototyping. When it works. ;)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: doubledragoncc on March 02, 2020, 11:56:16 AM
Brilliant work Chris

Swear by my 3D printer makes so much possible

DD
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on March 03, 2020, 10:02:12 PM
Quote from: doubledragoncc on March 02, 2020, 11:56:16 AMBrilliant work Chris

Swear by my 3D printer makes so much possible

DD

Thanks DD!
What printer do you use?



Printing a new 95 tooth belt pulley and a microcontroller/motor driver mount tomorrow. Fingers crossed again.

Had some time to work with the stm32 microcontroller today, and it seems I got a bad one.. Windows won't recognize it, so I ordered two new ones. Hopefully at least one of them will do the job! Otherwise I'll have to switch back to the slower arduinos..
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: doubledragoncc on March 03, 2020, 10:14:00 PM
Just got a 5 year old CTC but she only let me down once but that aint bad for £300!!!

I only do small prints but important ones all big stuff gets laser cut.

DD
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on March 04, 2020, 05:22:53 AM
Not bad at all!
Nothing much happened the last few years for consumer printers. They're still automated glue guns ;)

Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on March 05, 2020, 10:11:20 PM
Finally got the new belt pulley printed! Fits perfect, and the belt tensioner works just as planned. Hopefully it will all handle the torque..

Also designed a little holder for the STM and motor driver.
Now it's not long until testing!
Fingers crossed the new microcontrollers do the job (and that they show up soon)

Got two new fork legs in the printer right now. I'm color blind, but even I can see that "mystic green" doesn't fit very well with Ferrari red and yellow ;) Unfortunately I cant get Öhlins gold filament..

(https://i.imgur.com/Z4ClqDf_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)

This is so much fun :D
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on March 07, 2020, 09:12:26 PM
Today I got it running! :D
The new fork legs look better too.

Made a "will do for now" desk mount. Now I need to reconnect all hand and foot controls. Had it all on "breadboards" before, so I took it all apart to make a circuit board instead. I wish I had documented it before I did.. Some wheel reinvention to do now.

(https://i.imgur.com/Et9HwoS_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: VSMaster on March 07, 2020, 10:21:21 PM
Quote from: Chris_Beeves on March 07, 2020, 09:12:26 PMToday I got it running! :D
The new fork legs look better too.

Made a "will do for now" desk mount. Now I need to reconnect all hand and foot controls. Had it all on "breadboards" before, so I took it all apart to make a circuit board instead. I wish I had documented it before I did.. Some wheel reinvention to do now.

(https://i.imgur.com/Et9HwoS_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)
That looks awesome man
We want the test video!
Title: Re: The Lumberbar/MCCC/M300/M301
Post by: Chris_Beeves on March 08, 2020, 08:36:27 AM
The first test video is super exciting!

Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on March 09, 2020, 09:43:49 PM
Ok, got it all up and running tonight!
Got some setting up and testing to do, but everything works!
:D
Title: Re: The M30x/MCCC/Lumberbar
Post by: TimboC137 on March 09, 2020, 10:33:49 PM
Thats so awesome. Congrats, man 
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on March 11, 2020, 09:56:09 PM
Had some time to play around with the controller a bit today.
Everything seems to do its' job fine, but the settings for force feedback is a pain.
I'm using the M2 and a CBR600 -05 to test. I tried modifying the P/D parameters for the bikes but that didn't seem to do much difference. Turning the FFB level down to under 50% seems to help though.

I rebuilt a computer PSU for the controller, but it keeps shutting down for unknown reasons. Tried a laptop charger instead and that also cuts out. Probably something to do with the big-ish motor and back currents. Will have to learn more about that.

Drove around a little on the "Trial" course and sometimes t really felt like driving! If I can just capture those moments and figure out what makes them work..
Title: Re: The M30x/MCCC/Lumberbar
Post by: h106frp on March 11, 2020, 11:50:23 PM
Using a switch mode supply the back EMF generated as the motor stops or reverses will be seen at the PSU output and briefly cause the PSU to shut-down (it is designed that way as a safety feature).
Ideally you need a servo brake module, this will capture the back EMF in a large capacitor before it reaches the PSU and re-uses the stored energy when the servo drives again.

This is a commercial offering but too pricey;
https://www.applied-motion.com/products/accessories/rc-050 (https://www.applied-motion.com/products/accessories/rc-050)

The circuit for this used to be on the web but I cannot find it now. It uses a comparator to trigger a mosfet that diverts the back EMF into a big cap with a brake /discharge resistor connected to it.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on March 14, 2020, 09:36:28 PM
Quote from: h106frp on March 11, 2020, 11:50:23 PMUsing a switch mode supply the...
Thanks h! I'll look into that.
Tried just using a diode on the power output, but that seemed to trip the motor driver instead.
I guess there are no short cuts here..

Played around a bit with the settings and it feels like I'm onto something, but feedback in the center is very weak..
Anyway, here's a short demo of how it works today;

I also took apart my "race hat", the hat I put LED's on and used with Opentrack, and made a clip for my headphones instead. Works great!
(https://i.imgur.com/KazOauO_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on March 19, 2020, 09:10:53 PM
I have been testing different settings, bikes and tracks. It's funny, the tracks I have actually ridden irl I make the same exact mistakes in game (with a lot less crashing irl).
The Cup R6 (by?) and Javi's 125 are the two best bikes that I've tried so far. Ffb is still buggy, I have to set it under 40% or it starts oscillating mostly when upright and braking.

Starting to realize I have used a less than optimal motor in the controller. It's quite notchy and I think that that is the main problem causing the weak center feedback.

At times it's loads of fun though! :D
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on March 21, 2020, 09:39:56 PM
Tidied up the wiring by the arduino that I use for the hand and foot controls and went from "breadboard" to a proper prototype board where all the controls are now detachable.

(https://i.imgur.com/akBTy6b_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)

Makes it a lot easier to store and there is less noise in the signals.

Looking into making some kind of seat that works better than my piano chair now.. It's not very ergonomic at the moment.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on March 29, 2020, 08:41:17 PM
With the great programming help of @maggikk22, today I got my knee draggers working!
I use an Arduino Nano and a program running in "Processing" (maggikk22's magic).
(https://i.imgur.com/weCJMdT_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)
With the little knob (potentiometer) I can set on the fly what angle they activate. Silly fun!
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on April 20, 2020, 07:59:29 PM
I've been trying to make the knee sliders wireless the past few days. Been working on a 433MHz solution that I got working very well with just LED's, but lost all range when running the motors. Next test is to use Wifi units instead and use UDP broadcasting. Should give me a lot better range, but it is a lot more complicated..
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on April 25, 2020, 08:30:14 PM
The DC motor isn't quite doing it for me.. Making new plans:

(https://i.imgur.com/HQFM7bU_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)

Printing some details the coming days.

Does anyone recognize the motor?
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on April 27, 2020, 11:37:39 AM
Got some parts together:


(https://i.imgur.com/xVdbKzg_d.jpg?maxwidth=640&shape=thumb&fidelity=medium)

The software side is a bit more tricky on this one. Getting som great help over at the xsimulator community though.

Not much lumber left now!
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 07, 2020, 09:08:38 PM
Had the first test run today with the new motor unit. Massive improvement! Feels like it has 10 times the power and resolution, even though it should only be about double in theory.

It was quite the challenge wiring and soldering the little motor driver card. Impressive how strong it is for its size.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 10, 2020, 06:18:47 PM
A brief demo of the status today

Title: Re: The M30x/MCCC/Lumberbar
Post by: davidboda46 on May 11, 2020, 04:07:12 AM
Awesome!

Cheers,

/David "Gonzo" Boda #46
Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 11, 2020, 02:58:51 PM
Crazy! Some incredible innovations in this project.


Are you still using Direct-Steer Torque mode? If so, how does the bike behave when the front is not aligned while wheelying?

How does the fact that the handlebar is not representing the bike lean angle influence playability?

What happened at the end there? The steering angle did not seem to match the one on screen.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 11, 2020, 07:47:53 PM
Thanks guys!

@Vini, no I changed to angle when I made the move to the standard force feedback. Torque didn't make any sense. Haven't tried it with this motor, but I suspect it would be similar. I'll give it a shot.

DS2(angle) when wheeling is very nice. The bars get light and give a nice kick when touching down again if the angle doesn't match.

In the end I lost the rear. I held on to the bars harder than the motor could push.
It's a compromise. Force feedback is a little buggy in the game and setting too high force makes the whole thing oscillate.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 12, 2020, 12:23:42 PM
Quote from: Chris_Beeves on May 11, 2020, 07:47:53 PMDS2(angle) when wheeling is very nice. The bars get light and give a nice kick when touching down again if the angle doesn't match.
Does the front stay misaligned (like this (https://www.youtube.com/watch?v=lX_1cK5Q9tQ&t=28)) or is it being auto-centered? Does the front send the bike into a wobble when its dropped and not aligned?
Title: Re: The M30x/MCCC/Lumberbar
Post by: Manu on May 12, 2020, 12:46:31 PM
Great job!
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 12, 2020, 01:09:39 PM
Quote from: Vini on May 12, 2020, 12:23:42 PMDoes the front stay misaligned (like this (https://www.youtube.com/watch?v=lX_1cK5Q9tQ&t=28)) or is it being auto-centered?
Yeah, it stays misaligned. The bars lose pretty much all resistance when the wheel leaves the ground.
My guess is that the ffb is calculated mostly from the "steer torque" and, even though it is extremely noisy at times, works very well 95% of the time (If you don't use too much force, then it goes bananas).

However, I have been experimenting with having a small spring effect in the background though to stiffen up the feeling of the bars a bit more (if I could just raise the force that wouldn't be necessary). This is present even when the wheel is off the ground, but that is not GPbikes fault just mine. :)

Quote from: Vini on May 12, 2020, 12:23:42 PMDoes the front send the bike into a wobble when its dropped and not aligned?
When accelerating, not so much. But if I roll off the throttle too fast, it gets quite nervous on landing. I would say it reacts quite similar to how a real bike would.

Quote from: Manu on May 12, 2020, 12:46:31 PMGreat job!
Thanks Manu!
Title: Re: The M30x/MCCC/Lumberbar
Post by: matty0l215 on May 12, 2020, 01:17:06 PM
Nice work Chris!
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 12, 2020, 01:25:25 PM
It's really fun to get some questions and feedback! Appreciate it

Quote from: matty0l215 on May 12, 2020, 01:17:06 PMNice work Chris!
Thanks mate!
Title: Re: The M30x/MCCC/Lumberbar
Post by: h106frp on May 12, 2020, 02:13:22 PM
Very nice so far..
Could you use a stepper drive rather than a servo? I was just thinking you could then alter the holding current to get better control of the position when you have very little force feedback signal without the need for ramping up the overall loop gain.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 12, 2020, 02:36:54 PM
Thanks for the answers. Even more proof that PiBoSo needs to relax the virtual rider under acceleration, as it interferes with the physics.


How noticable is the increase in steering resistance at higher velocities and does it make change of direction significantly slower or can you just overpower the motor?
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 12, 2020, 05:31:46 PM
Quote from: h106frp on May 12, 2020, 02:13:22 PMVery nice so far..
Could you use a stepper drive rather than a servo? I was just thinking you could then alter the holding current to get better control of the position when you have very little force feedback signal without the need for ramping up the overall loop gain.

That was the initial idea, but even the consumer level stepper motor drivers that support FOC (necessary to avoid the 'notches' in the stepper) are quite a bit more expensive. The driver I got cost just 18€. Good point however, and I will keep my eyes open for this.
I'm still playing around with the settings a bit, and I may well be able to raise the force setting if I dial it in better.

Quote from: Vini on May 12, 2020, 02:36:54 PMThanks for the answers. Even more proof that PiBoSo needs to relax the virtual rider under acceleration, as it interferes with the physics.
How noticable is the increase in steering resistance at higher velocities and does it make change of direction significantly slower or can you just overpower the motor?

Yeah, there is something strange there.
The increase is noticeable enough I would say. Even when I overpower the motor it doesn't feel as weird as you would imagine. It looks strange on video, but is kind of acceptable IRL if you know what I mean.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 13, 2020, 04:40:50 PM
What exactly was the problem with the 'A.S.S.-unit' BTW?


The last step now would be to make the handelbar swivel around you according to the lean angle of the bike, similar to DD's system (https://www.youtube.com/watch?v=dgfQhkqOp08).
Given the correct positioning, radius and angle scaling, the relative position to the handlebar would make you feel like actually hanging off to the side of the bike.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 13, 2020, 05:15:54 PM
The A.S.S. worked, but even though there was a click when leaning enough to trigger the rider it was really hard to get a feel for it. It would probably work better if it was analog and the center was more noticeable when driving. It feels like it takes some practice even with the trackIR controlling the rider.

Not sure about the tilting.. Do you mean to get the lean angle from the game and have a servo turn the whole thing?
Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 13, 2020, 08:08:32 PM
Ah, so the "ASS" was digital. I guess you'd need some sort of dynamic filter that automatically recalibrates the center position.
The only flexible, analog pressure sensing mat I found was this (http://sensingtex.com/product/seating-mat-dev-kit/), which seems a little bit expensive...
You could probably build something yourself for much less since you don't nearly need that much accuracy.

Quote from: Chris_Beeves on May 13, 2020, 05:15:54 PMNot sure about the tilting.. Do you mean to get the lean angle from the game and have a servo turn the whole thing?
Yes, exactly. Connect the handlebar to this additional servo with an arm to get the handlebar to swivel around you so that the relative position between you and the bars changes in a similar way it would when hanging off a real bike. You can see it in DD's principle, although the mounting position seems very low and the movement range quite small, probably because the bars are so wide.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 13, 2020, 08:45:39 PM
I'd go with hall sensors if I was going to try doing it again. They're cheap and quite easy to work with, but the whole concept works better in the imagination than irl I think.

If (when) I start working with motion I think I'll just rather move the whole rig. Seat and all. Combined with VR I don't think the movements need to be very large. But that will have to wait.

Next on my list is finishing the wireless knee sliders and trying to borrow a VR headset. That will pretty much finish the first stage of this project.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 13, 2020, 09:19:31 PM
Quote from: Chris_Beeves on May 13, 2020, 08:45:39 PMIf (when) I start working with motion I think I'll just rather move the whole rig. Seat and all. Combined with VR I don't think the movements need to be very large. But that will have to wait.
I think a full motion rig with moving seat would actually feel less real because of the lack of G-forces. You would constantly be fighting gravity when hanging off because it cannot be countered by cornering forces.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 13, 2020, 09:36:32 PM
Quote from: Vini on May 13, 2020, 09:19:31 PMI think a full motion rig with moving seat would actually feel less real because of the lack of G-forces. You would constantly be fighting gravity when hanging off because it cannot be countered by cornering forces.

We can always play with the g-force that we DO have. The 9,82m/s^2 straight down. If you keep that straight under you when hanging off it should in theory fool the mind if you're using VR.  So if you tilt the bike left when going right, the force vector of gravity should be in the same(ish) direction as the cornering force would be.. I don't know if this is possible to implement yet, but I look forward to trying in the future. :)
Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 13, 2020, 09:56:53 PM
You don't feel lateral forces when riding a real bike, though. The leaning always makes the resulting force vector acting on your body (gravity + cornering force) point straight into the seat.

This means that any leaning of the seat without the corresponding cornering force will result in an incorrect force vector that's not pointing straight into the seat anymore.

The way you are currently sitting on your chair is already simulating the appropriate (lateral) forces required to trick your brain.
All that is missing is the relative movement between the bars and you, which would be achieved by the having the handlebar swivel around/under you.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 14, 2020, 04:24:00 AM
Quote from: Vini on May 13, 2020, 09:56:53 PMYou don't feel lateral forces when riding a real bike, though. The leaning always makes the resulting force vector acting on your body (gravity + cornering force) point straight into the seat.

This means that any leaning of the seat without the corresponding cornering force will result in an incorrect force vector that's not pointing straight into the seat anymore.

The way you are currently sitting on your chair is already simulating the appropriate (lateral) forces required to trick your brain.
All that is missing is the relative movement between the bars and you, which would be achieved by the having the handlebar swivel around/under you.

That would be true when you're sitting perfectly still an upright on your seat.
When I drive on track, I don't do that. So when I drive a simulator, I don't want to do that. I want to hang off!  :P
I also need to hang off in order to control the rider with trackIR, and in the future VR.

Riding a right corner and hanging off, the resulting force of gravity, acceleration and centripetal acceleration would not point straight down through the bike. Rather at an angle pointing from the right side of the bike somewhere through it's center (depending on how much you hang off and your weight). To replicate that force when standing still (in a simulator for example), you would need to lean the whole bike to the left, not just the handlebars. Am I making sense?

If I didn't draw like a two-year-old, a sketch would probably help..
Buuuut, this is probably a discussion for another thread, another time. :)
Title: Re: The M30x/MCCC/Lumberbar
Post by: maggikk22 on May 14, 2020, 12:53:39 PM
I agree with Vini: you have to fight against gravity all the time.
Even when you look at professional simulators such as the moto trainer (even if you don't control the rider), the overall feeling seems to be that the bike is too heavy.
If i want to be bad, it is more a gym machine than a bike simulator. Have you seen these videos showing the MotoGP riders trying to lean the bike left-right as many times as possible?

I tried to make a similar full motion simulator, using a big DC motor and springs to help with gravity issues.
It worked not bad, but it required better electronics skills and different (more expensive) hardware to improve the feeling.

Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 14, 2020, 01:18:48 PM
Quote from: Chris_Beeves on May 14, 2020, 04:24:00 AMThat would be true when you're sitting perfectly still an upright on your seat.
The extra forces you generate by hanging off are the same whether you hang off your stationary chair or hang off a real bike while riding, it's just gravity. Therefore these forces don't have to be considered in the design of the simulator/controller. Note that we are talking about the forces acting on you, not the forces acting on the bike, which would be influenced by the overall shift in center of gravity produced by hanging off.

Quote from: Chris_Beeves on May 14, 2020, 04:24:00 AMRiding a right corner and hanging off, the resulting force of gravity, acceleration and centripetal acceleration would not point straight down through the bike. Rather at an angle pointing from the right side of the bike somewhere through it's center (depending on how much you hang off and your weight).
This slight change in angle is exactly what you get when you hang off your chair: A bit of "extra" gravity pulling you slightly away from (the center of) your seat instead of merely pointing straight into it.

Your idea of tilting the bike in the opposite direction would result in a very strange feeling because even though the relative position to the bike might be correct, your sense of balance would know that something is wrong. Your inner ear could tell that your body is leaning. On a real bike, this is not the case because the cornering force counteracts the gravity acting on your inner ear, resulting in your sense of balance always staying aligned to the bike.
If you closed your eyes while riding piggyback you would not be able to tell how far the bike is leaning.
This means that for your simulator, your body cannot be leaning at all because any sense of tilt would be wrong.


I will stop with the off-topic now but you are actually way closer to the "perfect simulation" than you might think.
Title: Re: The M30x/MCCC/Lumberbar
Post by: h106frp on May 14, 2020, 02:54:42 PM
I wonder if one of these gyroscopic wheels would assist with a full size simulator?
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 15, 2020, 09:50:53 AM
Quote from: maggikk22 on May 14, 2020, 12:53:39 PMI agree with Vini: you have to fight against gravity all the time.
Even when you look at professional simulators such as the moto trainer (even if you don't control the rider), the overall feeling seems to be that the bike is too heavy.

That's exactly my point. The likes of moto trainer just ignores the lack of external forces. It's like a mechanical bull, nothing like racing a bike.

Love your rig! Must weigh half a ton?

Quote from: Vini on May 14, 2020, 01:18:48 PMThe extra forces you generate by hanging off are the same whether you hang off your stationary chair or hang off a real bike while riding, it's just gravity. Therefore these forces don't have to be considered in the design of the simulator/controller. Note that we are talking about the forces acting on you, not the forces acting on the bike, which would be influenced by the overall shift in center of gravity produced by hanging off.
I disagree with you here. When racing a real bike (not just riding) it's not "just gravity". It is the resulting force I'm talking about. I had my inner three-year-old sketch it up for me:

You cannot see attachments on this board.

The important thing to keep in mind here is that in real life we have L+g. That makes the percieved resulting force = R
In my seat by the computer, sadly I don't have access to an L. However, I can't just remove it from the equation (like you can see it the fatal second row incident). We need to replicate R, like in the third row.
Again, all this is only applicable if you want to lean off your seat/chair/rig.

Quote from: Vini on May 14, 2020, 01:18:48 PMThis slight change in angle is exactly what you get when you hang off your chair: A bit of "extra" gravity pulling you slightly away from (the center of) your seat instead of merely pointing straight into it.

Your idea of tilting the bike in the opposite direction would result in a very strange feeling because even though the relative position to the bike might be correct, your sense of balance would know that something is wrong. Your inner ear could tell that your body is leaning. On a real bike, this is not the case because the cornering force counteracts the gravity acting on your inner ear, resulting in your sense of balance always staying aligned to the bike.

What you are explaining here is exactly what leaning the bike the "wrong way" would remedy (Only applicable when hanging off your chair). Again, we have to replicate the resulting force "R" by only using the availible force "g", which needs to be pointing the same way "R" would. To do this, we rotate whatever you are sitting on the -(angle) of R.

Quote from: Vini on May 14, 2020, 01:18:48 PMIf you closed your eyes while riding piggyback you would not be able to tell how far the bike is leaning.
This means that for your simulator, your body cannot be leaning at all because any sense of tilt would be wrong.

This also only applies if your'e sitting perfectly straight on the bike. In that case, no lean movement is necessary, I agree to that.

Quote from: Vini on May 14, 2020, 01:18:48 PMI will stop with the off-topic now but you are actually way closer to the "perfect simulation" than you might think.

Me too, soon, but first my inner child couldn't help sketching what he thinks is strange with Swivel:

You cannot see attachments on this board.

(Maybe a paralell movement would be closer to real life, but harder to make)
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 15, 2020, 09:02:43 PM
This shows the feel of the controller and the head tracking a bit better I think.

Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 17, 2020, 06:32:25 PM
Good video, really shows the realism much better!


Regarding our physics discussion, the differentiation between hanging off and not hanging off is fundamentally wrong. Just think it a step further: It would mean that there is a special distance to the bike you need to achieve at all times in order to hit the sweet spot where the force simulation is accurate. Any deviation from that would result in an incorrect feeling. The extra forces created by hanging off are purely created by your own positioning while the external forces acting on the bike-rider (or simulator-player) system as a whole remain the same.
You are also not hanging off everytime the bike is leaning, for example when swerving around on a straight you are fully tucked in.
Lastly, your differentiation would mean that the physics are not continuous which cannot be true: The force calculation at the transition away from exactly 0° lean angle would change instantaneously in order to reflect your theory on the influence of hanging off.

The swivel design is a compromise in order to replicate some of the relative movements hanging off and leaning produces on a real bike. The mounting height and the bike-lean-angle-to-controller-swivel-angle-scaling need to be finetuned, which is not being properly reflected in your sketches.
If they are correctly adjusted, the movements between your head (which is where most of your senses come from) and the handlebar would be quite close to reality:
(https://i.imgur.com/Oq4iOvs.jpg)
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 17, 2020, 08:37:47 PM
Quote from: Vini on May 17, 2020, 06:32:25 PMGood video, really shows the realism much better!

Thank you!

Quote from: Vini on May 17, 2020, 06:32:25 PMRegarding our physics discussion, the differentiation between hanging off and not hanging off is fundamentally wrong. Just think it a step further: It would mean that there is a special distance to the bike you need to achieve at all times in order to hit the sweet spot where the force simulation is accurate. Any deviation from that would result in an incorrect feeling.

I can see that I'm failing to communicate what it is that I mean. I'm not saying there is a "correct" hang off amount. I agree with you that as it is now, any hanging off messes up the sense of balance. Leaning the simulator rig in the direction you are turning would make that even worse. Leaning it too much in the other direction would mess it up equally. I'm enjoying this discussion a lot, you make good points!
Do you agree with me that, if you were to lean a motion rig in any direction, it would be the opposite way of the turn?

Quote from: Vini on May 17, 2020, 06:32:25 PMThe extra forces created by hanging off are purely created by your own positioning while the external forces acting on the bike-rider (or simulator-player) system as a whole remain the same.

The shift in the rider's center of gravity affects the lean angle of the bike you need to make a given turn at a given speed. So even if the external forces are the same, the relation between the internal forces are different (lean angle/hang off = constant, or something like that)

Quote from: Vini on May 17, 2020, 06:32:25 PMYou are also not hanging off everytime the bike is leaning, for example when swerving around on a straight you are fully tucked in.
Lastly, your differentiation would mean that the physics are not continuous which cannot be true: The force calculation at the transition away from exactly 0° lean angle would change instantaneously in order to reflect your theory on the influence of hanging off.

Yeah, that is a good point too. A depth mapping sensor would be required to get a somewhat correct assuption of rig lean.. Maybe that could keep the lean/hang ratio constant (or just tap into the trackIR data..). I'd like to go hang out at Cruden for a year or so to try stuff out..

Quote from: Vini on May 17, 2020, 06:32:25 PMThe swivel design is a compromise in order to replicate some of the relative movements hanging off and leaning produces on a real bike. The mounting height and the bike-lean-angle-to-controller-swivel-angle-scaling need to be finetuned, which is not being properly reflected in your sketches.
If they are correctly adjusted, the movements between your head (which is where most of your senses come from) and the handlebar would be quite close to reality:
(https://i.imgur.com/Oq4iOvs.jpg)

Your sketch is a lot better than mine! ;)
I feel that the radius required to make the swivel work for my riding style would make it very difficult to fabricate. This is just my stuborn mind though, I haven't tried it, so I can't really say.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 17, 2020, 11:30:43 PM
Quote from: Chris_Beeves on May 17, 2020, 08:37:47 PMDo you agree with me that, if you were to lean a motion rig in any direction, it would be the opposite way of the turn?
Yes, definitely.
By your logic, you'd have to move the simulator in such a way that it precisely counteracts your own movements so that your body stays vertical. But then hanging off and not hanging off would feel the same way which is not accurate either since hanging off in reality requires effort against gravity (which you feel quite clearly in your inside knee). So I come to the conclusion that there shouldn't be any tilting at all, except the one you produce yourself by moving away from your chair, meaning the seat stays stationary.

Quote from: Chris_Beeves on May 17, 2020, 08:37:47 PMThe shift in the rider's center of gravity affects the lean angle of the bike you need to make a given turn at a given speed. So even if the external forces are the same, the relation between the internal forces are different (lean angle/hang off = constant, or something like that)
This is what I was talking about earlier and which confused me as well: For the design of your simulator, you need to stay in the reference frame of the rider, which is the opposite of all those motorcycle vector sketches you find in literature. The fact that hanging off allows the bike-rider system as a whole to turn faster or the fact that it reduces the bike's lean angle is not relevant to the forces the rider experiences (or at least it's negligible).

The only forces you consciously experience are the ones you have to actively resist.
When staying stationary in the seat, the combination of gravity and cornering force pushes your straight in the seat, requiring no resisting on your part.
As soon as you hang off (your lower body), gravity pulls you away from the bike requiring effort to stay seated. The cornering force on the other hand still pushes you into the bike, meaning the only force you have to resist is the gravity pointing straight down, which is exactly the same you currently have to resist when moving out of your stationary chair.

Quote from: Chris_Beeves on May 17, 2020, 08:37:47 PMI feel that the radius required to make the swivel work for my riding style would make it very difficult to fabricate.
Still a lot easier to build than a full motion bike rig, though ;D
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 18, 2020, 08:43:53 AM
Quote from: Vini on May 17, 2020, 11:30:43 PMBy your logic, you'd have to move the simulator in such a way that it precisely counteracts your own movements so that your body stays vertical. But then hanging off and not hanging off would feel the same way which is not accurate either since hanging off in reality requires effort against gravity

I think this is where our opinions (enterpretations of reality) differ.
If I'm going in a straight line and hanging off, all I'm doing is moving my g-vector from pointing straight down through the bike to the side of it paralell to the bike's g-vector. Moving requires effort ,being a large mammal like myself, and staying there without cornering requires strength to hang on.
Then when I start to lean the bike, the lateral forces, or rather centripetal acceleration, comes into play. The body can't tell the difference or separate these forces, so if I were to close my eyes at this moment (scary thought), I wouldn't be able to accurately point out the direction of gravitation. We agree on that too?

Quote from: Vini on May 17, 2020, 11:30:43 PMThis is what I was talking about earlier and which confused me as well: For the design of your simulator, you need to stay in the reference frame of the rider, which is the opposite of all those motorcycle vector sketches you find in literature. The fact that hanging off allows the bike-rider system as a whole to turn faster or the fact that it reduces the bike's lean angle is not relevant to the forces the rider experiences (or at least it's negligible).

I say it's highly relevant. The difference in hanging off a bike going in a straight line and one cornering is indeed noticable.

Quote from: Vini on May 17, 2020, 11:30:43 PMThe only forces you consciously experience are the ones you have to actively resist.
When staying stationary in the seat, the combination of gravity and cornering force pushes your straight in the seat, requiring no resisting on your part.
As soon as you hang off (your lower body), gravity pulls you away from the bike requiring effort to stay seated.
Up until here we are pretty much on the same page.
I still think that hanging off going straight and hanging off in a corner makes a difference in experience though. 

Quote from: Vini on May 17, 2020, 11:30:43 PMThe cornering force on the other hand still pushes you into the bike, meaning the only force you have to resist is the gravity pointing straight down, which is exactly the same you currently have to resist when moving out of your stationary chair.

If your perception could separate those forces, yes! What I'm saying is you can't just pull the cornering force out of the equation and not replace it with anything if you want to maintain (quasi-) equilibrium. I'll make a sketch of it and try to calculate. Maybe I'll find that I'm wrong! :D

Quote from: Vini on May 17, 2020, 11:30:43 PMStill a lot easier to build than a full motion bike rig, though ;D

Indeed, but it solves a problem I don't have ;D
Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 18, 2020, 05:38:54 PM
Quote from: Chris_Beeves on May 18, 2020, 08:43:53 AMIf I'm going in a straight line and hanging off [...]
Then when I start to lean the bike, the lateral forces, or rather centripetal acceleration, comes into play. The body can't tell the difference or separate these forces, so if I were to close my eyes at this moment (scary thought), I wouldn't be able to accurately point out the direction of gravitation. We agree on that too?
No, this is exactly where we disagree. The centripetal force only "cancels out" (your perception of) gravity when you are staying seated (hence my example of riding piggyback with eyes closed). Only in this case, do the sum of all forces acting on you require no active effort to resist. Even when leaning 40° or more, hanging off requires effort, specifically in your inside leg/knee to support your body against (vertical) gravity. This is pretty easy to test.

Quote from: Chris_Beeves on May 18, 2020, 08:43:53 AM
Quote from: Vini on May 17, 2020, 11:30:43 PMThe only forces you consciously experience are the ones you have to actively resist.
When staying stationary in the seat, the combination of gravity and cornering force pushes your straight in the seat, requiring no resisting on your part.
As soon as you hang off (your lower body), gravity pulls you away from the bike requiring effort to stay seated.
Up until here we are pretty much on the same page.
I still think that hanging off going straight and hanging off in a corner makes a difference in experience though.
Not because the underlying forces change, though. The force you have to resist in both cases is exactly the same: gravity pulling you straight down and away from the bike. The difference when the bike is leant over is that your outside leg is automatically anchoring you to the bike and resisting the pull of gravity, so it does not require as much conscious effort from your inside leg.

Quote from: Chris_Beeves on May 18, 2020, 08:43:53 AM
Quote from: Vini on May 17, 2020, 11:30:43 PMThe cornering force on the other hand still pushes you into the bike, meaning the only force you have to resist is the gravity pointing straight down, which is exactly the same you currently have to resist when moving out of your stationary chair.
If your perception could separate those forces, yes! What I'm saying is you can't just pull the cornering force out of the equation and not replace it with anything if you want to maintain (quasi-) equilibrium.
Your perception does not have to separate the forces, physics does that. I am not pulling the cornering force out of the equation, it is simply being counteracted by the presence of the bike and its traction force.
Hanging off means that you no longer are in equilibrium, that is the whole point of it: You add "extra gravity" to the bike-rider system, which allows the bike to stay at a smaller lean angle (or higher velocity) in order to maintain the new equilibrium. The bike-rider system as a whole always stays in equilibrium but as soon as you start hanging off, you separate your body from this equilibrium.
Another way to look at it is this: The force with which you push yourself up to resist gravity when hanging off is equal to the force that pushes the bike down and therefore allows it to corner faster while keeping the same lean angle (Newton's third law). The further you move out of the equilibrium (where gravity + cornering force aligns with the bike), the more you have to "push the bike into the corner" and the faster it can turn.

This, again, is similar to the physics you experience when hanging off your stationary chair: The further you move your CoG away from the support of the chair, the more you have to push with your inside leg to resist falling down.
The only difference is that you cannot anchor yourself with the other leg (as described earlier), which makes it harder than it would be in reality.
So you need a seat which you can grip well with your legs no matter how far you hang off.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 18, 2020, 08:22:14 PM
Feels like we're not going to reach an agreement on this right now, but I will definitely pick this up again (preferably with your input!) when I start planning the possibilities of a motion rig. Thank you for taking the time Vini!

OT I am currently debugging the force feedback in the game, it is quite harsh still even if it is much better with the latest controller. Filtering on the controller side don't seem to help much, but I'm giving it another go tuning the bike direct steer settings.
Low setting in game and high setting in the controller seems to be better than the other way around.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Vini on May 18, 2020, 09:25:27 PM
Good discussion anyway!
I will try to do some calculations myself as well but taking into account all the reactionary forces makes it quite complicated.
Ultimately, I don't think an exact calculation is necessary in order to identify the dependencies between the different parameters. Thought experiments are the way to go in this case in my opinion.


Very intersted in your analysis of the force feedback, specifically under acceleration.
Would it be possible to make another riding video where you show a synced graph of the logged raw force feedback data?
The behaviour while wheelying and sliding would be especially interesting.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 19, 2020, 07:29:01 AM
Quote from: Vini on May 18, 2020, 09:25:27 PMGood discussion anyway!
I will try to do some calculations myself as well but taking into account all the reactionary forces makes it quite complicated.
Ultimately, I don't think an exact calculation is necessary in order to identify the dependencies between the different parameters. Thought experiments are the way to go in this case in my opinion.
Absolutely!
No, I agree with you there. In the end it is about what 'feels' right when you're on the rig. That doesn't always match up with what 'should feel' right.
My thought is that either way, I'm going to be building a seat with a tank to hold on to. When that is finished, I'll make it tiltable and get a strong friend or two to act as actuators and just experiment.

Quote from: Vini on May 18, 2020, 09:25:27 PMVery intersted in your analysis of the force feedback, specifically under acceleration.
Would it be possible to make another riding video where you show a synced graph of the logged raw force feedback data?
The behaviour while wheelying and sliding would be especially interesting.
I'll take a look at it as soon as i get the time, hopefully today.
Sliding.. Have you tried hardcore mode? Most of the sliding I do is on the fairings in the gravel trap. ;D

What kind of sliding do you have in mind? Power sliding out of curves I can probably do with the MotoGP bikes. Into curves... Don't know..
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 25, 2020, 08:33:21 PM
Had a little go on the 3D-printer again and tried to tidy the insides a little. Turned out quite good! The motor driver pcb mount didn't really work out the way I thought though so I'll make a second version.
Also a cover is printing right now. Hopefully it will fit well. Had a small mishap with the filament (didn't really think about how much was left), so it'll be a two color piece.. :D
Glad I noticed sooner rather than later.

(https://i.ibb.co/6mnNfBr/F192-E301-ABBB-4-AA5-A70-D-A18251-D20-B10.jpg)
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 26, 2020, 06:18:41 PM
The cover turned out fine! A bit bulky maybe, but I'm happy!
The little rear brake thing seems to do it's work good too!

(https://i.ibb.co/28YL2fx/F01-FA48-E-DABB-45-FA-B704-B5-B360-DA144-A.jpg)

I want to paint the motor part, but at the moment I'm too lazy to take it apart.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on May 27, 2020, 12:15:34 PM
Cleaned up the electronics a bit too. It'll be nice not having to be so careful when setting up.

You cannot see attachments on this board.
Title: Re: The M30x/MCCC/Lumberbar
Post by: Chris_Beeves on July 06, 2020, 11:51:54 AM
After a little break building a sim wheel of the other side of the hoverboard:

You cannot see attachments on this board.

Right now I'm working on making the wheel buttons wireless over Bluetooth. It's working, but for some reason it keeps resetting every thirty seconds.
Hopefully when this is working, I can implement it on the handlebar controller too.

Starting to work on a better seat unit. First I will just make it like a seat, but leave it open to add motion to it in the future. First front/back lean to simulate acceleration and braking.