Need support about firmwares for ffb wheel and 3 pedal loadcell

I am making opensource firmware for ffb wheel and 3 loadcell pedal. i code for arduino 1st. I have not much time, no need helps to finish them soon.
1. 3 Loadcell pedal for arduino pro micro: finished, it works well.
I will add button for shifter and make vibration for pedal or even shifter.
2. Ffbwheel for arduino leonardo
A. Finished
- pc recognized it as ffb device.
- read increment encoder w/wo Z index upto 32 bit, calculate velocity, acceleration of axis.
- download ffb report
- force calculator:
+ constant force
+ ramp force
B. Todo
- force calculator
+condition effect:
According to this page:


https://developer.apple.com/documentation/forcefeedback/ffcondition?changes=__8&language=objc



depend on Effectype, metric is one of these:

spring - exerts a force proportional to the displacement

damper - exerts a force proportional to the position velocity

inertia - exerts a force proportional to the position acceleration

friction - exerts a constant force when the position is changing

if metric < cpOffset - deadBand

force = (metric - (cpOffset - deadBand)) * negativeCoefficient;

else if metric > (cpOffset + deadBand)

force = (metric -(cpOffset + deadBand)) * positiveCoefficient;



Because metric value is in [-1.0,1.0] so need normalize it.

string: metric=(currentPositionEncoder/encoderRange) => OK

friction: metric = (currentPositionEncoder- lastPositionEncoder)/encoderRange => OK

I don't have idea for damper and inertia, how to normalize currentVelocity and acceleration.

currentVelocity = (currentPositionEncoder- oldPositionEncoder)/(currentTimeInMillis - lastTimeInMillis) => metric = ??

acceleration = (currentVelocity-lastVelocity)/(currentTimeInMillis - lastTimeInMillis) => metric = ??
+ periodic effect: not yet investigated.
- pwm: use analogwrite(pin, force)
- UI config: not yet investigated
After finished all for arduino, i will make code for stm32 later if it work well :)!
If anyone is interested in this project, pls join to finish it soon.
Video test pedal:
 
Last edited:
A.Update:
1. Wheel
- calculated periodic effect
- made pwm via pin 5,6 with 2 mode pulse/dir and pwm +/-
2. Pedal
- add kalman filter noise
B. Todo:
1. Wheel
- caculate force for damper/interia effect
- apply gain from UI config
- UI config
2. Pedal
- add button for shifter
- add vibration for pedal
- add force feed back for shifter.
 
Upvote 0
Hi Hoan,
Nice work!
I would like to help you with this project (NVWheel mainly). I already downloaded your firmware from github and compiled it successfully. Then I tried to run it on an Leonardo just to test it. It is detected as a game controler FFB capable but when I connect a rotary encoder to it... nothing happens.
I'm not sure whether I connected the encoder incorrectly. ¿Do you have a schema showing connections? It would be very helpful.
Thanks
 
Upvote 0
Hi Hoan,
Nice work!
I would like to help you with this project (NVWheel mainly). I already downloaded your firmware from github and compiled it successfully. Then I tried to run it on an Leonardo just to test it. It is detected as a game controler FFB capable but when I connect a rotary encoder to it... nothing happens.
I'm not sure whether I connected the encoder incorrectly. ¿Do you have a schema showing connections? It would be very helpful.
Thanks
Encoder use pin 0,1. If encoder has z phase connect z to pin 2.
Pin 9, 10 for pwm.
Currently it worked.
I am trying to code for stm32 too (still continue arduino for future teensy 4). Test receive ffb report on stm32:

 
Upvote 0
Hi,thanks for your coding,I make my own ffb Wheel recently too! And what's the application you operated in windows? I want to use it to test the HID_PID communication about PC and Arduino.
 
Upvote 0
Hi,thanks for your coding,I make my own ffb Wheel recently too! And what's the application you operated in windows? I want to use it to test the HID_PID communication about PC and Arduino.

Hi
have you test the firmware?

