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. 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:
    106
    Balance:
    867Coins
    Ratings:
    +63 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    The firmware is shared in testing group 1st. If sone one is interested in testing phase, pm before next Monday!
    After testing, i will the publish firmware!
  2. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    106
    Balance:
    867Coins
    Ratings:
    +63 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Still need more volunteers to test the firmware.
  3. Thanos

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

    Joined:
    Jul 6, 2017
    Messages:
    842
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    4,100Coins
    Ratings:
    +731 / 6 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    Which microcontroller and motor?

    Could I use it on STM32F4 with Servomotor instead of MMOS firmware?
    https://github.com/tronicgr/TDD

    Thanks
    Thanos
  4. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    106
    Balance:
    867Coins
    Ratings:
    +63 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Yes. It connect same like mmos without changing connection.
    It supports pulse/dir and hbrigde.
    Would you like to join test group?
    • Agree Agree x 1
  5. Thanos

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

    Joined:
    Jul 6, 2017
    Messages:
    842
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    4,100Coins
    Ratings:
    +731 / 6 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    Of course! I have ready setup for it!! :cheers

  6. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    106
    Balance:
    867Coins
    Ratings:
    +63 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Here is some 1st reviews about open firmware of vnm simulation.

    If you are interested in this firmware, join my discord server to get firmware for testing.


    https://discord.gg/amFRzH

    Attached Files:

    • Like Like x 1
  7. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    106
    Balance:
    867Coins
    Ratings:
    +63 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Update: firmware supported force feedback from telemetry, tested with Assetto Corsa :d!
    • Like Like x 3
  8. OZHEAT

    OZHEAT Active Member

    Joined:
    Oct 26, 2015
    Messages:
    212
    Location:
    Australia
    Balance:
    2,384Coins
    Ratings:
    +101 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor
    @Hoantv
    Good to see you are progressing with the ffb controller.
    Seeing that you are using a stm32f4 controller may I suggest that you don't follow MMOS greatly flawed torque output of PWM as the STM32f4 cpu has a DAC built in to the chip, 2 in fact.

    I can understand the programmers that use an arduino based board using PWM as they don't have built in DAC and must therefore use PWM or an external DAC chip, using pwm involves too many extra steps to get the analog voltage output ie generate pwm out then to correctly get a stable voltage using a RC low pass filter rather than load a torque value to a register and then output an analog volt out the DAC pin (PA4 or PA5).

    Sure people who use Alexey's "DIY MMosFFB" or Gadget999's "cousin of OSW" topology with DC brushed motors won't be able to use a dac's analog voltage to control but that isn't true torque control but they can keep using PWM and put up with the heat or turn down the power, if they really want I can post a few circuits that can use an analog voltage to really control current and therefore real torque control.

    There are just too many cons to using PWM rather than simply using the built in DAC.

    Anyway keep up the good work, I wouldn't mind trying out your FFB firmware.
    • Informative Informative x 1
  9. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    106
    Balance:
    867Coins
    Ratings:
    +63 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    @OZHEAT My firmware uses both: pwm and Built-in DAC. People can use which they prefer.
    Currently i made it like that:
    - hbrigde: turn left pa4 >0, pa5 = 0; turn right pa4=0, pa5>0
    - pulse/dir: pa4>0, turn left pa5=0, turn right pa5=3.3V.
    Here is my discord to discuss in realtime :)!
    https://discord.gg/NDk4pYd
    • Informative Informative x 1
    Last edited: Jun 20, 2020
  10. sedesa tatasa

    sedesa tatasa New Member

    Joined:
    Jun 16, 2018
    Messages:
    26
    Balance:
    232Coins
    Ratings:
    +9 / 0 / -0
    What is telemetry ffb?
    What is the difference with the conventional ffb?
  11. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    106
    Balance:
    867Coins
    Ratings:
    +63 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Game has ffb torque already, only get from game and send to Stm32. It only need convert ffb torque to pwm and analog output.
  12. Thanos

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

    Joined:
    Jul 6, 2017
    Messages:
    842
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    4,100Coins
    Ratings:
    +731 / 6 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    But what if you add a 12bit PWM to Analog DAC on the output?

    IMG_20200618_171614.jpg

    IMG_20200618_171533.jpg
  13. Thanos

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

    Joined:
    Jul 6, 2017
    Messages:
    842
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    4,100Coins
    Ratings:
    +731 / 6 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF

    Why not use only one pin for Internal DAC say PA4, with output 0-3.3v and use the 0/1 digital PE11 pin for direction? Just Bidirectional signal for Torque. Don't use two DAC outputs...!!
  14. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    106
    Balance:
    867Coins
    Ratings:
    +63 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Mine servo use +-10v, need separate to create negative voltage .
  15. Thanos

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

    Joined:
    Jul 6, 2017
    Messages:
    842
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    4,100Coins
    Ratings:
    +731 / 6 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    AASD servos just need an analog voltage 0-3.3v signal for torque and a direction signal digital 0v or 5v (to know which direction will apply the torque)

    Can't get it more simple than this!!
  16. OZHEAT

    OZHEAT Active Member

    Joined:
    Oct 26, 2015
    Messages:
    212
    Location:
    Australia
    Balance:
    2,384Coins
    Ratings:
    +101 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor
    @Hoantv
    Excellent !! that you have already implemented the built in DAC and even kept PWM for the DC speed contoller guys.
    I would question your nomenclature on your modes,
    Pulse/dir would be to me being PWM mode
    Analog/dir would be better to describe the DAC as it is set a value and the output that voltage continuously till you tell it to stop or change values, no pulse involved. You do not even have to change it until the next ffb update comes unless the game uses canned effects.

    (((RANT)))) pulse width modulation) is always a regular pulse, min pulse being the shortest and max being the longest. There is never a missed pulse(0%) and there is never a fully on pulse(100%) ie in simple terms the pulse is on 1% - 99% on. Boohoo for the pwm users who want use it to convert it to an analog value as they will never get a zero or full scale value, the non zero can cause the jitter(oscillations) on a stationary vehicle.

    Sorry, I will have to decline discord as I don't want it on my computer and i'd prefer to discuss it here as there are intelligent people here on xsim who can give valuable input aswell.
    I would like to test your firmware but if you don't want to release it outside your discord group I understand and will just wait till you release to the public. If you want I can give you feedback via PM here.
    Please note though I am extremely busy till the end of the month and am not a real active racer ~20hrs this year and ~4hrs on the internet per week.


    If you really want I could suggest a third mode that ill get you to YOUR needs better.

    Cheers Andy.
    • Like Like x 1
  17. OZHEAT

    OZHEAT Active Member

    Joined:
    Oct 26, 2015
    Messages:
    212
    Location:
    Australia
    Balance:
    2,384Coins
    Ratings:
    +101 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor
    @Thanos
    Can I call you Bob? /jk
    Is this a trick question? REALLY!

    I take it that you are talking about the PWM output as putting it on the analog output would just result in nonsensical results. A value below on threshold would result in 0 and above threshold would be max value, if it worked at all as there is no real pulse.

    Why would you go with PWM when Hoantv is making the in built DAC available for output?
    Lets go through some cons of using your converter.
    -cost, you need to purchase the pwm dac.
    -circuitry, you need an ancillary ic and components to implement although I would just deadbug it.
    -latency, you need to generate the pwm signal, then let your convertor wait for the pulse and convert to an analog voltage then it finally goes to the servo driver as opposed to just getting a value to the built in dac and then straight to the servo drive.
    -accuracy, the more conversions the more accuracy suffers.

    What are advantages to the converter. well I don't know maybe you can enlighten me?

    Sorry to say but I think your board is going the way of the dodo bird before it really got started.
    Hoantv's firmware will kill mmos, emc and others unless it turns out to be non functional or missing features.
    PWM should have never been the output in mmos, all others just followed.
  18. OZHEAT

    OZHEAT Active Member

    Joined:
    Oct 26, 2015
    Messages:
    212
    Location:
    Australia
    Balance:
    2,384Coins
    Ratings:
    +101 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor
    I agree that you should use only the 1 dac output with the digital pin for dir.
    BTW will 3v3 actually driver the optoisolator in the servo drive as they are normally 10v?
  19. Thanos

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

    Joined:
    Jul 6, 2017
    Messages:
    842
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    4,100Coins
    Ratings:
    +731 / 6 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    The AASD servos use negative offset so that 1% you mention scales nicely down to 0 torque...

    Here are the parameters I used for TDD with the DAC function:
    PN002 = 0 (control mode - voltage mode, requires restart)
    PN003 = 0 ( Servo enabled? - external)
    PN018 = 0 (Take the encoder output pulse AB phase logic - 0-1)
    PN051 = 1500 (Motor max RPM - see motor specs)
    PN053 = 18 (SigIn 2 port functional allocation -27 - 27)
    PN188 = 10 (Analog torque instruction smooth filtering time - 1-500ms)
    PN189 = 100 (Analog torque instruction gain 1-300 %/V)
    PN190 = -100 (Analog torque instruction offset adjustment -1.5v - 1.5v)
    PN191 = 0 (Simulation of torque command direction - try 0 first)
    PN198 = 500 (Torque control speed limit - 0-4500rpm)

    And MMOS settings:

    IMG_20200614_212309.jpg
  20. Thanos

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

    Joined:
    Jul 6, 2017
    Messages:
    842
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    4,100Coins
    Ratings:
    +731 / 6 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    No optocouplers, its direct Analog voltage 0-3.3v. The DAC is rail to rail and the frequency PWM it decodes from MMOS is 5.6khz