1. 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!
  2. 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
  3. 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 here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.
  4. All new posts and threads should be written in English. Please do not create dual posts in other languages. If you are not a master of the English language you can use an external service to create a translation of your words, for instance, Google translate or DeepL.
    Due to low activity, we've also closed the french section.
    Dismiss Notice

News Open source force feed back

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

  1. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    322
    Balance:
    2,072Coins
    Ratings:
    +100 / 1 / -0
    Superb!
    Will it be hard to add pwm like 250Hz? Just curious to test motors with it.
  2. Hoantv

    Hoantv Member

    Joined:
    Jul 19, 2019
    Messages:
    76
    Balance:
    604Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    I think it is not hard, calculate prescale and period.
    I see all firmware have “spring on desktop”. But I dont understand why we need this? It only for testing or other purpose?
  3. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    322
    Balance:
    2,072Coins
    Ratings:
    +100 / 1 / -0
    250Hz or a kind of it will be great.
    Spring should even be made on the game a bit, i've read somewhere. I use it with dir mode in diy driver, to make the switching in the center to be active and all be working right then. So, the motor controllers working on it, should then have it too. I guess so.
  4. Hoantv

    Hoantv Member

    Joined:
    Jul 19, 2019
    Messages:
    76
    Balance:
    604Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    I added desktop spring on GUI.


    Todo:
    - process configdata in stm32
    - store config data to flash
    - add desktop spring effect.
    - add filter for condition force
    - add BLDC support
    - test and fix bug
    - RELEASE :D!!!!
    • Like Like x 2
    • Winner Winner x 1
  5. tassault

    tassault New Member

    Joined:
    May 3, 2020
    Messages:
    5
    Balance:
    46Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    Hi Hoantv,
    unfornately, it's not possible to use stepper motor for ffb... I make a mistake.... So, I don't know what I can use with brushless motor... What do you propose ?
  6. Hoantv

    Hoantv Member

    Joined:
    Jul 19, 2019
    Messages:
    76
    Balance:
    604Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    currently, I dont have brushless motor. So I dont know how to code for it.
  7. Hoantv

    Hoantv Member

    Joined:
    Jul 19, 2019
    Messages:
    76
    Balance:
    604Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    update: write config to and read config from flash
    • Like Like x 2
  8. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    322
    Balance:
    2,072Coins
    Ratings:
    +100 / 1 / -0
    Hoantv, hi. The right pwm dir connection to check the motor free rotations.
    The schematic is now right. Just swap the wires. It works.
    PwmPins.jpg..jpg
  9. Hoantv

    Hoantv Member

    Joined:
    Jul 19, 2019
    Messages:
    76
    Balance:
    604Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    It is strange :). Pwm connect to enable, dir (always 1,0) to pwm.
    I will test after finishing the configuration module.
  10. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    322
    Balance:
    2,072Coins
    Ratings:
    +100 / 1 / -0
    Previously the lay out it was not proposed by me. But by another dude.

    If read the manual to BTS it won't be strange) L_EN R_EN is just a switch to each of the half bridges correspondingly. And only one controlling signal for each of the half bridges RPWM LPWM is required.
    ScreenShot03757.jpg


    ScreenShot03756.jpg

    So you have to pwm the switch. A commom thing actually, but in that case, it's usually just one mosfet stand alone, on negative or positive side to be pwm'ed ) So all then should come clear.

    But i bet a lil bit some extra work should be done. I don't like the way it works. The DZ is even more vs "standard". MB give an optos to the signals. Will see.
    • Like Like x 1
  11. Hoantv

    Hoantv Member

    Joined:
    Jul 19, 2019
    Messages:
    76
    Balance:
    604Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    Update: test configuration :d!!!
    • Like Like x 2
  12. Hoantv

    Hoantv Member

    Joined:
    Jul 19, 2019
    Messages:
    76
    Balance:
    604Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    What do you think about pwm frequency like this


    switch (setupMotorConfig_Report.pwmFreq) {
    case 0:
    pwmPeriod = 499;
    break;
    case 1:
    pwmPeriod = 999; // 8.4 Khz
    break;
    case 2:
    pwmPeriod = 1499; // 5.6 Khz
    break;
    case 3:
    pwmPeriod = 1999; //4.2 kHz
    break;
    case 4:
    pwmPeriod = 3499; //3.36 kHz
    break;
    case 5:
    pwmPeriod = 3999; //2.1 kHz
    break;
    case 6:
    pwmPeriod = 8399; //1.0 kHz
    break;
    case 6:
    pwmPeriod = 16799; //500 Hz
    break;
    case 8:
    pwmPeriod = 33599; //250 Hz
    break;
    default:
    pwmPeriod = 499;
    break;
    }

    Attached Files:

    • Winner Winner x 1
  13. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    322
    Balance:
    2,072Coins
    Ratings:
    +100 / 1 / -0
    I don't know, how it will behave, bit it's defenetly very cool you can, and make it!:)
  14. Hoantv

    Hoantv Member

    Joined:
    Jul 19, 2019
    Messages:
    76
    Balance:
    604Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    Basiccally, all feature except overall filter (i write a hard code to fix cutoff frequency)
    Need some days to optimize before release.
    Would you like to test the firmware?
    • Winner Winner x 1
    Last edited: May 30, 2020 at 22:56
  15. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    322
    Balance:
    2,072Coins
    Ratings:
    +100 / 1 / -0
  16. Hoantv

    Hoantv Member

    Joined:
    Jul 19, 2019
    Messages:
    76
    Balance:
    604Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    Too much setup for wheelbase :(!!!!!
    Maybe I will release test version in early June. I need volunteers to test firmware to make it better (communicate via PM)
    I will create a group for discussion.

    Attached Files:

    • Like Like x 1
    Last edited: Jun 1, 2020 at 07:58
  17. Hoantv

    Hoantv Member

    Joined:
    Jul 19, 2019
    Messages:
    76
    Balance:
    604Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    The firmware is ready to test. I will write a document to describe how to configure it and release at the weekend
    • Like Like x 1
    • Winner Winner x 1