I commit the firmware on sparfun pro micro and it's works. When I use wheelconfig I see the connect event, but I can't understand how to go on.

Marco
 
Upvote 0
Hi
have you test the firmware?

I commit the firmware on sparfun pro micro and it's works. When I use wheelconfig I see the connect event, but I can't understand how to go on.

Marco
hi
I test the project by using Serial.println() where is added in USB_Recv(){}.When I open the game TDU2,it can recv the report from PC.
Is wheelconfig an app in PC?
How can I download it?
 
Upvote 0
Hello
Im' trying to use your firmware.
I have used WheelConfig and I can't see firmware version. what kind of another software I need?

Thanks Marco
Curently, VNGUI just supported VNshifter, I have not yet finished GUI for VNwheel. But it can run without GUI. download lasted source code. Open file wheelConfig.cpp. Modify some parameter of your setup: encoder ppr, angle,... and upload to Leo or promicro.
Now I concentrade on STM32. i will come back on arduino after finishing on stm32

 
Last edited:
Upvote 0
Hi all,
I made my own simulator with steering wheel and pedals. I will post some pictures but now I want to develop the for feedback with the arduino code of HoanTV. Thank you for your job, it's amazing !!

I want to make FFB in two steps :
- 1st step : arduino LEONARDO with TB6560, STP-58D111, power supply 24V-15A and rotary encoder LPD3806-600BM-GS-24C
This is a micro FFB configuration to verify the code and play a little before I use the real configuration. if I succeed this micro setup, I apply in my real configuration
- 2nd step : arduino LEONARDO with HBS86H servo drive, 86HSE8.5N-B32 (encoder included 1200), power supply 24V-15A

So,
Do you think that it's possible to use the HOANTV code for my two confugurations?
Do you have an schematic wires please ? Can you confirm me :
Pin 0 and 1 for the encoder ?
Pin 9 for the PULSE and Pin 10 for the DIRECTON ?

I donwload te arduino code in the arduino loenardo and everything is ok (donwload ok). But, when I plugged the arduino LEONARDO, the WHEEL CHEK 1.72 software bugged (not response). What's the problem ?

I'm sorry for my basic questions but I'm a neewbie in electronic system.
Thank you very much for your help.
 
Upvote 0
#car_simulator_firmware

#vnm_simulation

CarSimulatorFirmware is one of the open firmwares of VNM Simulation.

It is created to replace the end of life firmware MMOS, some features:

- Support 12 effects and can adjust individually effect gains.

- Support telemetry ffb (only Assetto corsa at the moment, need time to add other game like ACC, Rally,...)

- You can connect directly to analog input pa4,pa5 of Ac servo driver without external DAC.

and it will be add many feature later.

Go to my discord to get newest version and discuss about the firmware:https://discord.gg/NDk4pYd
57A4A053-A58F-4D70-A590-E356FDBA27A2.jpeg
 
Upvote 0
Lastest feedback :)!
 

Attachments

  • 0C0D85B7-9F3A-409B-B0AA-FFCB945D79AA.png
    0C0D85B7-9F3A-409B-B0AA-FFCB945D79AA.png
    508.2 KB · Views: 247
  • 58F228D8-1BFE-4B17-816B-2BD5B381316E.jpeg
    58F228D8-1BFE-4B17-816B-2BD5B381316E.jpeg
    200.4 KB · Views: 254
  • 03ED4AF6-CA48-4701-8568-B2EAFD6519C7.jpeg
    03ED4AF6-CA48-4701-8568-B2EAFD6519C7.jpeg
    192.2 KB · Views: 217
Upvote 0

What are you racing on?

  • Racing rig

    Votes: 528 35.2%
  • Motion rig

    Votes: 43 2.9%
  • Pull-out-rig

    Votes: 54 3.6%
  • Wheel stand

    Votes: 191 12.7%
  • My desktop

    Votes: 618 41.2%
  • Something else

    Votes: 66 4.4%
Back
Top