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

Getting Started

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by StebanJigs, Sep 5, 2013.

  1. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,163
    Location:
    Oklahoma City, USA
    Balance:
    15,995Coins
    Ratings:
    +1,823 / 32 / -1
    *****Kangaroo center position fix for use with SimTools*****

    I was not able to be at my computer again today to call Dimension Engineering during their operating hours. Yobuddy is also willing to help, but it sounds like it won’t be possible without a new release of SimTools.

    However, I thought up another workaround today, tested it, and it works. So here’s the scoop.

    The kangaroo is not as smart as advertised, at least when pots are used for feedback. The “units” command will scale the input range to 65535 (16bit) as I stated previously. However, it won’t scale the range of the pot! 2.5 volts is always going to be center position for your pot no matter what your pot’s range is (as long as Vcc is 5 volts). Therefore, you must make sure that your pots are at 2.5 volts when your rig is centered. In order for the kangaroo to keep the center position at 2.5v when tuning, it is imperative that when you “teach” the kangaroo your pots min and max values, that they are equal distances from the center position. This requires use of a voltmeter to assure that you do. So, for example, if you need a 2v pot range, then the min teach tune voltage must be 1.5v and max teach tune voltage must be 3.5v. Therefore center stays at 2.5v.

    Now, while the input is scaled to 16 bits as we want, you will not be able to use the full range of it. To use the full input range, your pot must also use its full range. Therefore, your input range is reduced in proportion to your pot’s range. So if your pot’s range is 2.5 volts, not 5, then your input range is also reduced by half. So 32767 will still be center, but min will now be 16384 and max will now be 49151. This is not a problem though (other than a reduction of resolution but you may not even be able to notice). All you need to do now is scale up the max values for the axis in SimTools until you get the movement you want. Increasing the axis max values effectively reduces the output from SimTools. You need a reduced output because your rig will now reach it end positions faster than it would if you were using 0 and 65535 to state the same positions.

    Using the 16bit kangaroo output code that I posted for SimTools should now work to move your rig properly.
    • Like Like x 2
    Last edited: Nov 9, 2013
  2. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,163
    Location:
    Oklahoma City, USA
    Balance:
    15,995Coins
    Ratings:
    +1,823 / 32 / -1
    *****Kangaroo motor range fix for use with SimTools*****

    I got in touch with DE yesterday to check on a few things. Setting machine zero in DEScribe will not work for what we do. Atm anyway. When I try to set it, instead of moving a few positions counterclockwise to center, it tries a 300+ degree clockwise rotation and tears the pot loose. DE expects a continuous rotation pot as is used with robots, rovers, etc.

    But we have a fix for centering already anyway so this isn’t an issue now (fix in above post). But I have been trying to find a way to fix the resolution issue with the kangaroo working with SimTools. I finally came up with a solution. The solution will work to fix the issue if you are using anywhere between a 2000mv to 5000mv pot range. It will improve the issue some if you have less than 2000mv feedback. Don’t expect this fix to make motion any better than is by not using it. It just scales the kangaroos range up to its full amount. However, it will be less confusing when using SimTools, if your motors full ranges matched SimTools full output ranges. This fix allows you to set your axis values in SimTools at the normal levels for full output.


    This fix assumes you are using 12 vdc motors to power your rig. Therefore, you will have 12 vdc available for use (note: this fix will work with 24vdc or other voltages also but you could burn out your kangaroo if you make a mistake).

    First, disconnect your feedback pots positive wires from the kangaroo’s 5v terminals. Now find two spare potentiometers. On each one, connect one of the wires you removed from the kangaroo, to the wiper terminal. Next, on each one, connect a wire from one of the power terminals on the spare pot to your 12vdc source (your motor controllers positive input terminal). You should now be able to input up to 12vdc into you kangaroos feedback pots. We will call these the reference pots.

    Now how this works. If you can only use one-half of one of your feedback pots range for example, then you use its reference pot to adjust its input voltage to 10vdc so the first half of the pot will value from 0 to 5v. You must use all of the bottom end of your feedback pots so its feedback will be at 0v on one end. Then the other end we will set at 5vdc. This allows us to use the 0-5vdc range the kangaroo needs to full range properly with SimTools. It also keeps center position voltage at 2.5vdc.

    The formula to calculate the reference pots required voltage is (5000/feedback range in mv) x 5. If a feedback pot has a range of 3500mv, then the formula (5000/3500) x 5 yields a result of 7.14vdc for your reference pot voltage. At 2500mv (5000/2500) x 5 = 10vdc.

    You need to determine what your pots feedback ranges need to be or will be first so you can run them through the formula. You must have the reference voltages set to the correct level before you do a tune. Make sure your feedback pots are turned to 0v if possible before you apply power to the reference pots. To do this you can start a teach tune now with DEScribe and use the sliders to move the motors to 0v and then cancel the tune. If a reference pot is at 12vdc at power up, this will keep it from reaching the kangaroo (or you can just make sure your reference pots are at the min positions).

    Once you run the numbers through the formula you can set things up. Attach a voltmeter to ground and to a reference pots wiper. Turn the reference pot until it matches the value returned by the formula. Repeat with your other motors reference pot. Now take you voltmeters lead off the reference pots wiper and put it on one of the feedback pots wiper. Now start another teach tune with your kangaroo. Since your pot should already be at 0vdc when your start a tune (if there’re not move it there with the slider now), you need to move it up with the tune slider until it hits 5vdc on your voltmeter. If it you go over that over by .15v or so you should move the motor back to 0v, cancel the tune, then start over. Be careful not to move the slider the wrong way at first and break you pot loose. Repeat for your other motor. Once you get the 0-5v ranges set, move you motors back to the 2.5v feedback position. Now you can start the autotune. Rememeber, the most important thing now is that we get the full 0 to 5vdc set up and have a proper tune. If your rigs center is off some, you can adjust it later by twisting the pot.

    While this fix will help at lower rangers than 2000mv, if you do the math for a 1000mv feedback range for example, you would now need to have a reference pot voltage of 25vdc for correct ranging with SimTools.

    The kangaroos feedback inputs do have some built in protection from over-voltage. The main reason I called DE yesterday was to find out what it would take to burn out the kangaroo this way. I was told that it should be okay getting 12vdc at the feedback input if it doesn’t stay that way too long. Even though you should not ever put over 5vdc into it, if it accidentally happens, it should be fine if you don’t wait long to correct the error. (Note: If you use 12vdc motors but want to use a secondary power supply to supply 24vdc to the reference pots, you must make sure it shares a common ground with the kangaroo.)
    • Like Like x 2
    Last edited: Nov 9, 2013
  3. StebanJigs

    StebanJigs Member

    Joined:
    Sep 4, 2013
    Messages:
    59
    Occupation:
    electrician
    Location:
    Edmonton, Alberta, Canada
    Balance:
    393Coins
    Ratings:
    +3 / 0 / -0
    This seems to confirm the issues we have been having all along, thanks for the update @BlazinH

    I have been extra busy lately and will be out of town next week but I'll see if I can use your suggestions to get a larger movement range in simtools.

    Btw are you suggesting these problems could be avoided by going to rotary encoders?
  4. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,163
    Location:
    Oklahoma City, USA
    Balance:
    15,995Coins
    Ratings:
    +1,823 / 32 / -1
    Not unless your motion set up can do 360 degrees rotation! Just make sure you follow the centering fix. Sorry I doubted what you said on this! Again, my excuse is that the documentation is poor in explaining everything. And they assume something is rolling when they explain things. Even after I explained what we did, he still told me something that would not work for us. The second part of the units command is used to set up incremental encoders that have a different count rates per revolution. That way the kangaroo knows if it takes 100 counts or 250 counts of a encoder to equal one revolution. With a pot, 5v is always the equivalent of one revolution. I hope this explains things.

    P.S. I have been in communication with yobuddy, and mine too! I think a center offset slider is hopefully is in the works for a future release of SimTools. So if you have problems setting your pots at 2.5v to get exact center position on your rig, this will allow you to compensate for it.

    Edit: @StebanJigs However, using 12 bit rotary encoders would greatly improve your issue with using a low range as they will be much more accurate than a pot and will be noiseless. You may want to abandon the kangaroo before long anyway. Yobuddy and I are now collaborating on developing the SimAxe platform. I have added 12 bit rotary encoder support to yobuddy's code. It is about ready for beta release for use with pwm h-bridges if yobuddy approves. At my request, he has already added support to the SimAxe pc board so we can also use serial communication with the sabertooth or other "smart" controllers. The code to do this using serial is yet to be implemented but the sabertooth controller will already work with the current firmware using its analog mode.
    Last edited: Nov 9, 2013
  5. StebanJigs

    StebanJigs Member

    Joined:
    Sep 4, 2013
    Messages:
    59
    Occupation:
    electrician
    Location:
    Edmonton, Alberta, Canada
    Balance:
    393Coins
    Ratings:
    +3 / 0 / -0
    Hey guys I didn't fall off the face of the earth just other things in life keeping me busy atm. Just thought I would show you guys how the physical rig is coming along.
    [​IMG]
    [​IMG]
    Right now the seat is moved far forward and leaned back for browsing but I pull it back and tilt the seat back up when actually racing. Right now its just stating on some 2x4's to get a feel for height and spacing of everything, next will be to build the wheel and shifter mount and get this whole thing on a gymbal base.

    Quick question for you guys as to how the simaxe controller is coming along as I was considering purchasing one and seeing how it fairs compared to the kangaroo.
    • Like Like x 1
  6. RaceRay

    RaceRay Administrator Staff Member SimAxe Beta Tester

    Joined:
    Nov 8, 2006
    Messages:
    4,644
    Occupation:
    Self-employed | Web and application development
    Location:
    Hamburg, Germany
    Balance:
    24,877Coins
    Ratings:
    +1,558 / 10 / -0
    My Motion Simulator:
    2DOF, DC motor, SimAxe, SimforceGT
    I have another one nearly 99% assembled. PM me if you want it;)
  7. StebanJigs

    StebanJigs Member

    Joined:
    Sep 4, 2013
    Messages:
    59
    Occupation:
    electrician
    Location:
    Edmonton, Alberta, Canada
    Balance:
    393Coins
    Ratings:
    +3 / 0 / -0
    well guys back again after some time spent in china. I ended up getting the front of the rig done up with the wheel and shifter attached.
    image.jpg image.jpg

    unfortunately as suspected the kangaroo doesn't seem to be a very viable option anymore and I believe that in the near future I will be looking to put together a simaxe board.

    Still keeping an eye on these forums and thankful for all the help that people have been willing to give.
    • Like Like x 1
  8. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,163
    Location:
    Oklahoma City, USA
    Balance:
    15,995Coins
    Ratings:
    +1,823 / 32 / -1
    Hi there @StebanJigs ! I was wondering if and when you would pop up here again. Nice to see you’re still in the game! You have good timing too! I just got done building a new rig that I have been working on since the first of the year that I was planning on possibly using the kangaroo on. I gave it a try this weekend and did a write up on my results but I have not got around to posting it yet. I will post it after posting this if you want to check it out. Guide to setting up SimTools for use with the Kangaroo motion controller

    Unfortunately, you may be correct that the kangaroo isn’t very viable, at least for a lot of us. My new rig uses only 90 degrees rotation of the motor shaft so I attempted using a 90 degree hall effect pot with the kangaroo. Just like you, I was unable to get a tune completed with the reduced motion. I think the kangaroo may still be viable for those who will use mostly full rotation of their pots or at least more than 180 degrees of it. My bench testing (when talking with you about it last year) used around 270 degrees and I was able to get a tune. However, I would have to remove the current hall effect encoders on my first rig and replace them with 360 degree hall effect pots and reprogram my picaxe to test the kangaroo with increased movement. It’s just too much hassle to do when I don’t need or want to. So for now, I cannot recommend the kangaroo at least until some other member(s) proves it is viable and tells us about their setup.

    As far as the SimAxe goes, I think its fair to say that it too has yet to be proven viable when it comes to full PID control at least. So if you want to try it then go for it! But consider yourself a “test dummy” if you do! This is just a figure of speech though so I don’t mean you will be a dummy if you try it! Just that you will be one of, it not the first to do so to my knowledge. Good luck in your endeavors and were still here to help if and when needed.
    Last edited: Apr 16, 2014
  9. StebanJigs

    StebanJigs Member

    Joined:
    Sep 4, 2013
    Messages:
    59
    Occupation:
    electrician
    Location:
    Edmonton, Alberta, Canada
    Balance:
    393Coins
    Ratings:
    +3 / 0 / -0
    Good to hear from you again BlazinH, yea I was using around 90 degrees of motion in my test setup before and couldn't seem to get things quite right, it did the basic motion and was I proper directions but distance and levels/ centering were not acceptable.

    I do however have new ideas for possible larger motor setup and motion design since it is now in a different room with a 40" screen. I have also ordered some buttkicker LFE's to use with simvibe and will be trying that out shortly as the frame seems to transmit vibration even from the g27 in a very positive feeling way.

    I'll be contemplating controller options here for a bit before jumping the gun, I'll be sure to give you guys some more updates when I have them.

    Thx again for all the help.
  10. 5natural5

    5natural5 New Member

    Joined:
    Nov 11, 2014
    Messages:
    15
    Balance:
    170Coins
    Ratings:
    +2 / 1 / -0
    My Motion Simulator:
    6DOF
    I'm using a Sabertooth and Kangaroo together with Simtools. The motor I use has an encoder with an index and my test setup uses 2 limit switches.

    In my startup line I typed : 1, start<13><10>1, home<13><10>

    This homes makes the motor turn (from the center position) towards limit switch (slowly), press it, then return to center (very quickly). Is there any way I could change this. For example, I would prefer it if the motor just stayed in the center position (but if I ommit the home command it does not accept simtools axis input).

    Any help is much appreciated, I've been breaking my head on this for over a week now.
    Kind regards,
    Thomas