1. Hundreds of coffees, endless nights of debugging and coding, and countless feedback by our beta testers led to this new major release. SimTools 2.4 is probably the version with the most upgrades and improvements in a single release ever. Look at everything Dustin has included:
    SimTools 2.4 all features.
    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 Download Package Now!
  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 here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.

News Open source force feed back

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

  1. Hoantv

    Hoantv New Member

    Joined:
    Jul 19, 2019
    Messages:
    19
    Balance:
    140Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    hello ,
    I have just finish 1 phase DIY FFB MMOS used AC servo. It works well. I want to add some features (all 3 loadcell pedal, shifter, paddles, button plate,... in one MCU) Now i am trying to make a my firmware instead of MMOS (it is not supported now). 1st phase i do for Adruino, 2nd phase for SMT32F11. I think there are 5 tasks to make this firmware:
    1. Read encoder signal and send to PC (done for Adruino)
    2. Make Adruino Leonardo as FFB device recognized by PC (done for Adruino)
    3. Get ffb report (in progress, already got some report but it delay about 1-3 minutes to work, i don't know why need debug later)
    4. Make PWM signal (to do)
    5. Make software config on PC (to do).
    If you interested in this project, i will public on github and make it together.

    here is my project
    • Like Like x 5
  2. cfischer

    cfischer Member Gold Contributor

    Joined:
    Sep 7, 2015
    Messages:
    77
    Location:
    Colorado
    Balance:
    519Coins
    Ratings:
    +28 / 0 / -0
    Pretty cool! What servo drive are you using?
    Consider supporting the odrive motor controller or the growing in popularity AASD15A servo drive.

    Odrive needs UART/servo ppm(don't know servo ppm will be good for this)/ or step direction.
    AASD15A needs +/- 10v analog to run in torque mode.
  3. ahoenksiluman

    ahoenksiluman Member

    Joined:
    Nov 13, 2017
    Messages:
    44
    Location:
    indonesia
    Balance:
    377Coins
    Ratings:
    +24 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino
    very interesting project...
    what type of servo driver you use..??is that the same type like argon or cinese servo..??

    and what mode you use to drive that..??pwm mode..??or 0-10v converted from pwm mode..??or maybe 0-50-100...??
  4. Hoantv

    Hoantv New Member

    Joined:
    Jul 19, 2019
    Messages:
    19
    Balance:
    140Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    It is Teco tsda30b. I heard Odriver but it is difficult to buy it in my country. I test 2 driver from teco, the former uses speed controll with torque limit. I already make it working. But both speed and torque have a disadvantage. If ffb is low, the Rim will run over center position and repeat one or two time before stoping at center position. I will try position control to see which is difference. And i already bought ADC convert to replace optocoupers. But i priority to make the firmware 1st.
    I think you can use any servo driver which is compicated with server ( if driver is not complicated, server sound out loud)
  5. Hoantv

    Hoantv New Member

    Joined:
    Jul 19, 2019
    Messages:
    19
    Balance:
    140Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    I used pwm +-10v.
    Now, I consider to use pulse dir. and i think i will use a 2 relay to control the torque.
    Postion control uses +-10V to manage torque limit.
    I use 2 adc 5v to 12v that make +- 12v.
    2 relay, 1 low triger and 1 high trigger. When dir = 0, +12 active and when dir = 1, -12v active.
    That is my solution. I dont know it work or not (bought but not test yet)
  6. Hoantv

    Hoantv New Member

    Joined:
    Jul 19, 2019
    Messages:
    19
    Balance:
    140Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    Here is the video i test with torque control


  7. Hoantv

    Hoantv New Member

    Joined:
    Jul 19, 2019
    Messages:
    19
    Balance:
    140Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    Ffb test: the voltage from 0+-10v depend on pwm+-
  8. BiT0

    BiT0 Member

    Joined:
    Mar 13, 2019
    Messages:
    36
    Balance:
    191Coins
    Ratings:
    +6 / 0 / -0
    Very interesting. Watched thread.
    +1 for odrive and available to partecipate coding if you need.
  9. Hoantv

    Hoantv New Member

    Joined:
    Jul 19, 2019
    Messages:
    19
    Balance:
    140Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    Which are benefits from O driver? It price is great.

    Could you make ffb module use from simucube github? I only call API like makeFfb(reports, len).
    I will publish mycode on github when i resolve delay issue.
    • Like Like x 1
  10. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    778
    Location:
    Portugal
    Balance:
    5,927Coins
    Ratings:
    +828 / 11 / -0
    My Motion Simulator:
    6DOF
    Just want to say that I'm following this!
    Will try to help if I can and I get some more free time.

    I'm really curious with the code/driver side.
  11. Hoantv

    Hoantv New Member

    Joined:
    Jul 19, 2019
    Messages:
    19
    Balance:
    140Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    Update progress: This is firmware base on Adruino 1.8.10. And I can not make it all by myself. I only collected segment codes from other projects.
    Here I fixed get report delay 3 min. But have another isue that is when checking with iracing wheel check 1.72 it work well for 1st upload, but after plug-out adruino, plugin again it is freeze.

    you are welcom, here is the code
    Code: https://github.com/hoantv/VNWheel
    • Like Like x 1
  12. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    179
    Balance:
    1,163Coins
    Ratings:
    +56 / 1 / -0
    My Motion Simulator:
    Arduino
    You decided to make the dir control on relay? It will make oscillations. I tried and due to that should low the ffb amount. If i get that right)
  13. Hoantv

    Hoantv New Member

    Joined:
    Jul 19, 2019
    Messages:
    19
    Balance:
    140Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    Could you describle in detail. I dont understand clearly.
    Yes, I want to control the voltages control external torque limit. The speed and direction are controlled by pulse/dir from MCU. The problem is how to make torque for it (if torque = 0, servo doesn’t run).
    The voltage for torque limit is + 10 or - 10 corresponding with the dir signal. Dir is 1 or 0 value.
    I must convert it to analog (0-+/12V > output of ADC for pulse signal). I have several solutions for it (in my mind):
    -s1: I will set 2 pin digital base on dir, pin 1 = 1/ pin 2= 0 when dir = 0, pin 1=0/pin2 =1 when dir =1. Pin 1,2 connect to pin 1 of 2 optocouper. Pin 4 of optocouper connect to output of ADC (in case make my on firmware or use one more MCU if i use MMOS firmware)
    -s2: I use 2 relay, input/output replay is output of ADC (+-12V). The trigger is defferent,, relay 1 is trigger by H, relay 2 trigger by L. Dir signal connect to trigger input.
    - s3: i use 3 optocoupers. 1 couper to make 0/5v on pin 4 (called dir1) which isolate with dir signal control servo direction as images

    Attached Files:

  14. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    179
    Balance:
    1,163Coins
    Ratings:
    +56 / 1 / -0
    My Motion Simulator:
    Arduino
    I mean, with conventional pwm+dir with dc motor, an ordinary relay in dir, is supposed to be the couse of the oscillations if the ffb amount was high. All the same effect with IBT-2 (BTS7960) with ordinary pwm +/- mode, but with much higher ffb values there. Just like so.

    Very interesting project you've got over here!
    • Like Like x 1
  15. Hoantv

    Hoantv New Member

    Joined:
    Jul 19, 2019
    Messages:
    19
    Balance:
    140Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    Due to liciense (the former dont allow me use his code). So I have to remove force feedback file and try code later.
  16. OZHEAT

    OZHEAT Member

    Joined:
    Oct 26, 2015
    Messages:
    151
    Location:
    Australia
    Balance:
    1,841Coins
    Ratings:
    +79 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor
    If you are using the ardiuno ffb code that is widely used it was released to be used by anyone.
    There is no license as long as you include the header which has the disclaimer in it.

    "
    Force Feedback Wheel

    Copyright 2012 Tero Loimuneva (tloimu [at] gmail [dot] com)
    Copyright 2013 Saku Kekkonen
    Copyright 2015 Etienne Saint-Paul (esaintpaul [at] gameseed [dot] fr)
    Copyright 2017 Fernando Igor (fernandoigor [at] msn [dot] com)

    Permission to use, copy, modify, distribute, and sell this
    software and its documentation for any purpose is hereby granted
    without fee, provided that the above copyright notice appear in
    all copies and that both that the copyright notice and this
    permission notice and warranty disclaimer appear in supporting
    documentation, and that the name of the author not be used in
    advertising or publicity pertaining to distribution of the
    software without specific, written prior permission.

    The author disclaim all warranties with regard to this
    software, including all implied warranties of merchantability
    and fitness. In no event shall the author be liable for any
    special, indirect or consequential damages or any damages
    whatsoever resulting from loss of use, data or profits, whether
    in an action of contract, negligence or other tortious action,
    arising out of or in connection with the use or performance of
    this software."

    Add your "copyright 2019 Hoantv"
  17. OZHEAT

    OZHEAT Member

    Joined:
    Oct 26, 2015
    Messages:
    151
    Location:
    Australia
    Balance:
    1,841Coins
    Ratings:
    +79 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor
    I also used a commercial industrial servo and driver to use for FFB wheel and was successful in doing so.
    i used...
    Delta AASD+ 2.2Kw servo and driver which I bought years ago for a cnc spindle drive.
    MMOS on a STM F4 discovery board.
    torque mode on the driver.
    0-100% pwm on mmos to output 0-3v to torque voltage to driver. normally the torque signal is +/-10VDC but by scaling I used 10v equals 300% torque and therefore 3v equaled ~90% torque.
    Dir on mmos to Direction signal on driver.
    Set the servo driver to max 400rpm.
    Rotary phase converter to convert 240VAC single phase to 240VAC three phase. This was needed because delta 2.2kW servo driver has phase loss which prevents you from using single phase 240v.

    I stopped using the servo because of the necessity of running the phase convertor.
    If I was to do it again I would use a 1.5Kw delta servo and driver as this will accept 240VAC single phase and it is a lot cheaper than buying a servo motor and granite servo driver.
    BTW the delta servo I got is also marketed in the US by automation direct and called the sureservo series.
  18. Hoantv

    Hoantv New Member

    Joined:
    Jul 19, 2019
    Messages:
    19
    Balance:
    140Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    I already did but he said he does not want some one release his code :). No probem, there are many reference. Atm, i haven’t resolve freezing wheel check :(.
  19. Hoantv

    Hoantv New Member

    Joined:
    Jul 19, 2019
    Messages:
    19
    Balance:
    140Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino
    How do you resolve encode resolution? Delta have at least 17 bit encoder that is larger mmos support.
    In simcube. I saw it only support 16 bit encoder. May be driver must reduce to 16 bit.
    Torque mode requires speed and torque analog,
    Dir is 0/1 so which is input for speed?
    Last edited: Oct 9, 2019
  20. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    500
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    3,476Coins
    Ratings:
    +433 / 4 / -0
    My Motion Simulator:
    AC motor, Joyrider, Motion platform, 4DOF, 6DOF
    • Like Like x 1