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!