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

Question Interface Settings minimum Output-Bit Range for Odrive

Discussion in 'SimTools DIY Version' started by Icebeat, Nov 4, 2020.

  1. Icebeat

    Icebeat New Member Gold Contributor

    Joined:
    Feb 21, 2020
    Messages:
    10
    Balance:
    - 61Coins
    Ratings:
    +1 / 0 / -0
    In the current version of Interface Settings Serial, the available bit range are from 7 to 32, this is incompatible with the new Odrive firmware.
    Any possibility to not use bit range at all? a better option will be to map axis ranges to user-defined values Min and Max?
    Thanks
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    One for @yobuddy to consider.
  3. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,913Coins
    Ratings:
    +5,027 / 16 / -0
    We could build an ODrive interface easy enough.
    What output range does it need?
    Take care,
    yobuddy
  4. Icebeat

    Icebeat New Member Gold Contributor

    Joined:
    Feb 21, 2020
    Messages:
    10
    Balance:
    - 61Coins
    Ratings:
    +1 / 0 / -0
    I already build my own 3 minutes version using your serial plugin, thanks for sharing ;)
    As you can see my min-max values are -5..5 but other users can desire different values dependent on actuator length, ideally the interface should have two edit boxes with min and max values.

    GetOutPut (...
    ...
    Dim slope As Double = 0
    Dim output_start As Double = -5
    Dim output_end As Double = 5
    Dim input_start As Double = -1
    Dim input_end As Double = 1
    'Bits
    Select Case BitsNeeded
    Case "0"
    'Out the value
    slope = (output_end - output_start) / (input_end - input_start)
    OutPut = output_start + slope * (InputPercent - input_start)
    .....
    'Odrive uses float
    'Convert to an integer
    OutPut = Math.Round(OutPut, 3)

    Thanks,
    sorry for my VB.
    icebeat.
  5. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,913Coins
    Ratings:
    +5,027 / 16 / -0
    But most users would not know what 8 or 16 bit min max numbers should be.
    So maybe another version with editable settings would be best.
  6. CNCModeller

    CNCModeller

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi @yobuddy ,
    I'm new here and hoping to use ODrive for my build, so sorry of this is something I should know already.

    Is there a arduino based solution that'd allow me to connect to my ODrive over CAN bus so I can make my build easily expandable?

    I'm using ODrive for my DD wheel, and am very impressed so wanted to use is for my motion build too. Seems to me that almost everything I need w.r.t closed loop control of a Brushless motor is built into ODrive already, just need a way to communicate.

    https://www.xsimulator.net/community/threads/another-dd-hoverboard-motor-sim-wheel.15628/

    Any pointers would be much appreciated.

    All the best,
    Barry M
  7. CNCModeller

    CNCModeller

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  8. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,913Coins
    Ratings:
    +5,027 / 16 / -0