ranenbg / Arduino-FFB-wheel

Stand alone directInput USB device recognized in Windows as a joystick with force feedback functionality, based on BRWheel by Fernando Igor from 2017.
147 stars 20 forks source link

enhancement request : MOTOR_ENABLE_PIN with PWM+- #61

Closed Marcos2BR closed 3 days ago

Marcos2BR commented 1 month ago

Hello Milos, First of all, thank you very much for your excellent work. I'm using your firmware on a Vintage AVB Wheel Force Feedback GC-FBW1

I don't know much about C, C++, just the basics to turn comments on/off and understand the basics of the code. Following your tips I was able to compile HEX with arduino-ide by mounting the library in the "portable" folder. In config.h I enabled _#define USE_QUADRATURE_ENCODER , USE_HATSWITCH , USE_BTNMATRIX , AVG_INPUTS , USE_AUTOCALIB, USE_CENTERBTN , USEEXTRABTN and everything works fine. Long live my dinosaur steering wheel and its 8 buttons + hatswitch + accelerator + brake + forcefeedback

BUT I feel the steering wheel a little hard at rest, I saw that you gave the tip: "if your motor is very hard to turn..." (Motor driver wiring)

So I thought I'd ask you to implement "MOTOR_ENABLEPIN with PWM+-" , something like : //vsulako code

ifdef MOTOR_ENABLE_PIN

if (force!=0) //or other value digitalWriteFast(MOTOR_ENABLE_PIN, 1) else digitalWriteFast(MOTOR_ENABLE_PIN, 0);

endif_

I believe this will make the steering wheel turn smoother with low pwm, similar to Emc, Visulaco, RFR, etc

Sorry for the excessive blah blah blah, honestly, I'm thrilled to see my old school steering wheel coming back to life, and I'm also happy to let the local community know that there are alternative firmwares besides RFR and EMC.

ranenbg commented 1 month ago

Hi dude, you're welcome.

Have you tried the the "tip" as the workaraound first? I'd like hear how that went for you.

I'll think about how to implement your suggestion, I could utilize the unused pin11 which is otherwise a direction pin, when pwm+- mode is used. In principle, it's a very easy fix in the firmware, there should be plenty of memory left for it.

Cheers, Milos.

On Wed, Aug 7, 2024, 18:33 Marcos @.***> wrote:

Hello Milos, First of all, thank you very much for your excellent work. I'm using your firmware on a Vintage AVB Wheel Force Feedback GC-FBW1

I don't know much about C, C++, just the basics to turn comments on/off and understand the basics of the code. Following your tips I was able to compile HEX with arduino-ide by mounting the library in the "portable" folder. In config.h I enabled #define USE_QUADRATURE_ENCODER , USE_HATSWITCH , USE_BTNMATRIX , AVG_INPUTS , USE_AUTOCALIB, USE_CENTERBTN , USE_EXTRABTN and everything works fine. Long live my dinosaur steering wheel and its 8 buttons + hatswitch + accelerator + brake + forcefeedback

BUT I feel the steering wheel a little hard at rest, I saw that you gave the tip: "if your motor is very hard to turn..." (Motor driver wiring)

So I thought I'd ask you to implement "MOTOR_ENABLE_PIN with PWM+-" , something like :

//vsulako code #ifdef MOTOR_ENABLE_PIN if (force!=0) //or other value digitalWriteFast(MOTOR_ENABLE_PIN, 1) else digitalWriteFast(MOTOR_ENABLE_PIN, 0); #endif

I believe this will make the steering wheel turn smoother with low pwm, similar to Emc, Visulaco, RFR, etc

Sorry for the excessive blah blah blah, honestly, I'm thrilled to see my old school steering wheel coming back to life, and I'm also happy to let the local community know that there are alternative firmwares besides RFR and EMC.

— Reply to this email directly, view it on GitHub https://github.com/ranenbg/Arduino-FFB-wheel/issues/61, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIHKHPVWGPZ2URC4Q5JOAZ3ZQJD4TAVCNFSM6AAAAABMEYT2W6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ2TGOBYHEZDCMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Marcos2BR commented 1 month ago

Hi dude, you're welcome. Have you tried the the "tip" as the workaraound first? I'd like hear how that went for you. I'll think about how to implement your suggestion, I could utilize the unused pin11 which is otherwise a direction pin, when pwm+- mode is used. In principle, it's a very easy fix in the firmware, there should be plenty of memory left for it. Cheers, Milos.

Hi Milos, the mechanics of my steering wheel have a 40:1 reduction , Maybe that's why at rest it feels "heavy" (with the engine braked).... I made a connection with diodes in ENABLE (attached photo) and it was very smooth at rest and small turns. I did not measure the PWM R/L time with an oscilloscope, but I imagine that below 20% the BTS output is still in tri-state.

motor_diodes

ranenbg commented 3 days ago

I'll probably implement this in the new firmware version. I'll close the issue for now. We can discuss it latter if needed.