1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

News Open source force feed back

Discussion in 'DIY peripherals' started by Hoantv, Oct 2, 2019.

  1. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    After finishing the pedal, I continue wheel fw:

    According to this page:

    https://www.neurobs.com/pres_docs/h...edback_stimuli/07_condition_force_effects.htm

    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 done

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

    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 = ??

    any idea???
  2. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Testing phase:
    - 10000cpr encoder -> work fine.
    - wheel can not run out of a range (900 degree)
    - ffb run incorrectly, force for each effect is always positive value -> wheel run one way when testing with wheelcheck.
    • Like Like x 1
  3. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Updated:
    Force feedback testing with Wheelcheck

    • Creative Creative x 1
  4. Pastrana

    Pastrana Member

    Joined:
    Oct 30, 2015
    Messages:
    96
    Location:
    Argentina
    Balance:
    159Coins
    Ratings:
    +45 / 0 / -0
    My Motion Simulator:
    2DOF
    @Hoantv

    Congratulations on your creations. I have the same cad pedal, I am with the electronic part, you can upload as you have done with the load cells, have you used the hx711? Do you have a connection scheme?
  5. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Testing shifter:


    • Like Like x 1
  6. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    I am trying to test all effects one by one. Currently i use wheelcheck to test.
    But it only support spring, constant, damper, inertia, friction, sin effect.
    I used fedit (which support all effects) but can not test. It showed invalid argument.
    Replace DD wheel to smaller wheel for test (DD too strong :d)

    • Like Like x 1
  7. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    391
    Balance:
    2,216Coins
    Ratings:
    +115 / 2 / -0
    Hoantv, have got the csv log from step test & to drop here? May be even both of them?
    Last edited: Mar 6, 2020
  8. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    yes, i saw it but dont understand it. I will test again and upload soon.
    • Like Like x 1
  9. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Update:
    1. Work effect after testing:
    - spring
    - sine
    - constant
    - damper
    - friction
    2. Work incorrect: inertia
    3. Other not yet test
    • Creative Creative x 1
  10. khientjhia

    khientjhia New Member

    Joined:
    Jan 12, 2020
    Messages:
    6
    Balance:
    71Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    2DOF
    I have resolved it ....EMC sofware
    • Like Like x 1
  11. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    It is closed source :)!
  12. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    here is log test. could you help me how to use it?

    Attached Files:

  13. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    391
    Balance:
    2,216Coins
    Ratings:
    +115 / 2 / -0
    I was talking about this. You've got other tests logs. If you can upload the step test csv itself, it'll be great)
    ScreenShot02998.jpg
  14. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    I pended on arduino project and moved to stm32f407. Now can receive ffb report, send data to PC.
    Hope it will replace old mmos firmware in the future (more effects, absolute encoder support, load cell pedal, shifter h-parten and sequence,... all in one MCU).
    • Like Like x 1
    • Friendly Friendly x 1
    Last edited: Mar 24, 2020
  15. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    If you are interested in this project and want to develope it. Contact with me to collaborate.
  16. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    1st effect calculator in stm32

  17. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    • Like Like x 1
  18. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    391
    Balance:
    2,216Coins
    Ratings:
    +115 / 2 / -0
    New soft for STM, is interesting) :thumbs

    What is your power supply and a motor? And where is your force slider at? Is it on the max?

    You've got pretty huge deadzone in linearity for now. Can be cured by several things. Including the software set up. Do you have a min force there?

    ScreenShot04314.jpg

    The step test.
    ScreenShot04315.jpg
  19. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Here is the wheel information (i borrowed the wheel from a friend, DD is too dangerous when testing :D)
    - Power supply is 24V10A
    - Motor: MY6812 24V150W.
    - Encoder: Omron ABZ 1000ppr.
    The deadzone i think due to the motor. When turn the power off, moving the wheel easily. When turn the power on, moving the wheel heavily (
    opposed to my DD)
    I tested with MMOS, have dead zone too.

    Here is logfile with MMOS min 4% and max 30%.

    www.mediafire.com/file/3lngz5knk746oky/log_mmos.rar/file
    I haven't made GUI to config. I used hard code for testing :D.
    total_torque = total_torque* 40% (no min max torque)

    could you share me 2 tools to read logfile.
  20. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    391
    Balance:
    2,216Coins
    Ratings:
    +115 / 2 / -0
    You should give more then just 4% up till the 15% of min force for the motor with MMOS to find it's instant reaction.
    Also can make for the test the min force with wheelcheck. 900 is 9% etc. Can determine it with min force test. Or just look when the wheels will start to move from the very start of the step test 2.

    ScreenShot04328.jpg

    The linearity chart is made with LutGenerator.
    https://drive.google.com/open?id=1dKnekJc5EpudFWpAIKzxTu-f_7nWZBPe

    On the graphs check this.

    Last edited: Apr 20, 2020